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