Neil Armstrong | 0ce3639 | 2020-06-11 10:53:49 +0200 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
Christian Hewitt | 1181e20 | 2023-03-20 11:45:51 +0000 | [diff] [blame] | 3 | U-Boot for ODROID-C2 (S905) |
| 4 | =========================== |
Neil Armstrong | 0ce3639 | 2020-06-11 10:53:49 +0200 | [diff] [blame] | 5 | |
Christian Hewitt | 1181e20 | 2023-03-20 11:45:51 +0000 | [diff] [blame] | 6 | ODROID-C2 is a single board computer manufactured by Hardkernel with the following |
| 7 | specifications: |
Neil Armstrong | 0ce3639 | 2020-06-11 10:53:49 +0200 | [diff] [blame] | 8 | |
Christian Hewitt | 1181e20 | 2023-03-20 11:45:51 +0000 | [diff] [blame] | 9 | - Amlogic S905 ARM Cortex-A53 quad-core SoC @ 1.5GHz |
Neil Armstrong | 0ce3639 | 2020-06-11 10:53:49 +0200 | [diff] [blame] | 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 | |
Christian Hewitt | 1181e20 | 2023-03-20 11:45:51 +0000 | [diff] [blame] | 19 | Schematics are available on the manufacturer website: https://wiki.odroid.com |
Neil Armstrong | 0ce3639 | 2020-06-11 10:53:49 +0200 | [diff] [blame] | 20 | |
Christian Hewitt | 1181e20 | 2023-03-20 11:45:51 +0000 | [diff] [blame] | 21 | U-Boot Compilation |
Neil Armstrong | 0ce3639 | 2020-06-11 10:53:49 +0200 | [diff] [blame] | 22 | ------------------ |
| 23 | |
| 24 | .. code-block:: bash |
| 25 | |
| 26 | $ export CROSS_COMPILE=aarch64-none-elf- |
| 27 | $ make odroid-c2_defconfig |
| 28 | $ make |
| 29 | |
Christian Hewitt | 1181e20 | 2023-03-20 11:45:51 +0000 | [diff] [blame] | 30 | U-Boot Signing with Pre-Built FIP repo |
| 31 | -------------------------------------- |
Neil Armstrong | 0ce3639 | 2020-06-11 10:53:49 +0200 | [diff] [blame] | 32 | |
Christian Hewitt | 1181e20 | 2023-03-20 11:45:51 +0000 | [diff] [blame] | 33 | .. code-block:: bash |
Neil Armstrong | 4c60512 | 2022-03-02 10:42:22 +0100 | [diff] [blame] | 34 | |
Christian Hewitt | 1181e20 | 2023-03-20 11:45:51 +0000 | [diff] [blame] | 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: |
Neil Armstrong | 0ce3639 | 2020-06-11 10:53:49 +0200 | [diff] [blame] | 45 | |
| 46 | .. code-block:: bash |
| 47 | |
| 48 | $ DIR=odroid-c2 |
Christian Hewitt | 1181e20 | 2023-03-20 11:45:51 +0000 | [diff] [blame] | 49 | $ git clone --depth 1 https://github.com/hardkernel/u-boot.git -b odroidc2-v2015.01 $DIR |
| 50 | |
Neil Armstrong | 0ce3639 | 2020-06-11 10:53:49 +0200 | [diff] [blame] | 51 | $ $DIR/fip/fip_create --bl30 $DIR/fip/gxb/bl30.bin \ |
Christian Hewitt | 1181e20 | 2023-03-20 11:45:51 +0000 | [diff] [blame] | 52 | --bl301 $DIR/fip/gxb/bl301.bin \ |
| 53 | --bl31 $DIR/fip/gxb/bl31.bin \ |
| 54 | --bl33 u-boot.bin \ |
| 55 | $DIR/fip.bin |
| 56 | |
Neil Armstrong | 0ce3639 | 2020-06-11 10:53:49 +0200 | [diff] [blame] | 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 \ |
Christian Hewitt | 1181e20 | 2023-03-20 11:45:51 +0000 | [diff] [blame] | 60 | --input $DIR/boot_new.bin \ |
| 61 | --output $DIR/u-boot.img |
Neil Armstrong | 0ce3639 | 2020-06-11 10:53:49 +0200 | [diff] [blame] | 62 | $ dd if=$DIR/u-boot.img of=$DIR/u-boot.gxbb bs=512 skip=96 |
| 63 | |
Christian Hewitt | 1181e20 | 2023-03-20 11:45:51 +0000 | [diff] [blame] | 64 | Then write U-Boot to SD or eMMC with: |
Neil Armstrong | 0ce3639 | 2020-06-11 10:53:49 +0200 | [diff] [blame] | 65 | |
| 66 | .. code-block:: bash |
| 67 | |
Christian Hewitt | 1181e20 | 2023-03-20 11:45:51 +0000 | [diff] [blame] | 68 | $ DEV=/dev/your_boot_device |
Neil Armstrong | 0ce3639 | 2020-06-11 10:53:49 +0200 | [diff] [blame] | 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 |