Click one of the site to download toolchain to build U-boot. Please note that this toolchain is for U-boot, there is another toolchain to build Linux kernel.
Once the download is done, extract the tarball to /opt/toolchains/.
If the '/opt/toolchains' directory does not exist in host pc, then create the directory.
$ sudo mkdir -p /opt/toolchains $ sudo tar jxf gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux.tar.bz2 -C /opt/toolchains/
In order to add the toolchain path to PATH, paste below lines to $HOME/.bashrc.
export PATH=/opt/toolchains/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin:$PATH export CROSS_COMPILE=arm-linux-gnueabihf-
You can apply the change if you login again or import to apply this change, login again or evaluate $HOME/.bashrc with source command.
$ source ~/.bashrc
You can check if the toolchain installed above works properly while checking the version of toolchain. If you can find gcc version 4.7.3 at the end of the line, the toolchain is well installed.
$ arm-linux-gnueabihf-gcc -v COLLECT_LTO_WRAPPER=/opt/toolchain/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/../libexec/gcc/arm-linux-gnueabihf/4.7.3/lto-wrapper Target: arm-linux-gnueabihf Configured with: /cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/src/gcc-linaro-4.7-2013.04/configure --build=i686-build_pc- linux-gnu --host=i686-build_pc-linux-gnu --target=arm-linux-gnueabihf --prefix=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/install - -with-sysroot=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/install/arm-linux-gnueabihf/libc --enable-languages=c,c++,fortran -- enable-multilib --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=vfpv3-d16 --with-float=hard --with-pkgversion='crosstool-NG linaro-1.13.1-4.7-2013.04- 20130415 - Linaro GCC 2013.04' --with-bugurl=https://bugs.launchpad.net/gcc-linaro --enable-__cxa_atexit --enable-libmudflap --enable-libgomp --enable- libssp --with-gmp=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with- mpfr=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-mpc=/cbuild/slaves/oorts/crosstool- ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-ppl=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf- linux/.build/arm-linux-gnueabihf/build/static --with-cloog=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux- gnueabihf/build/static --with-libelf=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with- host-libstdcxx='-L/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static/lib -lpwl' --enable- threads=posix --disable-libstdcxx-pch --enable-linker-build-id --enable-gold --with-local-prefix=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux- gnueabihf-linux/install/arm-linux-gnueabihf/libc --enable-c99 --enable-long-long --with-mode=thumb Thread model: posix gcc version 4.7.3 20130328 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC 2013.04)gcc version 4.4.3 (GCC)
You can checkout U-boot source tree from Hardkernel's Github.
$ git clone https://github.com/hardkernel/u-boot.git -b odroidxu3-v2012.07
Before you compile U-boot, you must configure for ODROID-XU3 with following command.
$ cd u-boot $ make odroid_config
And finally you can compile U-boot.
$ make
Then you can start to build u-boot image, u-boot.bin. This will create u-boot/u-boot.bin. You can also add -j option for fast compile.
ODROID-XU3/4 must have the secure boot enabled boot loader. There are four components of boot loader bl1.bin.HardKernel, bl2.bin.HardKernel, u-boot.bin and tzsw.bin.HardKernel)
u-boot.bin file can be generated by u-boot source code. But bl1.bin.HardKernel, bl2.bin.HardKernel and tzsw.bin.HardKernel blobs can be found in u-boot/sd_fuse/hardkernel directory.
We provide the script, sd_fuse/hardkernel/sd_fusing.sh, this helps you to install the bootloader into your blank card MicroSD.
$ cd sd_fuse/hardkernel $ ./sd_fusing.sh <device/path/of/your/card>
If you can boot your ODROID-XU3/4 already and want to install a new u-boot.bin built by you. Fastboot helps you to install a u-boot.bin into your board.
u-boot.bin install
$ sudo fastboot flash bootloader u-boot.bin
bl1.bin install
$ sudo fastboot flash fwbl1 sd_fuse/hardkernel/bl1.bin.hardKernel
bl2.bin install
$ sudo fastboot flash bl2 sd_fuse/hardkernel/bl2.bin.hardKernel
tzsw.bin install
$ sudo fastboot flash tzsw sd_fuse/hardkernel/tzsw.bin.hardKernel
If installation is done, you care reboot your ODROID-XU3 with fastboot.
$ sudo fastboot reboot
You also can update U-boot from Linux with dd command. After building U-boot, copy u-boot.bin into your ODROID-XU3/4. Then do the command below in order to flash your U-boot image to MicroSD.
$ sudo dd if=u-boot.bin of=<device/path/of/your/card> seek=63 $ sudo sync