Project

General

Profile

Building the MitySOM-AM62 U-Boot

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 add your customizations. This will ensure your environment and toolchain are setup correctly.

  1. Docker Build - Build using a Docker image (as described in Docker Build Environment )
  2. Linux Manual Install - You can use a previously compiled ARM toolchain provided by ARM by installing it on a Linux system.
  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 three options to build U-Boot for Critical Link development kit. Then, once you have everything working you can integrate your custom code into the U-Boot source.

Critical Link recommends using the mitysom-u-boot-2023.04 branch on our git server: https://support.criticallink.com/git/u-boot-ti.git.

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

U-Boot Build - Docker

See Docker build environment for details on how to setup and install the Docker build environment. Once that is installed, you can build U-Boot using the following commands:

git clone --branch mitysom-u-boot-2023.04 https://support.criticallink.com/git/u-boot-ti.git
cd u-boot-ti
docker run --rm --volume "$PWD:/work" --workdir=/work mitysom_ubuntu:22.04 ./62x-build.sh -i # Or ./62ax-build.sh -i

Note that for the AM62a, please install the TI Processor SDK to /home/tools/mitysom-62x and mount the volume (--volume /home/tools/mitysom-62x:/home/tools/mitysom-62x) before running the build.

If the build is successful, subsequent use of the script can omit the -i option.

Please refer to the "Verifying Your U-Boot Build" section of this wiki page to verify your build and the next steps.

U-Boot Build - Linux Manual Install

Click here to view instructions...

U-Boot Build - Yocto

Click here to reveal details

Verifying Your U-Boot Build and Next Steps

If successful, the build script lists the output binaries after completing the build:
-rw-r--r-- 1 user mitysom 298101 May 16 13:48 /work/build-mitysom_am62x_devkit/r5/tiboot3-am62x-gp-evm.bin
-rw-r--r-- 1 user mitysom    331 May 16 13:48 /work/build-mitysom_am62x_devkit/r5/tiboot3-am62x-gp-evm.bin.map
-rw-r--r-- 1 user mitysom 300690 May 16 13:48 /work/build-mitysom_am62x_devkit/r5/tiboot3-am62x-hs-evm.bin
-rw-r--r-- 1 user mitysom    374 May 16 13:48 /work/build-mitysom_am62x_devkit/r5/tiboot3-am62x-hs-evm.bin.map
-rw-r--r-- 1 user mitysom 300690 May 16 13:48 /work/build-mitysom_am62x_devkit/r5/tiboot3-am62x-hs-fs-evm.bin
-rw-r--r-- 1 user mitysom    377 May 16 13:48 /work/build-mitysom_am62x_devkit/r5/tiboot3-am62x-hs-fs-evm.bin.map
lrwxrwxrwx 1 user mitysom     29 May 16 13:48 /work/build-mitysom_am62x_devkit/r5/tiboot3.bin -> ./tiboot3-am62x-hs-fs-evm.bin
-rw-r--r-- 1 user mitysom 1149851 May 16 13:48 /work/build-mitysom_am62x_devkit/a53/tispl.bin
-rw-r--r-- 1 user mitysom 960075 May 16 13:48 /work/build-mitysom_am62x_devkit/a53/u-boot.img

You need to copy three files to your boot media to test your new build:
  1. tispl.bin
  2. u-boot.img
  3. tiboot3.bin - you need to rename the .bin file that corresponds to your AM62x processor variant (GP or HS-FS)
    • If your SOM is using a GP variant, rename tiboot3-am62x-gp-evm.bin to tiboot3.bin
    • If your SOM is using a HS-FS variant, rename tiboot3-am62x-hs-evm.bin to tiboot3.bin

The differences between GP, HS, and HS-FS, are discussed here.

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 multiple dates, one for each stage of the boot process. If you are using the HS or HS-FS part, you will see additional messages relating to the secure boot process:

U-Boot SPL 2021.01-gf09de44c32 (Feb 21 2023 - 19:27:10 +0000)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.4.7--v08.04.07 (Jolly Jellyfi')
SPL initial stack usage: 13424 bytes
Trying to boot from MMC2

...

U-Boot SPL 2021.01 (Mar 03 2023 - 13:16:40 +0000)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.4.7--v08.04.07 (Jolly Jellyfi')
Trying to boot from MMC2

U-Boot 2021.01-00279-g3c10843487-dirty (Mar 06 2023 - 11:14:15 -0500)

Additional Scripts

Several additional scripts are provided to do helpful things.

62x-copy.sh - Copies the files to a locally mounted SD card (assumed to be at /media/$USER).
62x-push.sh - Push the files to a board over network. You must supply a connection string as the first argument (eg root@<board ip address> ) or configure a ssh host target.

Note corresponding 62ax-copy.sh and 62ax-push.sh exist as well.

Customizing U-Boot for your Application

Now that you can build U-Boot, you can customize the U-Boot source code for your specific application.

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. You will need to update the build.sh script to use your custom defconfig files (search for defconfig to find the relevant strings).

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

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

Saveenv note

In the new SDK 09, the saveenv command has been removed from u-boot. Now environment settings must be done in uEnv.txt. To save variables to uEnv.txt within the bootloader, run the following commands (note that <list of variables> should be environment variables you want to be exported):

env export -t $loadaddr <list of variables>
fatwrite mmc ${mmcdev} ${loadaddr} ${bootenvfile} ${filesize}

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