readme.txt 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. SiFive HiFive Unleashed
  2. =======================
  3. This file describes how to use the pre-defined Buildroot
  4. configuration for the SiFive HiFive Unleashed board.
  5. Further information about the HiFive Unleashed board can be found
  6. at https://www.sifive.com/boards/hifive-unleashed
  7. Building
  8. ========
  9. Configure Buildroot using the default board configuration:
  10. $ make hifive_unleashed_defconfig
  11. Customise the build as necessary:
  12. $ make menuconfig
  13. Start the build:
  14. $ make
  15. Result of the build
  16. ===================
  17. Once the build has finished you will have the following files:
  18. output/images/
  19. +-- boot.scr
  20. +-- fw_dynamic.bin
  21. +-- fw_dynamic.elf
  22. +-- fw_jump.bin
  23. +-- fw_jump.elf
  24. +-- hifive-unleashed-a00.dtb
  25. +-- Image
  26. +-- rootfs.cpio
  27. +-- rootfs.ext2
  28. +-- rootfs.ext4
  29. +-- rootfs.tar
  30. +-- sdcard.img
  31. +-- u-boot.bin
  32. +-- u-boot.itb
  33. +-- u-boot-spl.bin
  34. Creating a bootable SD card with genimage
  35. =========================================
  36. By default Buildroot builds a SD card image for you. All you need to do
  37. is dd the image to your SD card, which can be done with the following
  38. command on your development host:
  39. $ sudo dd if=output/images/sdcard.img of=/dev/sdb bs=4096
  40. The above example command assumes the SD card is accessed via a USB card
  41. reader and shows up as /dev/sdb on the host. Adjust it accordingly per
  42. your actual setup.
  43. Booting the SD card on the board
  44. ================================
  45. Make sure that the all DIP switches are set to the off position for
  46. default boot mode (MSEL mode = 1011), insert the SD card and power
  47. up the board.
  48. Connect the USB cable and open minicom (/dev/ttyUSB1, 115200, 8N1).
  49. See the 'SiFive HiFive Unleashed Getting Started Guide' for
  50. more details (https://www.sifive.com/documentation).
  51. You will get a warning reported by fdisk when you examine the SD card.
  52. This is because the genimage_sdcard.cfg file doesn't specify the SD card
  53. size (as people will naturally have different sized cards), so the
  54. secondary GPT header is placed after the rootfs rather than at the end
  55. of the disk where it is expected to be.
  56. You will see something like this at boot time:
  57. [ 0.989458] mmc0: host does not support reading read-only switch, assuming write-enable
  58. [ 0.996772] mmc0: new SDHC card on SPI
  59. [ 1.001634] mmcblk0: mmc0:0000 SD8GB 7.28 GiB
  60. [ 1.038079] GPT:Primary header thinks Alt. header is not at the end of the disk.
  61. [ 1.044759] GPT:52389 != 15264767
  62. [ 1.048051] GPT:Alternate GPT header not at the end of the disk.
  63. [ 1.054015] GPT:52389 != 15264767
  64. [ 1.057323] GPT: Use GNU Parted to correct GPT errors.
  65. [ 1.062479] mmcblk0: p1 p2 p3
  66. Creating a bootable SPI flash with genimage
  67. ===========================================
  68. Adjust Buildroot configuration by:
  69. $ make menuconfig
  70. Change "System configuration" -> "Extra arguments passed to custom scripts"
  71. value to "-c board/sifive/hifive-unleashed/genimage_spi-nor.cfg", save the
  72. configuration and build. This creates a output/images/spi-nor.img that can
  73. be programmed to the on-board SPI flash.
  74. Boot the board from the SD card prepared above, stop the U-Boot auto boot,
  75. and type the following commands to program the whole SPI flash:
  76. => tftp 82000000 output/images/spi-nor.img
  77. => sf probe
  78. => sf update 82000000 0 2000000
  79. Booting the SPI flash on the board
  80. ==================================
  81. Make sure that the all DIP switches are set to the off position for
  82. default boot mode (MSEL mode = 0110) to boot from SPI flash.