README 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. Introduction
  2. ============
  3. The RK3399-Q7 (Puma) is a system-on-module featuring the Rockchip
  4. RK3399 in a Qseven-compatible form-factor.
  5. RK3399-Q7 features:
  6. * CPU: ARMv8 64bit Big-Little architecture,
  7. * Big: dual-core Cortex-A72
  8. * Little: quad-core Cortex-A53
  9. * IRAM: 200KB
  10. * DRAM: 4GB-128MB dual-channel
  11. * eMMC: onboard eMMC
  12. * SD/MMC
  13. * GbE (onboard Micrel KSZ9031) Gigabit ethernet PHY
  14. * USB:
  15. * USB3.0 dual role port
  16. * 2x USB3.0 host, 1x USB2.0 host via onboard USB3.0 hub
  17. * Display: HDMI/eDP/MIPI
  18. * Camera: 2x CSI (one on the edge connector, one on the Q7 specified CSI ZIF)
  19. * NOR Flash: onboard SPI NOR
  20. * Companion Controller: onboard additional Cortex-M0 microcontroller
  21. * RTC
  22. * fan controller
  23. * CAN
  24. Here is the step-by-step to boot to U-Boot on rk3399.
  25. Get the Source and build ATF/Cortex-M0 binaries
  26. ===============================================
  27. > git clone git://git.theobroma-systems.com/arm-trusted-firmware.git
  28. > git clone git://git.theobroma-systems.com/rk3399-cortex-m0.git
  29. Compile the ATF
  30. ===============
  31. > cd arm-trusted-firmware
  32. > make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399 bl31
  33. > cp build/rk3399/release/bl31.bin ../u-boot/bl31-rk3399.bin
  34. Compile the M0 firmware
  35. =======================
  36. > cd ../rk3399-cortex-m0
  37. > make CROSS_COMPILE=arm-cortex_m0-eabi-
  38. > cp rk3399m0.bin ../u-boot
  39. Compile the U-Boot
  40. ==================
  41. > cd ../u-boot
  42. > make CROSS_COMPILE=aarch64-linux-gnu- puma-rk3399_defconfig all
  43. Package the image
  44. =================
  45. Creating a SPL image for SD-Card/eMMC
  46. > tools/mkimage -n rk3399 -T rksd -d spl/u-boot-spl.bin spl_mmc.img
  47. Creating a SPL image for SPI-NOR
  48. > tools/mkimage -n rk3399 -T rkspi -d spl/u-boot-spl.bin spl_nor.img
  49. Create the FIT image containing U-Boot proper, ATF, M0 Firmware, devicetree
  50. > make CROSS_COMPILE=aarch64-linux-gnu- u-boot.itb
  51. Flash the image
  52. ===============
  53. Copy the SPL to offset 32k for SD/eMMC, offset 0 for NOR-Flash and the FIT
  54. image to offset 256k card.
  55. SD-Card
  56. -------
  57. > dd if=spl_mmc.img of=/dev/sdb seek=64
  58. > dd if=u-boot.itb of=/dev/sdb seek=512
  59. eMMC
  60. ----
  61. rkdeveloptool allows to flash the on-board eMMC via the USB OTG interface with
  62. help of the Rockchip loader binary.
  63. > git clone https://github.com/rockchip-linux/rkdeveloptool
  64. > cd rkdeveloptool
  65. > autoreconf -i && ./configure && make
  66. > git clone https://github.com/rockchip-linux/rkbin.git
  67. > ./rkdeveloptool db rkbin/rk33/rk3399_loader_v1.08.106.bin
  68. > ./rkdeveloptool wl 64 ../spl_mmc.img
  69. > ./rkdeveloptool wl 512 ../u-boot.itb
  70. NOR-Flash
  71. ---------
  72. Writing the SPI NOR Flash requires a running U-Boot. For the sake of simplicity
  73. we assume you have a SD-Card with a partition containing the required files
  74. ready.
  75. > load mmc 1:1 ${kernel_addr_r} spl_nor.img
  76. > sf probe
  77. > sf erase 0 +$filesize
  78. > sf write $kernel_addr_r 0 ${filesize}
  79. > load mmc 1:1 ${kernel_addr_r} u-boot.itb
  80. > sf erase 0x40000 +$filesize
  81. > sf write $kernel_addr_r 0x40000 ${filesize}
  82. Reboot the system and you should see a U-Boot console on UART0 (115200n8).