README 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. Introduction
  2. ============
  3. RK3399 key features we might use in U-Boot:
  4. * CPU: ARMv8 64bit Big-Little architecture,
  5. * Big: dual-core Cortex-A72
  6. * Little: quad-core Cortex-A53
  7. * IRAM: 200KB
  8. * DRAM: 4GB-128MB dual-channel
  9. * eMMC: support eMMC 5.0/5.1, suport HS400, HS200, DDR50
  10. * SD/MMC: support SD 3.0, MMC 4.51
  11. * USB: USB3.0 type-C port *2 with dwc3 controller
  12. * USB2.0 EHCI host port *2
  13. * Display: RGB/HDMI/DP/MIPI/EDP
  14. evb key features:
  15. * regulator: pwm regulator for CPU B/L
  16. * PMIC: rk808
  17. * debug console: UART2
  18. In order to support Arm Trust Firmware(ATF), we can use either SPL or
  19. miniloader from rockchip to do:
  20. * do DRAM init
  21. * load and verify ATF image
  22. * load and verify U-Boot image
  23. Here is the step-by-step to boot to U-Boot on rk3399.
  24. Get the Source and prebuild binary
  25. ==================================
  26. > mkdir ~/evb_rk3399
  27. > cd ~/evb_rk3399
  28. > git clone https://github.com/ARM-software/arm-trusted-firmware.git
  29. > git clone https://github.com/rockchip-linux/rkbin.git
  30. > git clone https://github.com/rockchip-linux/rkdeveloptool.git
  31. Compile ATF
  32. ===========
  33. > cd arm-trusted-firmware
  34. > make realclean
  35. > make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399 bl31
  36. Get bl31.elf in this step, copy it to U-Boot root dir:
  37. > cp build/rk3399/release/bl31/bl31.elf ../u-boot/
  38. Or you can get the bl31.elf directly from Rockchip:
  39. > cp rkbin/rk33/rk3399_bl31_v1.00.elf ../u-boot/bl31.elf
  40. Compile U-Boot
  41. ==============
  42. > cd ../u-boot
  43. > export CROSS_COMPILE=aarch64-linux-gnu-
  44. > make evb-rk3399_defconfig
  45. for firefly-rk3399, use below instead:
  46. > make firefly-rk3399_defconfig
  47. > make
  48. > make u-boot.itb
  49. Get spl/u-boot-spl.bin and u-boot.itb in this step.
  50. Compile rkdeveloptool
  51. =====================
  52. Get rkdeveloptool installed on your Host in this step.
  53. Follow instructions in latest README, example:
  54. > cd ../rkdeveloptool
  55. > autoreconf -i
  56. > ./configure
  57. > make
  58. > sudo make install
  59. Both origin binaries and Tool are ready now, choose either option 1 or
  60. option 2 to deploy U-Boot.
  61. Package the image
  62. =================
  63. Package the image for U-Boot SPL(option 1)
  64. --------------------------------
  65. > cd ..
  66. > tools/mkimage -n rk3399 -T rksd -d spl/u-boot-spl.bin idbspl.img
  67. Get idbspl.img in this step.
  68. Package the image for Rockchip miniloader(option 2)
  69. ------------------------------------------
  70. > cd ..
  71. > cp arm-trusted-firmware/build/rk3399/release/bl31.elf rkbin/rk33
  72. > ./rkbin/tools/trust_merger rkbin/tools/RK3399TRUST.ini
  73. > ./rkbin/tools/loaderimage --pack --uboot u-boot/u-boot-dtb.bin uboot.img
  74. Get trust.img and uboot.img in this step.
  75. Flash the image to eMMC
  76. =======================
  77. Flash the image with U-Boot SPL(option 1)
  78. -------------------------------
  79. Power on(or reset with RESET KEY) with MASKROM KEY preesed, and then:
  80. > rkdeveloptool db rkbin/rk33/rk3399_loader_v1.08.106.bin
  81. > rkdeveloptool wl 64 u-boot/idbspl.img
  82. > rkdeveloptool wl 0x4000 u-boot/u-boot.itb
  83. > rkdeveloptool rd
  84. Flash the image with Rockchip miniloader(option 2)
  85. ----------------------------------------
  86. Power on(or reset with RESET KEY) with MASKROM KEY preesed, and then:
  87. > rkdeveloptool db rkbin/rk33/rk3399_loader_v1.08.106.bin
  88. > rkdeveloptool ul rkbin/rk33/rk3399_loader_v1.08.106.bin
  89. > rkdeveloptool wl 0x4000 u-boot/uboot.img
  90. > rkdeveloptool wl 0x6000 u-boot/trust.img
  91. > rkdeveloptool rd
  92. You should be able to get U-Boot log in console/UART2(baurdrate 1500000)
  93. For more detail, please reference to:
  94. http://opensource.rock-chips.com/wiki_Boot_option