Merge tag 'signed-efi-next' of git://github.com/agraf/u-boot
[oweals/u-boot.git] / board / theobroma-systems / lion_rk3368 / README
1 Here is the step-by-step to boot to U-Boot on RK3368-uQ7
2
3 Get the Source and build ATF
4 ============================
5
6   > git clone git://git.theobroma-systems.com/arm-trusted-firmware.git
7   > cd arm-trusted-firmware
8   > make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3368 bl31
9   > cp build/rk3368/release/bl31.bin ../u-boot/bl31-rk3368.bin
10
11 Configure U-Boot
12 ================
13
14   > cd ../u-boot
15   > make lion-rk3368_defconfig
16
17 Build the TPL/SPL stage
18 =======================
19
20   > make CROSS_COMPILE=aarch64-unknown-elf- ARCH=arm
21   > tools/mkimage -n rk3368 -T rksd -d tpl/u-boot-tpl.bin spl-3368.img
22   > cat spl/u-boot-spl-dtb.bin >> spl-3368.img
23
24 Build the full U-Boot and a FIT image including the ATF
25 =======================================================
26
27   > make CROSS_COMPILE=aarch64-unknown-elf- ARCH=arm u-boot.itb
28
29 Flash the image
30 ===============
31
32 Copy the SPL to offset 32k and the FIT image containing the payloads
33 (U-Boot proper, ATF, devicetree) to offset 256k card.
34
35 SD-Card
36 -------
37
38   > dd if=spl-3368.img of=/dev/sdb seek=64
39   > dd if=u-boot.itb of=/dev/sdb seek=512
40
41 eMMC
42 ----
43
44 rkdeveloptool allows to flash the on-board eMMC via the USB OTG interface with
45 help of the Rockchip loader binary.
46
47   > git clone https://github.com/rockchip-linux/rkdeveloptool
48   > cd rkdeveloptool
49   > autoreconf -i && && ./configure && make
50   > git clone https://github.com/rockchip-linux/rkbin.git
51   > ./rkdeveloptool db rkbin/rk33/rk3368_loader_v2.00.256.bin
52   > ./rkdeveloptool wl 64 ../spl.img
53   > ./rkdeveloptool wl 512 ../u-boot.itb
54
55
56 If everything went according to plan, you should see the following
57 output on UART0:
58
59 <debug_uart> U-Boot TPL board init
60 Trying to boot from BOOTROM
61 Returning to boot ROM...
62 Trying to boot from MMC1
63 NOTICE:  BL31: v1.3(release):v1.2-1320-gbf43a443
64 NOTICE:  BL31: Built : 18:04:47, Jul  5 2017
65
66
67 U-Boot 2017.07-00158-g2395e99858 (Jul 18 2017 - 21:03:31 +0200)
68
69 Model: Theobroma Systems RK3368-uQ7 SoM
70 DRAM:  2 GiB
71 MMC:   dwmmc@ff0c0000: 1, dwmmc@ff0f0000: 0
72 Using default environment
73
74 In:    serial@ff180000
75 Out:   serial@ff180000
76 Err:   serial@ff180000
77 Net:
78 Warning: ethernet@ff290000 (eth0) using random MAC address - d2:69:35:7e:d0:1e
79 eth0: ethernet@ff290000
80 Hit any key to stop autoboot:  2