Building U-Boot for MitySOM-AM57X

Before you begin

There are multiple ways to customize and compile the U-Boot for your project. Please try to build U-Boot as-is with no changes before you try to add your customizations. This will ensure your environment and toolchain are setup correctly.

  1. ARM toolchain - You can use a previously compiled ARM toolchain provided by ARM.
  2. Yocto Environment - If you are using the docker environment and Yocto for your filesystem, you can use its tools to customize and build U-Boot.

In most cases, you will use one of the first two options for initial bring-up and testing. Then, once you have everything working you can integrate your custom code into Yocto.

Critical Link U-Boot Repository

Critical Link recommends using the processor-sdk-u-boot-2019.01 branch on our git server:;a=summary.

Other MitySOM-AM57x U-Boot branches seen on the repository should not be considered stable, and are used for internal feature development.

U-Boot Build - ARM toolchain

Configuring the Build Environment

Download the ARM toolchain and setup the build environment using the following commands:

mkdir -p /home/tools/mitysom-57x
wget -O - | tar -Jxv -C /home/tools/mitysom-57x/ 

export TOOLCHAIN_PATH_ARMV7=/home/tools/mitysom-57x/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-
export PATH=$PATH:/home/tools/mitysom-57x/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin

git clone --single-branch --branch processor-sdk-u-boot-2019.01 
cd processor-sdk-u-boot

Choosing a configuration and compiling U-Boot

Now that you have the source code, you can customize as needed. For most projects, you will want a custom defconfig and a custom pinmux. Example defconfigs can be found in the configs/ directory. It is recommended that you start with a similar board as a reference for your own configuration.

Using the defconfig for Critical Link's Development Board as an example, you can compile U-Boot with:

$ make distclean
$ make mitysom57xx_devkit_defconfig
$ make

If the build is successful, you will see MLO and u-boot.img files in the current directory. You can copy those to your boot media to test your new build. When U-Boot boots, it will display the build date and time. Please check this to make sure your new U-Boot files are being used.

For example, note the two dates, one for the MLO and one for the u-boot.img:

U-Boot SPL 2019.01-gf686148297-dirty (Sep 02 2020 - 00:09:29 -0400)
DRA762-GP ES1.0 ABZ package
no pinctrl state for default mode
** Unable to read file dra7-ipu1-fw.xem4 **
Firmware loading failed
Trying to boot from MMC1
no pinctrl state for default mode
Loading Environment from FAT... *** Warning - bad CRC, using default environment

Loading Environment from MMC... Card did not respond to voltage select!
*** Warning - No block device, using default environment

U-Boot 2019.01-gf686148297-dirty (Sep 02 2020 - 00:09:29 -0400)

An example pinmux for Critical Link's development board can be found in board/cl/mitysom-57x/mux_data.h.

Please contact Critical Link at if you need help with customizing your defconfig and pinmux for your application.

U-Boot Build - Yocto

For this option, you should have an environment setup as described in Docker build environment and Building the Yocto Root Filesystem for MitySOM-AM57X.

With this option, the general Yocto setup configures your build environment. You can compile U-Boot by running bitbake commands from your build directory.

Customize your U-Boot

You can customize U-Boot by pointing the U-Boot recipe to your new branch location.

In your Yocto meta layer, create a u-boot bbappend file. File name is important to match existing u-boot recipe name, as of Feb 2021 the name is below

mkdir recipes-bsp/u-boot/
vim u-boot-ti-staging_2019.01.bbappend


UBOOT_GIT_URI_mitysom-am57x = "git://" 
UBOOT_GIT_PROTOCOL_mitysom-am57x = "http" 

BRANCH_mitysom-am57x = "processor-sdk-u-boot-2019.01" 
SRCREV_mitysom-am57x = "${AUTOREV}" 

  • Point UBOOT_GIT_URI* to your repository
  • Update BRANCH to match your branch
  • SRCREV can be set to a specific git hash if you want to lock to a specific commit instead of letting it grab the latest in the branch.

Building U-Boot

Then, to build U-Boot (note that this is within the previously configured Docker environment):

user@8ec23474095b:~$ MACHINE=mitysom-am57x bitbake virtual/bootloader

If the build is successful, you will find your MLO and u-boot.img file in ./arago-tmp-external-arm-toolchain/deploy/images/mitysom-am57x/.

Go to top
Add picture from clipboard (Maximum size: 1 GB)