README 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. Here is the step-by-step to boot to U-Boot on RK3368-uQ7
  2. Get the Source and build ATF
  3. ============================
  4. > git clone git://git.theobroma-systems.com/arm-trusted-firmware.git
  5. > cd arm-trusted-firmware
  6. > make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3368 bl31
  7. > cp build/rk3368/release/bl31.bin ../u-boot/bl31-rk3368.bin
  8. Configure U-Boot
  9. ================
  10. > cd ../u-boot
  11. > make lion-rk3368_defconfig
  12. Build the TPL/SPL stage
  13. =======================
  14. > make CROSS_COMPILE=aarch64-unknown-elf- ARCH=arm
  15. > tools/mkimage -n rk3368 -T rksd -d tpl/u-boot-tpl.bin spl-3368.img
  16. > cat spl/u-boot-spl-dtb.bin >> spl-3368.img
  17. Build the full U-Boot and a FIT image including the ATF
  18. =======================================================
  19. > make CROSS_COMPILE=aarch64-unknown-elf- ARCH=arm u-boot.itb
  20. Flash the image
  21. ===============
  22. Copy the SPL to offset 32k and the FIT image containing the payloads
  23. (U-Boot proper, ATF, devicetree) to offset 256k card.
  24. SD-Card
  25. -------
  26. > dd if=spl-3368.img of=/dev/sdb seek=64
  27. > dd if=u-boot.itb of=/dev/sdb seek=512
  28. eMMC
  29. ----
  30. rkdeveloptool allows to flash the on-board eMMC via the USB OTG interface with
  31. help of the Rockchip loader binary.
  32. > git clone https://github.com/rockchip-linux/rkdeveloptool
  33. > cd rkdeveloptool
  34. > autoreconf -i && && ./configure && make
  35. > git clone https://github.com/rockchip-linux/rkbin.git
  36. > ./rkdeveloptool db rkbin/rk33/rk3368_loader_v2.00.256.bin
  37. > ./rkdeveloptool wl 64 ../spl.img
  38. > ./rkdeveloptool wl 512 ../u-boot.itb
  39. If everything went according to plan, you should see the following
  40. output on UART0:
  41. <debug_uart> U-Boot TPL board init
  42. Trying to boot from BOOTROM
  43. Returning to boot ROM...
  44. Trying to boot from MMC1
  45. NOTICE: BL31: v1.3(release):v1.2-1320-gbf43a443
  46. NOTICE: BL31: Built : 18:04:47, Jul 5 2017
  47. U-Boot 2017.07-00158-g2395e99858 (Jul 18 2017 - 21:03:31 +0200)
  48. Model: Theobroma Systems RK3368-uQ7 SoM
  49. DRAM: 2 GiB
  50. MMC: dwmmc@ff0c0000: 1, dwmmc@ff0f0000: 0
  51. Using default environment
  52. In: serial@ff180000
  53. Out: serial@ff180000
  54. Err: serial@ff180000
  55. Net:
  56. Warning: ethernet@ff290000 (eth0) using random MAC address - d2:69:35:7e:d0:1e
  57. eth0: ethernet@ff290000
  58. Hit any key to stop autoboot: 2