Build U-Boot#
This module explains how to compile U-Boot.
During Linux development, the U-Boot source code may need to be modified and recompiled. For example, U-Boot must be recompiled if:
Enabling features which are disabled in the U-Boot defconfig
Disabling features which are enabled in the U-Boot defconfig
Modifying U-Boot source code to port U-Boot to a custom board
This section explains how to rebuild the U-Boot source code provided in the Processor SDK Linux package on the Development Host.
There are two methods to build the U-Boot in the Processor SDK:
Using the SDK top level Makefile
Using the U-Boot top level Makefile
The first method wraps the build steps in the second method to a single command, which is convenient but has a down side that it reduces the customization capability which the second method has. Therefor, pick the method which fits the use case.
Build U-Boot Using the SDK Top Level Makefile#
$ cd <SDK_INSTALL_DIR>/
$ make u-boot
Build U-Boot Using the U-Boot Top Level Makefile#
Once the Processor SDK Linux package is installed, the U-Boot source code is
under <SDK_INSTALL_DIR>/board-support/ti-u-boot-<version>/. Please refer
to Processor SDK Documentation U-Boot User Guide
for how to compile the U-Boot for AM62Ax in the
U-Boot source code directory.
Target Images#
The steps above will generate the following U-Boot images.
- tiboot3.bin
Located under folder
<SDK_INSTALL_DIR>/board-support/u-boot-build/r5. This is the first stage of the boot loader running on R5F core.
- tispl.bin
Located under folder
<SDK_INSTALL_DIR>/board-support/u-boot-build/a53/. This is the first stage of the boot loader running on A53 core.- u-boot.img
Located under folder
<SDK_INSTALL_DIR>/board-support/u-boot-build/a53/. This is the second stage of the boot loader running on A53 core.
Update U-Boot on SD Card#
After the U-Boot images are generated, they can be copied to an SD card that has already been flashed with a bootable Linux image. The SD card has two partitions, boot and root. The U-Boot images should be copied to the boot partition. Insert the SD card into a card reader and plug the card reader into a Linux PC. Then, copy the U-Boot images to the card. Assuming that the SD card boot partition is mounted to /media/<username>/boot:
$ ls /media/<username>/boot tiboot3.bin tispl.bin uboot.env u-boot.img uEnv.txt $ cd <SDK_INSTALL_DIR>/board-support/u-boot-build/ $ sudo cp r5/tiboot3.bin /media/<username>/boot/ $ sudo cp a53/tispl.bin /media/<username>/boot/ $ sudo cp a53/u-boot.img /media/<username>/boot/ $ sudo umount /media/<username>/boot
Now insert the SD card into the EVM. The EVM should boot with the updated U-Boot.