u-boot bootloader
Compile u-boot in the build/ directory using
the workspace container by defining an appropriate
${dir}/u-boot.cfg file and targeting build/${dir}/u-boot/install.
u-boot Kconfig build configuration
The .config target is the Kbuild configuration containing options
set for the u-boot build.
This file is generated using scripts/kconfig/merge_config.sh from the
u-boot source, which combines the defconfig and *.kconfig fragments.
- Target:
build/${dir}/u-boot/.config - Required dependencies:
${dir}/u-boot.cfg- See Configuration file.
- Optional dependencies:
*.kconfig- Fragments of Kconfig configuration that get merged into the defconfig, if specified asDEFCONFIGinu-boot.cfg. If no defconfig is specified, the*.kconfigfragments are merged to create the complete.config.
- Built dependencies:
build/${dir}/u-boot.src- The sentinel file generated when the u-boot source code is downloaded tobuild/${dir}/u-bootusing one of the file fetching rules.
Build u-boot
The install target is the destination directory that the bootloader
files are installed to when they are built.
The files generated depend on the target platform and configuration.
- Target:
build/${dir}/u-boot/install - Required dependencies:
${dir}/u-boot.cfg- See Configuration file.
- Built dependencies:
build/${dir}/u-boot.src- The sentinel file generated when the u-boot source code is downloaded tobuild/${dir}/u-bootusing one of the file fetching rules.build/${dir}/u-boot/.config- The target of the u-boot Kconfig build configuration rule.
Configuration file
The following options are valid in the ${dir}/u-boot.cfg configuration file.
ARCH- Required - The architecture of the target platform's CPU.CROSS_COMPILE- Required - The binutils toolchain prefix for selecting the correct cross-compiling gcc/ld/etc binaries for the target platform. Equivalent to theCROSS_COMPILEenvironment variable when building u-boot manually. Note that the toolchains available to the u-boot build are those in the workspace container.DEFCONFIG- Optional - The stem of the platform's defconfig file, e.g.sunxifor theorangepi_oneavailable for the ARM architecture. Equivalent tomake ${platform}_defconfigin u-boot's build system.INSTALL_FILENAMES- Optional - A space-separated list of filenames of the build artifacts that will be copied from the build directorybuild/${dir}/u-bootto the install target directorybuild/${dir}/u-boot/install. Default:u-boot.bin.
Note
The interactive workspace shell can used to discover the available
toolchains to use for the CROSS_COMPILE prefix.
For example:
$ make shell CMD=bash
/workspace$ compgen -c | grep '\-gcc$' | sort | uniq
aarch64-linux-gnu-gcc
arm-linux-gnueabi-gcc
c89-gcc
c99-gcc
x86_64-linux-gnu-gcc
x86_64-linux-gnux32-gcc