1.. SPDX-License-Identifier: GPL-2.0+ 2 3U-Boot for ODROID-C2 4==================== 5 6ODROID-C2 is a single board computer manufactured by Hardkernel 7Co. Ltd with the following specifications: 8 9 - Amlogic S905 ARM Cortex-A53 quad-core SoC @ 2GHz 10 - ARM Mali 450 GPU 11 - 2GB DDR3 SDRAM 12 - Gigabit Ethernet 13 - HDMI 2.0 4K/60Hz display 14 - 40-pin GPIO header 15 - 4 x USB 2.0 Host, 1 x USB OTG 16 - eMMC, microSD 17 - Infrared receiver 18 19Schematics are available on the manufacturer website. 20 21U-Boot compilation 22------------------ 23 24.. code-block:: bash 25 26 $ export CROSS_COMPILE=aarch64-none-elf- 27 $ make odroid-c2_defconfig 28 $ make 29 30Image creation 31-------------- 32 33Amlogic doesn't provide sources for the firmware and for tools needed 34to create the bootloader image, so it is necessary to obtain them from 35the git tree published by the board vendor: 36 37.. code-block:: bash 38 39 $ DIR=odroid-c2 40 $ git clone --depth 1 \ 41 https://github.com/hardkernel/u-boot.git -b odroidc2-v2015.01 \ 42 $DIR 43 $ $DIR/fip/fip_create --bl30 $DIR/fip/gxb/bl30.bin \ 44 --bl301 $DIR/fip/gxb/bl301.bin \ 45 --bl31 $DIR/fip/gxb/bl31.bin \ 46 --bl33 u-boot.bin \ 47 $DIR/fip.bin 48 $ $DIR/fip/fip_create --dump $DIR/fip.bin 49 $ cat $DIR/fip/gxb/bl2.package $DIR/fip.bin > $DIR/boot_new.bin 50 $ $DIR/fip/gxb/aml_encrypt_gxb --bootsig \ 51 --input $DIR/boot_new.bin \ 52 --output $DIR/u-boot.img 53 $ dd if=$DIR/u-boot.img of=$DIR/u-boot.gxbb bs=512 skip=96 54 55and then write the image to SD with: 56 57.. code-block:: bash 58 59 $ DEV=/dev/your_sd_device 60 $ BL1=$DIR/sd_fuse/bl1.bin.hardkernel 61 $ dd if=$BL1 of=$DEV conv=fsync bs=1 count=442 62 $ dd if=$BL1 of=$DEV conv=fsync bs=512 skip=1 seek=1 63 $ dd if=$DIR/u-boot.gxbb of=$DEV conv=fsync bs=512 seek=97 64