blob: 922ab0c0b408be11b2d89d0de8e882819c4e083b [file] [log] [blame]
Neil Armstrong84e5e8e2020-06-11 10:53:49 +02001.. SPDX-License-Identifier: GPL-2.0+
2
Christian Hewitt074f8182023-03-20 11:45:51 +00003U-Boot for ODROID-C2 (S905)
4===========================
Neil Armstrong84e5e8e2020-06-11 10:53:49 +02005
Christian Hewitt074f8182023-03-20 11:45:51 +00006ODROID-C2 is a single board computer manufactured by Hardkernel with the following
7specifications:
Neil Armstrong84e5e8e2020-06-11 10:53:49 +02008
Christian Hewitt074f8182023-03-20 11:45:51 +00009 - Amlogic S905 ARM Cortex-A53 quad-core SoC @ 1.5GHz
Neil Armstrong84e5e8e2020-06-11 10:53:49 +020010 - 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
Christian Hewitt074f8182023-03-20 11:45:51 +000019Schematics are available on the manufacturer website: https://wiki.odroid.com
Neil Armstrong84e5e8e2020-06-11 10:53:49 +020020
Christian Hewitt074f8182023-03-20 11:45:51 +000021U-Boot Compilation
Neil Armstrong84e5e8e2020-06-11 10:53:49 +020022------------------
23
24.. code-block:: bash
25
26 $ export CROSS_COMPILE=aarch64-none-elf-
27 $ make odroid-c2_defconfig
28 $ make
29
Christian Hewitt074f8182023-03-20 11:45:51 +000030U-Boot Signing with Pre-Built FIP repo
31--------------------------------------
Neil Armstrong84e5e8e2020-06-11 10:53:49 +020032
Christian Hewitt074f8182023-03-20 11:45:51 +000033.. code-block:: bash
34
35 $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1
36 $ cd amlogic-boot-fip
37 $ mkdir my-output-dir
38 $ ./build-fip.sh odroid-c2 /path/to/u-boot/u-boot.bin my-output-dir
39
40U-Boot Manual Signing
41---------------------
Neil Armstrong2ea98682022-03-02 10:42:22 +010042
Christian Hewitt074f8182023-03-20 11:45:51 +000043Amlogic does not provide sources for the firmware and tools needed to create a bootloader
44image so it is necessary to obtain binaries from sources published by the board vendor:
Neil Armstrong84e5e8e2020-06-11 10:53:49 +020045
46.. code-block:: bash
47
48 $ DIR=odroid-c2
Christian Hewitt074f8182023-03-20 11:45:51 +000049 $ git clone --depth 1 https://github.com/hardkernel/u-boot.git -b odroidc2-v2015.01 $DIR
50
Neil Armstrong84e5e8e2020-06-11 10:53:49 +020051 $ $DIR/fip/fip_create --bl30 $DIR/fip/gxb/bl30.bin \
Christian Hewitt074f8182023-03-20 11:45:51 +000052 --bl301 $DIR/fip/gxb/bl301.bin \
53 --bl31 $DIR/fip/gxb/bl31.bin \
54 --bl33 u-boot.bin \
55 $DIR/fip.bin
56
Neil Armstrong84e5e8e2020-06-11 10:53:49 +020057 $ $DIR/fip/fip_create --dump $DIR/fip.bin
58 $ cat $DIR/fip/gxb/bl2.package $DIR/fip.bin > $DIR/boot_new.bin
59 $ $DIR/fip/gxb/aml_encrypt_gxb --bootsig \
Christian Hewitt074f8182023-03-20 11:45:51 +000060 --input $DIR/boot_new.bin \
61 --output $DIR/u-boot.img
Neil Armstrong84e5e8e2020-06-11 10:53:49 +020062 $ dd if=$DIR/u-boot.img of=$DIR/u-boot.gxbb bs=512 skip=96
63
Christian Hewitt074f8182023-03-20 11:45:51 +000064Then write U-Boot to SD or eMMC with:
Neil Armstrong84e5e8e2020-06-11 10:53:49 +020065
66.. code-block:: bash
67
Christian Hewitt074f8182023-03-20 11:45:51 +000068 $ DEV=/dev/your_boot_device
Neil Armstrong84e5e8e2020-06-11 10:53:49 +020069 $ BL1=$DIR/sd_fuse/bl1.bin.hardkernel
70 $ dd if=$BL1 of=$DEV conv=fsync bs=1 count=442
71 $ dd if=$BL1 of=$DEV conv=fsync bs=512 skip=1 seek=1
72 $ dd if=$DIR/u-boot.gxbb of=$DEV conv=fsync bs=512 seek=97