amlogic: Remove ARCH= references from documentation
[oweals/u-boot.git] / board / amlogic / sei510 / README
1 U-Boot for Amlogic SEI510
2 =======================
3
4 SEI510 is a customer board manufactured by SEI Robotics with the following
5 specifications:
6
7  - Amlogic S905X2 ARM Cortex-A53 quad-core SoC
8  - 2GB DDR4 SDRAM
9  - 10/100 Ethernet (Internal PHY)
10  - 1 x USB 3.0 Host
11  - eMMC
12  - SDcard
13  - Infrared receiver
14  - SDIO WiFi Module
15
16 Currently the u-boot port supports the following devices:
17  - serial
18  - Ethernet
19  - Regulators
20  - Clock controller
21
22 u-boot compilation
23 ==================
24
25  > export CROSS_COMPILE=aarch64-none-elf-
26  > make sei510_defconfig
27  > make
28
29 Image creation
30 ==============
31
32 Amlogic doesn't provide sources for the firmware and for tools needed
33 to create the bootloader image, so it is necessary to obtain them from
34 the git tree published by the board vendor:
35
36  > wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz
37  > wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz
38  > tar xvfJ gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz
39  > tar xvfJ gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz
40  > export PATH=$PWD/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux/bin:$PWD/gcc-linaro-arm-none-eabi-4.8-2013.11_linux/bin:$PATH
41  > git clone https://github.com/BayLibre/u-boot.git -b buildroot-openlinux-20180418 amlogic-u-boot
42  > cd amlogic-u-boot
43  > make g12a_u200_v1_defconfig
44  > make
45  > export UBOOTDIR=$PWD
46
47 Download the latest Amlogic Buildroot package, and extract it :
48  > wget http://openlinux2.amlogic.com:8000/ARM/filesystem/Linux_BSP/buildroot_openlinux_kernel_4.9_fbdev_20180706.tar.gz
49  > tar xfz buildroot_openlinux_kernel_4.9_fbdev_20180706.tar.gz buildroot_openlinux_kernel_4.9_fbdev_20180706/bootloader
50  > export BRDIR=$PWD/buildroot_openlinux_kernel_4.9_fbdev_20180706
51  > export FIPDIR=$BRDIR/bootloader/uboot-repo/fip
52
53 Go back to mainline U-Boot source tree then :
54  > mkdir fip
55
56  > wget https://github.com/BayLibre/u-boot/releases/download/v2017.11-libretech-cc/blx_fix_g12a.sh -O fip/blx_fix.sh
57  > cp $UBOOTDIR/build/scp_task/bl301.bin fip/
58  > cp $UBOOTDIR/build/board/amlogic/g12a_u200_v1/firmware/acs.bin fip/
59  > cp $BRDIR/bootloader/uboot-repo/bl2/bin/g12a/bl2.bin fip/
60  > cp $BRDIR/bootloader/uboot-repo/bl30/bin/g12a/bl30.bin fip/
61  > cp $BRDIR/bootloader/uboot-repo/bl31_1.3/bin/g12a/bl31.img fip/
62  > cp $FIPDIR/g12a/ddr3_1d.fw fip/
63  > cp $FIPDIR/g12a/ddr4_1d.fw fip/
64  > cp $FIPDIR/g12a/ddr4_2d.fw fip/
65  > cp $FIPDIR/g12a/diag_lpddr4.fw fip/
66  > cp $FIPDIR/g12a/lpddr4_1d.fw fip/
67  > cp $FIPDIR/g12a/lpddr4_2d.fw fip/
68  > cp $FIPDIR/g12a/piei.fw fip/
69  > cp u-boot.bin fip/bl33.bin
70
71  > sh fip/blx_fix.sh \
72         fip/bl30.bin \
73         fip/zero_tmp \
74         fip/bl30_zero.bin \
75         fip/bl301.bin \
76         fip/bl301_zero.bin \
77         fip/bl30_new.bin \
78         bl30
79
80  > sh fip/blx_fix.sh \
81         fip/bl2.bin \
82         fip/zero_tmp \
83         fip/bl2_zero.bin \
84         fip/acs.bin \
85         fip/bl21_zero.bin \
86         fip/bl2_new.bin \
87         bl2
88
89  > $FIPDIR/g12a/aml_encrypt_g12a --bl30sig --input fip/bl30_new.bin \
90                                         --output fip/bl30_new.bin.g12a.enc \
91                                         --level v3
92  > $FIPDIR/g12a/aml_encrypt_g12a --bl3sig --input fip/bl30_new.bin.g12a.enc \
93                                         --output fip/bl30_new.bin.enc \
94                                         --level v3 --type bl30
95  > $FIPDIR/g12a/aml_encrypt_g12a --bl3sig --input fip/bl31.img \
96                                         --output fip/bl31.img.enc \
97                                         --level v3 --type bl31
98  > $FIPDIR/g12a/aml_encrypt_g12a --bl3sig --input fip/bl33.bin --compress lz4 \
99                                         --output fip/bl33.bin.enc \
100                                         --level v3 --type bl33
101  > $FIPDIR/g12a/aml_encrypt_g12a --bl2sig --input fip/bl2_new.bin \
102                                         --output fip/bl2.n.bin.sig
103  > $FIPDIR/g12a/aml_encrypt_g12a --bootmk \
104                 --output fip/u-boot.bin \
105                 --bl2 fip/bl2.n.bin.sig \
106                 --bl30 fip/bl30_new.bin.enc \
107                 --bl31 fip/bl31.img.enc \
108                 --bl33 fip/bl33.bin.enc \
109                 --ddrfw1 fip/ddr4_1d.fw \
110                 --ddrfw2 fip/ddr4_2d.fw \
111                 --ddrfw3 fip/ddr3_1d.fw \
112                 --ddrfw4 fip/piei.fw \
113                 --ddrfw5 fip/lpddr4_1d.fw \
114                 --ddrfw6 fip/lpddr4_2d.fw \
115                 --ddrfw7 fip/diag_lpddr4.fw \
116                 --level v3
117
118 and then write the image to SD with:
119
120  > DEV=/dev/your_sd_device
121  > dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
122  > dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444