• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Get 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
16  > make CROSS_COMPILE_ta_arm32=arm-none-eabi- PLATFORM=rockchip-rk322x
17  Get tee.bin in this step, copy it to U-Boot root dir:
18  > cp out/arm-plat-rockchip/core/tee-pager.bin ../u-boot/tee.bin
19
20Compile the U-Boot
21==================
22
23  > cd ../u-boot
24  > export CROSS_COMPILE=arm-linux-gnueabihf-
25  > export ARCH=arm
26  > make evb-rk3229_defconfig
27  > make
28  > make u-boot.itb
29
30  Get tpl/u-boot-tpl.bin, spl/u-boot-spl.bin and u-boot.itb in this step.
31
32Compile the rkdeveloptool
33=======================
34  Follow instructions in latest README
35  > cd ../rkflashtool
36  > autoreconf -i
37  > ./configure
38  > make
39  > sudo make install
40
41  Get rkdeveloptool in you Host in this step.
42
43Both origin binaries and Tool are ready now, choose either option 1 or
44option 2 to deploy U-Boot.
45
46Package the image
47=================
48
49  > cd ../u-boot
50  > tools/mkimage -n rk322x -T rksd -d tpl/u-boot-spl.bin idbloader.img
51  > cat spl/u-boot-spl.bin >> idbloader.img
52
53  Get idbloader.img in this step.
54
55Flash the image to eMMC
56=======================
57Power on(or reset with RESET KEY) with MASKROM KEY preesed, and then:
58  > cd ..
59  > rkdeveloptool db rkbin/rk32/rk322x_loader_v1.04.232.bin
60  > rkdeveloptool wl 64 u-boot/idbloader.img
61  > rkdeveloptool wl 0x4000 u-boot/u-boot.itb
62  > rkdeveloptool rd
63
64Flash the image to SD card
65==========================
66  > dd if=u-boot/idbloader.img of=/dev/sdb seek=64
67  > dd if=u-boot/u-boot.itb of=/dev/sdb seek=16384
68
69You should be able to get U-Boot log message with OP-TEE boot info.
70
71For more detail, please reference to:
72http://opensource.rock-chips.com/wiki_Boot_option
73