Build your own U-boot

If you want to customize your u-boot, you must build your own u-boot from the source code. Please make sure your build system is done. To build, u-boot requires a cross compiler from the build system.

The first step is to define the environment to build the u-boot, change the dir accordingly with your path.

 
 
export STAGING_DIR=~/Documents/linino_distro/staging_dir;
 
 

Clone the linino u-boot repository:

This will create the directory uboot with the linino u-boot source code.

 
 
cd uboot
 
 

Choose one of uboot\Makefile configurations and load it:

 
 
make linino-yun_config
 
 

When your configuration is done, the last step is to build the u-boot:

 
 
make CROSS_COMPILE=$STAGING_DIR/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux- ARCH=mips
 
 

When the compilation is over, you will find theu-boot.bin in the uboot directory.