This repo contains a fork of u-boot that has been modified to boot Fuchsia.
This describes the basic build flow for a Linux x86_64 build host. You may be able to get it working with a different host machine, toolchain, build commands, etc but this is a known-working setup.
You'll need to install the compiler toolchain. Toolchain source is hosted at the links below, refer to the included docs for instructions on how to build. You may also be able to find prebuilt toolchain binaries online.
aarch64-none-elf
arm-none-eabi
Once you have the toolchain binaries, place them in an adjacent directory sdk/linaro/
, so the resulting tree looks like:
u-boot/
sdk/
linaro/
gcc-arm-none-eabi-6-2017-q2-update/
bin/
lib/
gcc-linaro-aarch64-none-elf-4.8-2013.11_linux/
bin/
lib/
The simplest way to compile u-boot is to run:
./mk g12a_estelle_bx --board_name estelle-b4 --dev
The resulting image will be at build/u-boot.bin
.
This will attempt to do some extra work that doesn't apply here, so you can ignore any errors about other bootloader components (BL2, BL31, BL32). As long as the binary was updated, the u-boot build completed successfully.