4 ODROID-N2 is a single board computer manufactured by Hardkernel
5 Co. Ltd with the following specifications:
7 - Amlogic S922X ARM Cortex-A53 dual-core + Cortex-A73 quad-core SoC
10 - HDMI 2.1 4K/60Hz display
12 - 4 x USB 3.0 Host, 1 x USB OTG
16 Schematics are available on the manufacturer website.
18 Currently the u-boot port supports the following devices:
32 > export CROSS_COMPILE=aarch64-none-elf-
33 > make odroid-n2_defconfig
39 Amlogic doesn't provide sources for the firmware and for tools needed
40 to create the bootloader image, so it is necessary to obtain them from
41 the git tree published by the board vendor:
43 > wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz
44 > wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz
45 > tar xvfJ gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz
46 > tar xvfJ gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz
47 > export PATH=$PWD/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux/bin:$PWD/gcc-linaro-arm-none-eabi-4.8-2013.11_linux/bin:$PATH
50 > git clone --depth 1 \
51 https://github.com/hardkernel/u-boot.git -b odroidn2-v2015.01 \
55 > make odroidn2_defconfig
57 > export UBOOTDIR=$PWD
59 Go back to mainline U-Boot source tree then :
62 > wget https://github.com/BayLibre/u-boot/releases/download/v2017.11-libretech-cc/blx_fix_g12a.sh -O fip/blx_fix.sh
63 > cp $UBOOTDIR/build/scp_task/bl301.bin fip/
64 > cp $UBOOTDIR/build/board/hardkernel/odroidn2/firmware/acs.bin fip/
65 > cp $UBOOTDIR/fip/g12b/bl2.bin fip/
66 > cp $UBOOTDIR/fip/g12b/bl30.bin fip/
67 > cp $UBOOTDIR/fip/g12b/bl31.img fip/
68 > cp $UBOOTDIR/fip/g12b/ddr3_1d.fw fip/
69 > cp $UBOOTDIR/fip/g12b/ddr4_1d.fw fip/
70 > cp $UBOOTDIR/fip/g12b/ddr4_2d.fw fip/
71 > cp $UBOOTDIR/fip/g12b/diag_lpddr4.fw fip/
72 > cp $UBOOTDIR/fip/g12b/lpddr4_1d.fw fip/
73 > cp $UBOOTDIR/fip/g12b/lpddr4_2d.fw fip/
74 > cp $UBOOTDIR/fip/g12b/piei.fw fip/
75 > cp $UBOOTDIR/fip/g12b/aml_ddr.fw fip/
76 > cp u-boot.bin fip/bl33.bin
96 > $UBOOTDIR/fip/g12b/aml_encrypt_g12b --bl30sig --input fip/bl30_new.bin \
97 --output fip/bl30_new.bin.g12a.enc \
99 > $UBOOTDIR/fip/g12b/aml_encrypt_g12b --bl3sig --input fip/bl30_new.bin.g12a.enc \
100 --output fip/bl30_new.bin.enc \
101 --level v3 --type bl30
102 > $UBOOTDIR/fip/g12b/aml_encrypt_g12b --bl3sig --input fip/bl31.img \
103 --output fip/bl31.img.enc \
104 --level v3 --type bl31
105 > $UBOOTDIR/fip/g12b/aml_encrypt_g12b --bl3sig --input fip/bl33.bin --compress lz4 \
106 --output fip/bl33.bin.enc \
107 --level v3 --type bl33 --compress lz4
108 > $UBOOTDIR/fip/g12b/aml_encrypt_g12b --bl2sig --input fip/bl2_new.bin \
109 --output fip/bl2.n.bin.sig
110 > $UBOOTDIR/fip/g12b/aml_encrypt_g12b --bootmk \
111 --output fip/u-boot.bin \
112 --bl2 fip/bl2.n.bin.sig \
113 --bl30 fip/bl30_new.bin.enc \
114 --bl31 fip/bl31.img.enc \
115 --bl33 fip/bl33.bin.enc \
116 --ddrfw1 fip/ddr4_1d.fw \
117 --ddrfw2 fip/ddr4_2d.fw \
118 --ddrfw3 fip/ddr3_1d.fw \
119 --ddrfw4 fip/piei.fw \
120 --ddrfw5 fip/lpddr4_1d.fw \
121 --ddrfw6 fip/lpddr4_2d.fw \
122 --ddrfw7 fip/diag_lpddr4.fw \
123 --ddrfw8 fip/aml_ddr.fw \
126 and then write the image to SD with:
128 > DEV=/dev/your_sd_device
129 > dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
130 > dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444