xref: /OK3568_Linux_fs/u-boot/board/rockchip/kylin_rk3036/README (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunGet the Source and prebuild binary
2*4882a593Smuzhiyun==================================
3*4882a593Smuzhiyun
4*4882a593Smuzhiyun  > mkdir ~/kylin_rk3036
5*4882a593Smuzhiyun  > cd ~/kylin_rk3036
6*4882a593Smuzhiyun  > git clone git://git.denx.de/u-boot.git
7*4882a593Smuzhiyun  > git clone https://github.com/rockchip-linux/rkbin.git
8*4882a593Smuzhiyun  > git clone https://github.com/rockchip-linux/rkdeveloptool.git
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunGet the OP-TEE
11*4882a593Smuzhiyun===============
12*4882a593Smuzhiyun
13*4882a593Smuzhiyun  Get tee.bin in this step, copy it to U-Boot root dir:
14*4882a593Smuzhiyun  > cp rkbin/rk30/rk3036_tee_v1.00.bin ../u-boot/tee.bin
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunCompile the U-Boot
17*4882a593Smuzhiyun==================
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun  > cd ../u-boot
20*4882a593Smuzhiyun  > export CROSS_COMPILE=arm-linux-gnueabihf-
21*4882a593Smuzhiyun  > export ARCH=arm
22*4882a593Smuzhiyun  > make kylin-rk3036_defconfig
23*4882a593Smuzhiyun  > make
24*4882a593Smuzhiyun  > make u-boot.itb
25*4882a593Smuzhiyun
26*4882a593Smuzhiyun  Get tpl/u-boot-tpl.bin, spl/u-boot-spl.bin and u-boot.itb in this step.
27*4882a593Smuzhiyun
28*4882a593SmuzhiyunCompile the rkdeveloptool
29*4882a593Smuzhiyun=======================
30*4882a593Smuzhiyun  Follow instructions in latest README
31*4882a593Smuzhiyun  > cd ../rkflashtool
32*4882a593Smuzhiyun  > autoreconf -i
33*4882a593Smuzhiyun  > ./configure
34*4882a593Smuzhiyun  > make
35*4882a593Smuzhiyun  > sudo make install
36*4882a593Smuzhiyun
37*4882a593Smuzhiyun  Get rkdeveloptool in you Host in this step.
38*4882a593Smuzhiyun
39*4882a593SmuzhiyunBoth origin binaries and Tool are ready now, choose either option 1 or
40*4882a593Smuzhiyunoption 2 to deploy U-Boot.
41*4882a593Smuzhiyun
42*4882a593SmuzhiyunPackage the image
43*4882a593Smuzhiyun=================
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun  > cd ../u-boot
46*4882a593Smuzhiyun  > tools/mkimage -n rk3036 -T rksd -d tpl/u-boot-tpl.bin idbloader.img
47*4882a593Smuzhiyun  > cat spl/u-boot-spl.bin >> idbloader.img
48*4882a593Smuzhiyun
49*4882a593Smuzhiyun  Get idbloader.img in this step.
50*4882a593Smuzhiyun
51*4882a593SmuzhiyunFlash the image to eMMC
52*4882a593Smuzhiyun=======================
53*4882a593SmuzhiyunPower on(or reset with RESET KEY) with MASKROM KEY preesed, and then:
54*4882a593Smuzhiyun  > cd ..
55*4882a593Smuzhiyun  > rkdeveloptool db rkbin/rk30/rk3036_loader_v1.07.237.bin
56*4882a593Smuzhiyun  > rkdeveloptool wl 64 u-boot/idbloader.img
57*4882a593Smuzhiyun  > rkdeveloptool wl 0x4000 u-boot/u-boot.itb
58*4882a593Smuzhiyun  > rkdeveloptool rd
59*4882a593Smuzhiyun
60*4882a593SmuzhiyunFlash the image to SD card
61*4882a593Smuzhiyun==========================
62*4882a593Smuzhiyun  > dd if=u-boot/idbloader.img of=/dev/sdb seek=64
63*4882a593Smuzhiyun  > dd if=u-boot/u-boot.itb of=/dev/sdb seek=16384
64*4882a593Smuzhiyun
65*4882a593SmuzhiyunYou should be able to get U-Boot log message with OP-TEE boot info.
66*4882a593Smuzhiyun
67*4882a593SmuzhiyunFor more detail, please reference to:
68*4882a593Smuzhiyunhttp://opensource.rock-chips.com/wiki_Boot_option
69