blob: a8dcc40f09bf7d7d75219670aef852034c1b302e [file] [log] [blame]
Kever Yange969f912019-04-02 20:41:28 +08001Get the Source and prebuild binary
2==================================
3
4 > mkdir ~/evb_rk3229
5 > cd ~/evb_rk3229
6 > git clone git://git.denx.de/u-boot.git
7 > git clone https://github.com/OP-TEE/optee_os.git
8 > git clone https://github.com/rockchip-linux/rkbin.git
9 > git clone https://github.com/rockchip-linux/rkdeveloptool.git
10
11Compile the OP-TEE
12===============
13
14 > cd optee_os
15 > make clean
Alex Bee6779a142023-07-18 16:57:14 +020016 > make CROSS_COMPILE=arm-none-eabi- PLATFORM=rockchip-rk322x
17 Get tee-raw.bin in this step, copy it to U-Boot root dir:
18 > cp out/arm-plat-rockchip/core/tee-raw.bin ../u-boot/tee.bin
Kever Yange969f912019-04-02 20:41:28 +080019
20Compile the U-Boot
21==================
22
23 > cd ../u-boot
Kever Yange969f912019-04-02 20:41:28 +080024 > make evb-rk3229_defconfig
Alex Bee6779a142023-07-18 16:57:14 +020025 > TEE=tee.bin CROSS_COMPILE=arm-linux-gnueabihf- make
Kever Yange969f912019-04-02 20:41:28 +080026
Alex Bee6779a142023-07-18 16:57:14 +020027 Get u-boot-rockchip.bin in this step.
Kever Yange969f912019-04-02 20:41:28 +080028
29Compile the rkdeveloptool
30=======================
31 Follow instructions in latest README
Alex Bee6779a142023-07-18 16:57:14 +020032 > cd ../rkdeveloptool
Kever Yange969f912019-04-02 20:41:28 +080033 > autoreconf -i
34 > ./configure
35 > make
36 > sudo make install
37
38 Get rkdeveloptool in you Host in this step.
39
40Both origin binaries and Tool are ready now, choose either option 1 or
41option 2 to deploy U-Boot.
42
Kever Yange969f912019-04-02 20:41:28 +080043Flash the image to eMMC
44=======================
45Power on(or reset with RESET KEY) with MASKROM KEY preesed, and then:
46 > cd ..
Alex Bee6779a142023-07-18 16:57:14 +020047 > rkdeveloptool/rkdeveloptool db rkbin/rk32/rk322x_loader_v1.04.232.bin
48 > rkdeveloptool/rkdeveloptool wl 64 u-boot/u-boot-rockchip.bin
49 > rkdeveloptool/rkdeveloptool rd
Kever Yange969f912019-04-02 20:41:28 +080050
51Flash the image to SD card
52==========================
Alex Bee6779a142023-07-18 16:57:14 +020053 > dd if=u-boot/u-boot-rockchip.bin of=/dev/sdb seek=64
54
55You should be able to get U-Boot log message with OP-TEE boot info:
56
57U-Boot TPL 2023.07-00524-gf5346eba55-dirty (Jul 15 2023 - 14:22:51)
58Trying to boot from BOOTROM
59Returning to boot ROM...
60
61U-Boot SPL 2023.07-00524-gf5346eba55-dirty (Jul 15 2023 - 14:22:51 +0200)
62Trying to boot from MMC1
63I/TC:
64I/TC: Non-secure external DT found
65I/TC: Switching console to device: /serial@11030000
66I/TC: OP-TEE version: 3.22.0-27-g893a762d1 (gcc version 10.3.1 20210621 (release) (15:10.3-2021.07-4)) #1 Sat Jul 15 12:14:36 UTC 2023 arm
67I/TC: WARNING: This OP-TEE configuration might be insecure!
68I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
69I/TC: Primary CPU initializing
70M/TC: Not protecting region 1: 0x68400000-0x68600000
71I/TC: Primary CPU switching to normal world boot
72
73
74U-Boot 2023.07-00524-gf5346eba55-dirty (Jul 15 2023 - 14:22:51 +0200)
75
76Model: Rockchip RK3229 Evaluation board
77DRAM: 1 GiB (effective 992 MiB)
78Core: 113 devices, 16 uclasses, devicetree: separate
79MMC: mmc@30000000: 1, mmc@30020000: 0
80Loading Environment from MMC... Card did not respond to voltage select! : -110
81*** Warning - No block device, using default environment
82
83In: serial@11030000
84Out: serial@11030000
85Err: serial@11030000
86Model: Rockchip RK3229 Evaluation board
87Net:
88Warning: ethernet@30200000 (eth0) using random MAC address - 72:65:2b:f1:c5:0a
89eth0: ethernet@30200000
90Hit any key to stop autoboot: 0
91=>
Kever Yange969f912019-04-02 20:41:28 +080092
Kever Yange969f912019-04-02 20:41:28 +080093
94For more detail, please reference to:
95http://opensource.rock-chips.com/wiki_Boot_option