Neil Armstrong | 84e5e8e | 2020-06-11 10:53:49 +0200 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
| 3 | U-Boot for ODROID-C2 |
| 4 | ==================== |
| 5 | |
| 6 | ODROID-C2 is a single board computer manufactured by Hardkernel |
| 7 | Co. 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 | |
| 19 | Schematics are available on the manufacturer website. |
| 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 | Image creation |
| 31 | -------------- |
| 32 | |
Neil Armstrong | 2ea9868 | 2022-03-02 10:42:22 +0100 | [diff] [blame] | 33 | For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `odroid-c2` |
| 34 | |
Neil Armstrong | 84e5e8e | 2020-06-11 10:53:49 +0200 | [diff] [blame] | 35 | Amlogic doesn't provide sources for the firmware and for tools needed |
| 36 | to create the bootloader image, so it is necessary to obtain them from |
| 37 | the git tree published by the board vendor: |
| 38 | |
| 39 | .. code-block:: bash |
| 40 | |
| 41 | $ DIR=odroid-c2 |
| 42 | $ git clone --depth 1 \ |
| 43 | https://github.com/hardkernel/u-boot.git -b odroidc2-v2015.01 \ |
| 44 | $DIR |
| 45 | $ $DIR/fip/fip_create --bl30 $DIR/fip/gxb/bl30.bin \ |
| 46 | --bl301 $DIR/fip/gxb/bl301.bin \ |
| 47 | --bl31 $DIR/fip/gxb/bl31.bin \ |
| 48 | --bl33 u-boot.bin \ |
| 49 | $DIR/fip.bin |
| 50 | $ $DIR/fip/fip_create --dump $DIR/fip.bin |
| 51 | $ cat $DIR/fip/gxb/bl2.package $DIR/fip.bin > $DIR/boot_new.bin |
| 52 | $ $DIR/fip/gxb/aml_encrypt_gxb --bootsig \ |
| 53 | --input $DIR/boot_new.bin \ |
| 54 | --output $DIR/u-boot.img |
| 55 | $ dd if=$DIR/u-boot.img of=$DIR/u-boot.gxbb bs=512 skip=96 |
| 56 | |
| 57 | and then write the image to SD with: |
| 58 | |
| 59 | .. code-block:: bash |
| 60 | |
| 61 | $ DEV=/dev/your_sd_device |
| 62 | $ BL1=$DIR/sd_fuse/bl1.bin.hardkernel |
| 63 | $ dd if=$BL1 of=$DEV conv=fsync bs=1 count=442 |
| 64 | $ dd if=$BL1 of=$DEV conv=fsync bs=512 skip=1 seek=1 |
| 65 | $ dd if=$DIR/u-boot.gxbb of=$DEV conv=fsync bs=512 seek=97 |