How to upgrade SPI Flash from SD Boot

This wiki page describes instructions to configure a recovery image for SPI Flash and update it.
You can download a pre-built recovery image instead of building recovery image.

Release versions Release Information Downloads Note
v1.4 (2020/12/07) release note of V1.4 KR US Support all of OGS and OGA / OGA-BE
v1.3 (2020/10/13) release note of V1.3 KR US
v1.2 (2020/06/09) release note of V1.2 KR US Add support for OGA Rev1.1
v1.1 (2020/02/11) release note of v1.1 KR US Please use sd card u-boot of Feb 06, 2020
or higher version with this image.
v1.0 (2020/01/02) release note of v1.0 KR US The First Release

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

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
gcc version 6.3.1 20170109 (Linaro GCC 6.3-2017.02)

To support OGA rev1.0 / rev1.1 and ODROID-GO Super using single kernel and u-boot images,
configuration options have been updated since December 2020.
If you use u-boot after December 2020, use odroidgoa option,
if not, use odroidgo2 option.

1. Build uboot for SD boot

$ git clone https://github.com/hardkernel/u-boot.git -b odroidgoA-v2017.09
$ cd u-boot
$ make distclean
$ ./make.sh odroidgoa

2. Build uboot for SPI boot
U-Boot source repository for SPI boot is same as SD boot.
Now make bootloader images for SPI boot.

$ make distclean
$ ./make.sh odroidgoa-spi

3. Prepare a recovery image by running this script
During this process, root permission will be asked to mount a temporary file-system.

$ cd u-boot
$ ./build_recovery.sh

Then, sdcard_recovery.img will be generated in sd_fuse folder.
This image contains all related binaries for spi recovery process.

  • bootloaders for SD boot
  • a whole image of SPI flash and its md5sum
  • other necessary images

1. Write sdcard_recovery.img to a blank sd card
Check the device path of your USB card reader and write sdcard_recovery.img to your blank sd card using dd on a Linux PC.

$ sudo dd if=sd_fuse/sdcard_recovery.img of=<device/path/of/your/card> conv=fsync
$ sync

Or, flash the recovery image with Etcher.

2. Boot from SD card
Insert the SD card into the SD slot of GO Advanced board and turn power on.
Then, recovery will start automatically.
And you can see the progress on LCD display.

To check recovery image version, turn on board power without a SD Card in your board.
Then, U-BOOT version of recovery image shows at the bottom of the LCD screen.

  • odroid_go_advance/recovery_spirom.txt
  • Last modified: 2023/10/18 09:50
  • by justin