3.1.1.2. Build
3.1.1.2.1. Build U-Boot
Note
The following commands are intended to be run from the root of the U-Boot tree unless otherwise specified. The root of the U-Boot tree is the top-level directory and can be identified by looking for the “MAINTAINERS” file.
We strongly recommend the use of separate object directories when building. This is done with O= parameter to make. We also recommend that you use an output directory name that is identical to the configuration target name. That way if you are working with multiple configuration targets it is very easy to know which folder contains the u-boot binaries that you are interested in.
Setting the tool chain path
We strongly recommend using the toolchain that came with the Linux Core release that corresponds to this U-Boot release. For e.g:
$ export PATH=$HOME/<TOOLCHAIN_PATH>/bin:$PATH
Cleaning the Sources
If you did not use a separate object directory:
$ make CROSS_COMPILE=arm-none-linux-gnueabihf- distclean
If you used O=am335x_evm as your object directory:
$ rm -rf ./am335x_evm
Compiling MLO and u-boot
Building of both u-boot and SPL is done at the same time. You must however first configure the build for the board you are working with. Use the following table to determine what defconfig to use to configure with:
Board |
SD Boot |
eMMC Boot |
NAND Boot |
UART Boot |
Ethernet Boot |
USB Ethernet Boot |
USB Host Boot |
SPI Boot |
|---|---|---|---|---|---|---|---|---|
AM335x GP EVM |
|
|
|
|
|
|||
AM335x EVM-SK |
|
|
|
|||||
AM335x ICE |
|
|
||||||
BeagleBone Green ECO |
|
|
|
|||||
BeagleBone Black |
|
|
|
|||||
BeagleBone White |
|
|
||||||
AM437x GP EVM |
|
|
|
|
|
|
||
AM437x EVM-Sk |
|
|
||||||
AM437x IDK |
|
|
||||||
AM437x ePOS EVM |
|
|
|
|||||
AM572x GP EVM |
|
|
||||||
AM572x IDK |
|
|||||||
AM571x IDK |
|
|||||||
DRA74x/DRA72x/DRA71x EVM |
|
|
|
|
||||
K2HK EVM |
|
|
|
|
||||
K2L EVM |
|
|
|
|||||
K2E EVM |
|
|
|
|||||
K2G GP EVM |
|
|
|
|
||||
K2G ICE |
|
|||||||
OMAP-L138 LCDK |
|
|
Then (Use am335x_evm and ‘AM335x GP EVM’ in this example):
$ make CROSS_COMPILE=arm-none-linux-gnueabihf- O=am335x_evm am335x_evm_defconfig
$ make CROSS_COMPILE=arm-none-linux-gnueabihf- O=am335x_evm
Note
Not all possible build targets for a given platform are listed
here as the community has additional build targets that are not
supported by TI. To find these read the boards.cfg file and look for
the build target listed above. And please note that the main config file
will leverage other files under include/configs, as seen by #include
statements.