VAR-SOM-AM33 Yocto Krogoth Build u-boot out of tree

From Variscite Wiki

U-Boot

In AM335x the ROM code serves as the 1st stage bootloader. The 2nd and the 3rd stage bootloaders are based on U-Boot.

The binary for the 2nd stage is referred to as SPL (MLO) and the binary for the 3rd stage as simply U-Boot. SPL is a non-interactive loader and is a built from the u-boot tree.

The ROM code can load the SPL image from the NAND or SDMMC devices.

Building U-Boot out-of-tree

Downloading source code

First, clone the git repositories to a local directory, as follows:

$ mkdir ~/varsomam33
$ cd ~/varsomam33
$ git clone git://github.com/varigit/u-boot-VAR-SOM-AM33-SDK7.git

Setup Toolchain path

$ export PATH=/opt/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabihf/bin:$PATH

Building U-boot

  • U-boot variant to boot from NAND flash:
$ cd u-boot-VAR-SOM-AM33-SDK7
$ git checkout krogoth
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- var-som-am33
  • U-boot variant to boot from SD-Card:
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- var-som-am33-sd

U-Boot Environment Settings

The VAR-SOM-AM33 U-Boot has default environment settings that boot from NAND, SD/MMC card and Ethernet.