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, No MDK - You do not need to download the entire Critical Link MDK to build U-Boot. You can use a previously compiled ARM toolchain provided by ARM.
  2. ARM toolchain, MDK - If you have the MDK installed, you can use its setup scripts to configure your build environment.
  3. 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 TBD 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, No MDK

Configuring the Build Environment

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

$ mkdir -p ~/tools/mitysom-57x
$ wget -O - | tar -Jxv -C /home/bduke/tools/mitysom-57x/ 
$ export TOOLCHAIN_PATH_ARMV7=/home/bduke/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:~/tools/mitysom-57x/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin
$ git clone --single-branch --branch TBD 
$ 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 if you need help with customizing your defconfig and pinmux for your application.

U-Boot Build - ARM toolchain, Critical Link MDK

This method assumes you have downloaded the Critical Link MDK from the Files tab.

Install the MDK and setup build environment

Assuming you downloaded the MDK to your ~/Download directory:

$ cd ~/Download
$ chmod +x
$ ./ 

Answer the prompts and remember where you installed the MDK (the default location is /opt/criticallink/arago-2019.11. Assuming the default install location, run these commands to setup your build environment and download the source:

$ source /opt/criticallink/arago-2019.11/environment-setup
$ export ARCH=arm
$ export CROSS_COMPILE=arm-linux-gnueabihf-
$ git clone --single-branch --branch TBD 
$ cd processor-sdk-u-boot

Choosing a configuration and compiling U-Boot

Please refer to this section in the "ARM, No MDK" option for how to customize and build U-Boot.

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.

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/.

Add picture from clipboard (Maximum size: 2 GB)