readme.txt 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. BeagleV
  2. =======
  3. BeagleV is a low-cost RISC-V 64-bit based platform, powered by a
  4. Starfive JH7100 processor. The current defconfig in Buildroot has been
  5. tested with the JH7100 chip used on the beta version of the BeagleV
  6. board.
  7. How to build
  8. ============
  9. $ make beaglev_defconfig
  10. $ make
  11. Build results
  12. =============
  13. After building, output/images contains:
  14. + bootloader-BEAGLEV-buildroot.bin.out
  15. + ddrinit-2133-buildroot.bin.out
  16. + Image
  17. + fw_payload.bin
  18. + fw_payload.bin.out
  19. + fw_payload.elf
  20. + rootfs.ext2
  21. + rootfs.ext4
  22. + sdcard.img
  23. + u-boot.bin
  24. The four important files are:
  25. - bootloader-BEAGLEV-buildroot.bin.out, the first stage bootloader
  26. - ddrinit-2133-buildroot.bin.out, the DDR initialization firmware
  27. - fw_payload.bin.out, which is the bootloader image, containing
  28. both OpenSBI and U-Boot.
  29. - sdcard.img, the SD card image, which contains the root filesystem,
  30. kernel image and Device Tree.
  31. Flashing the SD card image
  32. ==========================
  33. $ sudo dd if=output/images/sdcard.img of=/dev/sdX
  34. Preparing the board
  35. ===================
  36. Connect the Beagle-V fan to the 5V supply (pin 2 or 4 of the GPIO
  37. connector) and GND (pin 6 of the GPIO connector).
  38. Connect a TTL UART cable to pin 8 (TX), 10 (RX) and 14 (GND).
  39. Insert your SD card.
  40. Power-up the board using an USB-C cable.
  41. Flashing OpenSBI/U-Boot
  42. =======================
  43. The bootloader pre-flashed on the Beagle-V has a non-working
  44. fdt_addr_r environment variable value, so it won't work
  45. as-is. Reflashing the bootloader with the bootloader image produced by
  46. Buildroot is necessary.
  47. When the board starts up, a pre-loader shows a count down of 2
  48. seconds, interrupt by pressing any key. You should reach a menu like
  49. this:
  50. --------8<----------
  51. bootloader version:210209-4547a8d
  52. ddr 0x00000000, 1M test
  53. ddr 0x00100000, 2M test
  54. DDR clk 2133M,Version: 210302-5aea32f
  55. 0
  56. ***************************************************
  57. *************** FLASH PROGRAMMING *****************
  58. ***************************************************
  59. 0:update uboot
  60. 1:quit
  61. select the function:
  62. --------8<----------
  63. Press 0 and Enter. You will now see "C" characters being
  64. displayed. Ask your serial port communication program to send
  65. fw_payload.bin.out using the Xmodem protocol.
  66. After reflashing is complete, restart the board, it will automatically
  67. start the system from the SD card, and reach the login prompt.
  68. Flashing low-level bootloaders
  69. ==============================
  70. The BeagleV comes pre-flashed with functional low-level bootloaders
  71. (called "secondboot" and "ddrinit"). Re-flashing them is not necessary
  72. to use this Buildroot defconfig. However, for the sake of
  73. completeness, Buildroot builds and provides those low-level bootloader
  74. images.
  75. You can flash them as follows:
  76. - In the same "pre-loader" menu as the one used above, instead of
  77. entering 0 or 1, enter the magic "root@s5t" string. This enters the
  78. "expert" features.
  79. - Then, press 0 and send over X-modem the
  80. bootloader-BEAGLEV-buildroot.bin.out file.
  81. - Then, press 1 and send over X-modem the
  82. ddrinit-2133-buildroot.bin.out.
  83. Note that the reflashing mechanism itself relies on those low-level
  84. bootloaders, so if you flash non-working versions, you'll have to go
  85. through a recovery process. This requires wiring up to a separate
  86. debug UART, which pins are located near the HDMI connector. See
  87. https://wiki.seeedstudio.com/BeagleV-Update-bootloader-ddr-init-boot-uboot-Recover-bootloader/
  88. section "Recover the bootloader" for more details. The instructions
  89. make use of a jh7100-recover tool, which Buildroot has built as part
  90. of this defconfig: it is available as output/host/bin/jh7100-recover.