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