summaryrefslogtreecommitdiff
path: root/board/rockchip/evb_rk3229/README
blob: 93328c75b204ded69efcbcab539a4b61dca74573 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Get the Source and prebuild binary
==================================

  > mkdir ~/evb_rk3229
  > cd ~/evb_rk3229
  > git clone git://git.denx.de/u-boot.git
  > git clone https://github.com/OP-TEE/optee_os.git
  > git clone https://github.com/rockchip-linux/rkbin.git
  > git clone https://github.com/rockchip-linux/rkdeveloptool.git

Compile the OP-TEE
===============

  > cd optee_os
  > make clean
  > make CROSS_COMPILE_ta_arm32=arm-none-eabi- PLATFORM=rockchip-rk322x
  Get tee.bin in this step, copy it to U-Boot root dir:
  > cp out/arm-plat-rockchip/core/tee-pager.bin ../u-boot/tee.bin

Compile the U-Boot
==================

  > cd ../u-boot
  > export CROSS_COMPILE=arm-linux-gnueabihf-
  > export ARCH=arm
  > make evb-rk3229_defconfig
  > make
  > make u-boot.itb

  Get tpl/u-boot-tpl.bin, spl/u-boot-spl.bin and u-boot.itb in this step.

Compile the rkdeveloptool
=======================
  Follow instructions in latest README
  > cd ../rkflashtool
  > autoreconf -i
  > ./configure
  > make
  > sudo make install

  Get rkdeveloptool in you Host in this step.

Both origin binaries and Tool are ready now, choose either option 1 or
option 2 to deploy U-Boot.

Package the image
=================

  > cd ../u-boot
  > tools/mkimage -n rk322x -T rksd -d tpl/u-boot-spl.bin idbloader.img
  > cat spl/u-boot-spl.bin >> idbloader.img

  Get idbloader.img in this step.

Flash the image to eMMC
=======================
Power on(or reset with RESET KEY) with MASKROM KEY preesed, and then:
  > cd ..
  > rkdeveloptool db rkbin/rk32/rk322x_loader_v1.04.232.bin
  > rkdeveloptool wl 64 u-boot/idbloader.img
  > rkdeveloptool wl 0x4000 u-boot/u-boot.itb
  > rkdeveloptool rd

Flash the image to SD card
==========================
  > dd if=u-boot/idbloader.img of=/dev/sdb seek=64
  > dd if=u-boot/u-boot.itb of=/dev/sdb seek=16384

You should be able to get U-Boot log message with OP-TEE boot info.

For more detail, please reference to:
http://opensource.rock-chips.com/wiki_Boot_option