U-boot

You will need install required packages before you start to build Linux kernel on your Ubuntu desktop.

$ sudo apt update
$ sudo apt install git
$ sudo apt install u-boot-tools device-tree-compiler

Click one of the site to download toolchain to build U-boot.

$ sudo mkdir -p /opt/toolchains
$ sudo tar xvf gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu.tar.xz -C /opt/toolchains/

In order to add the toolchain path to PATH, paste below lines to $HOME/.bashrc.

export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
export PATH=/opt/toolchains/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/:$PATH

Toolchain Environment

#!/bin/bash
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
 
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
export PATH=/opt/toolchains/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/:$PATH
  • If you don't set CROSS_COMPILE correctly, you can encounter the following build error.
Your GCC is older than 6.0 and will not be supported starting in v2018.01.
.....
.....
cc1: warning: unknown register name: x18
lib/asm-offsets.c:1:0: error: bad value (armv8-a) for -march= switch

Linux

Checkout

You can checkout U-boot source tree from Hardkernel internal github.

$ git clone https://github.com/hardkernel/u-boot -b odroidn1-v2017.07
Build
$ cd u-boot
$ make distclean
$ ./build.sh

Android

Checkout

You can checkout U-boot source tree from Hardkernel internal github.

$ git clone https://github.com/hardkernel/u-boot -b odroidn1-v2017.07-android
Build
$ cd u-boot
$ make odroidn1_defconfig
$ make
$ cd sd_fuse
$ ./sd_fusing.sh <device/path/of/your/card>