We're no longer updating This wiki!!

U-boot

Toolchain

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) 

Checkout & compile

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.

Installation

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.

  • If you don't change the early hardware initialization (DRAM/KVM init), just update the u-boot.bin. The u-boot.bin doesn't need the signing process.
  • bl2.bin.HardKernel/bl1.bin.hardkernel/tzsw.bin.hardkernel can be supplied as a binary format due to Samsung's policy.
  • You need to sign the bl2.bin with Hardkernel's private key to make it bootable.
  • If you want to contribute your patch, apply it to our u-boot github admin. Or, contact “odroid.uboot@gmail.com”
  • And we will publically release the signed bl2 image within 48 hours if there is any update.
  • To flash the updated images on your MicroSD card, refer the scriptor file sd_fusing.sh in sd_fuse/hardkernel directory.
  • To update the boot loader area in the eMMC, must use the Fastboot Tool.
  • If the boot loader area is corrupted, use the eMMC Recovery process.
  • For eMMC update, you need a fastboot driver and micro-USB cable.

Installation to blank card

We provide the script, sd_fuse/hardkernel/sd_fusing.sh, this helps you to install the bootloader into your blank card MicroSD.

  1. Insert your card to USB card reader and attach to USB host port of your desktop.
  2. Check the device path of your USB card reader.
  3. Install the bootloader binaries using sd_fuse/hardkernel/sd_fusing.sh.
$ cd sd_fuse/hardkernel
$ ./sd_fusing.sh <device/path/of/your/card>

Installation using fastboot

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

Updating from Linux

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
en/xu3_building_u-boot.txt · Last modified: 2017/03/27 07:26 by odroid
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0