4 RK3399 key features we might use in U-Boot:
5 * CPU: ARMv8 64bit Big-Little architecture,
6 * Big: dual-core Cortex-A72
7 * Little: quad-core Cortex-A53
9 * DRAM: 4GB-128MB dual-channel
10 * eMMC: support eMMC 5.0/5.1, suport HS400, HS200, DDR50
11 * SD/MMC: support SD 3.0, MMC 4.51
12 * USB: USB3.0 typc-C port *2 with dwc3 controller
13 * USB2.0 EHCI host port *2
14 * Display: RGB/HDMI/DP/MIPI/EDP
17 * regulator: pwm regulator for CPU B/L
19 * debug console: UART2
21 In order to support Arm Trust Firmware(ATF), we can use either SPL or
22 miniloader from rockchip to do:
24 * load and verify ATF image
25 * load and verify U-Boot image
27 Here is the step-by-step to boot to U-Boot on rk3399.
29 Get the Source and prebuild binary
30 ==================================
34 > git clone https://github.com/ARM-software/arm-trusted-firmware.git
35 > git clone https://github.com/rockchip-linux/rkbin.git
36 > git clone https://github.com/rockchip-linux/rkdeveloptool.git
42 > cd arm-trusted-firmware
44 > make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399 bl31
46 Get bl31.elf in this step, copy it to U-Boot root dir:
47 > cp build/rk3399/release/bl31/bl31.elf ../u-boot/
49 Or you can get the bl31.elf directly from Rockchip:
50 > cp rkbin/rk33/rk3399_bl31_v1.00.elf ../u-boot/bl31.elf
58 > export CROSS_COMPILE=aarch64-linux-gnu-
59 > make evb-rk3399_defconfig
60 for firefly-rk3399, use below instead:
61 > make firefly-rk3399_defconfig
65 Get spl/u-boot-spl.bin and u-boot.itb in this step.
70 Get rkdeveloptool installed on your Host in this step.
72 Follow instructions in latest README, example:
79 Both origin binaries and Tool are ready now, choose either option 1 or
80 option 2 to deploy U-Boot.
85 Package the image for U-Boot SPL(option 1)
86 --------------------------------
88 > tools/mkimage -n rk3399 -T rksd -d spl/u-boot-spl.bin idbspl.img
90 Get idbspl.img in this step.
92 Package the image for Rockchip miniloader(option 2)
93 ------------------------------------------
95 > cp arm-trusted-firmware/build/rk3399/release/bl31.elf rkbin/rk33
96 > ./rkbin/tools/trust_merger rkbin/tools/RK3399TRUST.ini
97 > ./rkbin/tools/loaderimage --pack --uboot u-boot/u-boot-dtb.bin uboot.img
99 Get trust.img and uboot.img in this step.
101 Flash the image to eMMC
102 =======================
104 Flash the image with U-Boot SPL(option 1)
105 -------------------------------
106 Power on(or reset with RESET KEY) with MASKROM KEY preesed, and then:
107 > rkdeveloptool db rkbin/rk33/rk3399_loader_v1.08.106.bin
108 > rkdeveloptool wl 64 u-boot/idbspl.img
109 > rkdeveloptool wl 0x4000 u-boot/u-boot.itb
112 Flash the image with Rockchip miniloader(option 2)
113 ----------------------------------------
114 Power on(or reset with RESET KEY) with MASKROM KEY preesed, and then:
115 > rkdeveloptool db rkbin/rk33/rk3399_loader_v1.08.106.bin
116 > rkdeveloptool ul rkbin/rk33/rk3399_loader_v1.08.106.bin
117 > rkdeveloptool wl 0x4000 u-boot/uboot.img
118 > rkdeveloptool wl 0x6000 u-boot/trust.img
121 You should be able to get U-Boot log in console/UART2(baurdrate 1500000)
122 For more detail, please reference to:
123 http://opensource.rock-chips.com/wiki_Boot_option