U-Boot (2017.09)

To support ODROID-GO Advance rev1.0 / rev1.1 and ODROID-GO Super using single kernel and u-boot images,
configuration options have been updated since December 2020.
https://github.com/hardkernel/u-boot/commit/ac38b3f81d20b551eef5c230d7e87e7d5058e561

There are three HW revision of ODROID-GO Advance (rev 1.0), ODORID-GO Advance Black Edition (rev 1.1) and ODROID-GO Super.
Please check the following wiki page for a automatic detection logic.
HW revision detection of OGA, OGA-BE and OGS

Required packages

Before building kernel for Odroid Go advance on Ubuntu desktop, you need to install the required packages as follows.

$ sudo apt-get update &&\
sudo apt-get install -y git lzop build-essential gcc \
    bc libncurses5-dev libc6-i386 lib32stdc++6 zlib1g:i386

Toolchain (6.3.1)

Download toolchain and extract the tarball to /opt/toolchains/.

$ sudo mkdir -p /opt/toolchains &&\
wget https://releases.linaro.org/components/toolchain/binaries/6.3-2017.05/aarch64-linux-gnu/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu.tar.xz &&\
sudo tar Jxvf gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu.tar.xz -C /opt/toolchains/

To set up information for compilation, 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

Execute the below command to apply the setting.

$ source ~/.bashrc

Check the toolchain version to confirm compatibility.

$ aarch64-linux-gnu-gcc -v
...
COLLECT_LTO_WRAPPER=/opt/toolchains/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu/bin/../libexec/gcc/aarch64-linux-gnu/6.3.1/lto-wrapper
...
gcc version 6.3.1 20170109 (Linaro GCC 6.3-2017.02)

Checkout & Compile

You can checkout U-Boot source tree from Hardkernel's Github.

$ git clone https://github.com/hardkernel/u-boot.git -b odroidgoA-v2017.09

Using a script make.sh, you can configure ODROID-GO-Advanced board of U-Boot.

If you use the latest u-boot source codes of Hardkernel Github after December 2020,
use odroidgoa option.
https://github.com/hardkernel/u-boot/commit/ac38b3f81d20b551eef5c230d7e87e7d5058e561

$ cd u-boot
$ ./make.sh odroidgoa

Or with old version,

$ cd u-boot
$ ./make.sh odroidgo2


Then, you will have the following img files in sd_fuse folder.

  • idbloader.img
  • uboot.img
  • trust.img

Be careful! Please check the device path of your USB card reader before running the instruction.

We provide the script, u-boot/sd_fuse/sd_fusing.sh and this helps you to install bootloaders into your blank SD card.

  1. Plug the Boot-Device (SD card) into the USB memory CARD reader and connect the USB memory card reader to your HOST PC (Linux OS).
  2. Check the device path of your USB card reader.
  3. Run this command to flash binaries into your SD card.
$ cd sd_fuse
$ ./sd_fusing.sh <device/path/of/your/card>

Here is an example.
If a device node of your USB card reader is assigned at /dev/sdc, install command will be as following.

$ cd sd_fuse
$ ./sd_fusing.sh /dev/sdc

Here is a boot.ini sample to run the latest u-boot with odroidgoa configuration.
https://wiki.odroid.com/odroid_go_advance/os_image/ubuntu_es#bootini_for_v20

boot.ini
odroidgoa-uboot-config
 
########################################################################
# Changes made to this are overwritten every time there's a new upgrade
# To make your changes permanent change it on 
# boot.ini.default
# After changing it on boot.ini.default run the bootini command to
# rewrite this file with your personal permanent settings.
########################################################################        
 
# Boot Arguments
setenv bootargs "root=UUID='e139ce78-9841-40fe-8823-96a304a09859' rootwait rw fsck.repair=yes net.ifnames=0 fbcon=rotate:3 console=/dev/ttyFIQ0 quiet splash plymouth.ignore-serial-consoles consoleblank=0"
 
# Booting
setenv loadaddr "0x02000000"
setenv initrd_loadaddr "0x01100000"
setenv dtb_loadaddr "0x01f00000"
 
load mmc 1:1 ${loadaddr} Image
load mmc 1:1 ${initrd_loadaddr} uInitrd
 
if test ${hwrev} = 'v11'; then
load mmc 1:1 ${dtb_loadaddr} rk3326-odroidgo2-linux-v11.dtb
elif test ${hwrev} = 'v10-go3'; then
load mmc 1:1 ${dtb_loadaddr} rk3326-odroidgo3-linux.dtb
else
load mmc 1:1 ${dtb_loadaddr} rk3326-odroidgo2-linux.dtb
fi
 
booti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}
Partition start size requirement
sector bytes sector bytes
mbr 0 0 1 512 -
idbloader 1 512 8191 4M - 512 idbloader.img
uboot 16384 8M 8192 4M uboot.mg
trust 24576 12M 8192 4M trust.img
vfat 32768 16M 229376 112M /dev/mmcblk1p1
rootfs 262144 128M - - /dev/mmcblk1p2