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

From Variscite Wiki

U-Boot

In AM437x 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 SD/eMMC devices.

Building U-Boot out-of-tree

Downloading source code

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

$ mkdir ~/varsomam43
$ cd ~/varsomam43
$ git clone https://github.com/varigit/u-boot-VAR-SOM-AMxx.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 SD card:
$ cd u-boot-VAR-SOM-AMxx
$ git checkout krogoth
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- varsomam43_config
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- 
  • U-boot variant to boot from eMMC:
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- varsomam43_emmc_config
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
  • U-boot variant to boot from NAND:
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- varsomam43_nand_config
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

U-Boot Environment Settings

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