Merge branch 'for-2023.07' of https://source.denx.de/u-boot/custodians/u-boot-mpc8xx
[platform/kernel/u-boot.git] / doc / board / amlogic / odroid-c2.rst
1 .. SPDX-License-Identifier: GPL-2.0+
2
3 U-Boot for ODROID-C2 (S905)
4 ===========================
5
6 ODROID-C2 is a single board computer manufactured by Hardkernel with the following
7 specifications:
8
9  - Amlogic S905 ARM Cortex-A53 quad-core SoC @ 1.5GHz
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
19 Schematics are available on the manufacturer website: https://wiki.odroid.com
20
21 U-Boot Compilation
22 ------------------
23
24 .. code-block:: bash
25
26     $ export CROSS_COMPILE=aarch64-none-elf-
27     $ make odroid-c2_defconfig
28     $ make
29
30 U-Boot Signing with Pre-Built FIP repo
31 --------------------------------------
32
33 .. 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
40 U-Boot Manual Signing
41 ---------------------
42
43 Amlogic does not provide sources for the firmware and tools needed to create a bootloader
44 image so it is necessary to obtain binaries from sources published by the board vendor:
45
46 .. code-block:: bash
47
48     $ DIR=odroid-c2
49     $ git clone --depth 1 https://github.com/hardkernel/u-boot.git -b odroidc2-v2015.01 $DIR
50
51     $ $DIR/fip/fip_create --bl30  $DIR/fip/gxb/bl30.bin \
52                           --bl301 $DIR/fip/gxb/bl301.bin \
53                           --bl31  $DIR/fip/gxb/bl31.bin \
54                           --bl33  u-boot.bin \
55                           $DIR/fip.bin
56
57     $ $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 \
60                                    --input $DIR/boot_new.bin \
61                                    --output $DIR/u-boot.img
62     $ dd if=$DIR/u-boot.img of=$DIR/u-boot.gxbb bs=512 skip=96
63
64 Then write U-Boot to SD or eMMC with:
65
66 .. code-block:: bash
67
68     $ DEV=/dev/your_boot_device
69     $ 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