README 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. Get the Source and prebuild binary
  2. ==================================
  3. > mkdir ~/evb_rk3229
  4. > cd ~/evb_rk3229
  5. > git clone git://git.denx.de/u-boot.git
  6. > git clone https://github.com/OP-TEE/optee_os.git
  7. > git clone https://github.com/rockchip-linux/rkbin.git
  8. > git clone https://github.com/rockchip-linux/rkdeveloptool.git
  9. Compile the OP-TEE
  10. ===============
  11. > cd optee_os
  12. > make clean
  13. > make CROSS_COMPILE_ta_arm32=arm-none-eabi- PLATFORM=rockchip-rk322x
  14. Get tee.bin in this step, copy it to U-Boot root dir:
  15. > cp out/arm-plat-rockchip/core/tee-pager.bin ../u-boot/tee.bin
  16. Compile the U-Boot
  17. ==================
  18. > cd ../u-boot
  19. > export CROSS_COMPILE=arm-linux-gnueabihf-
  20. > export ARCH=arm
  21. > make evb-rk3229_defconfig
  22. > make
  23. > make u-boot.itb
  24. Get tpl/u-boot-tpl.bin, spl/u-boot-spl.bin and u-boot.itb in this step.
  25. Compile the rkdeveloptool
  26. =======================
  27. Follow instructions in latest README
  28. > cd ../rkflashtool
  29. > autoreconf -i
  30. > ./configure
  31. > make
  32. > sudo make install
  33. Get rkdeveloptool in you Host in this step.
  34. Both origin binaries and Tool are ready now, choose either option 1 or
  35. option 2 to deploy U-Boot.
  36. Package the image
  37. =================
  38. > cd ../u-boot
  39. > tools/mkimage -n rk322x -T rksd -d tpl/u-boot-spl.bin idbloader.img
  40. > cat spl/u-boot-spl.bin >> idbloader.img
  41. Get idbloader.img in this step.
  42. Flash the image to eMMC
  43. =======================
  44. Power on(or reset with RESET KEY) with MASKROM KEY preesed, and then:
  45. > cd ..
  46. > rkdeveloptool db rkbin/rk32/rk322x_loader_v1.04.232.bin
  47. > rkdeveloptool wl 64 u-boot/idbloader.img
  48. > rkdeveloptool wl 0x4000 u-boot/u-boot.itb
  49. > rkdeveloptool rd
  50. Flash the image to SD card
  51. ==========================
  52. > dd if=u-boot/idbloader.img of=/dev/sdb seek=64
  53. > dd if=u-boot/u-boot.itb of=/dev/sdb seek=16384
  54. You should be able to get U-Boot log message with OP-TEE boot info.
  55. For more detail, please reference to:
  56. http://opensource.rock-chips.com/wiki_Boot_option