readme.txt 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. Raspberry Pi
  2. Intro
  3. =====
  4. These instructions apply to all models of the Raspberry Pi:
  5. - the original models A and B,
  6. - the "enhanced" models A+ and B+,
  7. - the model B2 (aka Raspberry Pi 2)
  8. - the model B3 (aka Raspberry Pi 3).
  9. - the model B4 (aka Raspberry Pi 4).
  10. - the model CM4 (aka Raspberry Pi Compute Module 4 and IO Board).
  11. How to build it
  12. ===============
  13. Configure Buildroot
  14. -------------------
  15. There are two RaspberryPi defconfig files in Buildroot, one for each
  16. major variant, which you should base your work on:
  17. For models A, B, A+ or B+:
  18. $ make raspberrypi_defconfig
  19. For model Zero (model A+ in smaller form factor):
  20. $ make raspberrypi0_defconfig
  21. For model 2 B:
  22. $ make raspberrypi2_defconfig
  23. For model 3 B and B+:
  24. $ make raspberrypi3_defconfig
  25. or for model 3 B and B+ (64 bit):
  26. $ make raspberrypi3_64_defconfig
  27. For model 4 B:
  28. $ make raspberrypi4_defconfig
  29. or for model 4 B (64 bit):
  30. $ make raspberrypi4_64_defconfig
  31. For model CM4 (on IO Board):
  32. $ make raspberrypicm4io_defconfig
  33. or for CM4 (on IO Board - 64 bit):
  34. $ make raspberrypicm4io_64_defconfig
  35. Build the rootfs
  36. ----------------
  37. Note: you will need to have access to the network, since Buildroot will
  38. download the packages' sources.
  39. You may now build your rootfs with:
  40. $ make
  41. (This may take a while, consider getting yourself a coffee ;-) )
  42. Result of the build
  43. -------------------
  44. After building, you should obtain this tree:
  45. output/images/
  46. +-- bcm2708-rpi-b.dtb [1]
  47. +-- bcm2708-rpi-b-plus.dtb [1]
  48. +-- bcm2709-rpi-2-b.dtb [1]
  49. +-- bcm2710-rpi-3-b.dtb [1]
  50. +-- bcm2710-rpi-3-b-plus.dtb [1]
  51. +-- bcm2711-rpi-4-b.dtb [1]
  52. +-- bcm2711-rpi-cm4.dtb [1]
  53. +-- boot.vfat
  54. +-- rootfs.ext4
  55. +-- rpi-firmware/
  56. | +-- bootcode.bin
  57. | +-- cmdline.txt
  58. | +-- config.txt
  59. | +-- fixup.dat [1]
  60. | +-- fixup4.dat [1]
  61. | +-- start.elf [1]
  62. | +-- start4.elf [1]
  63. | `-- overlays/ [2]
  64. +-- sdcard.img
  65. +-- Image [1]
  66. `-- zImage [1]
  67. [1] Not all of them will be present, depending on the RaspberryPi
  68. model you are using.
  69. [2] Only for the Raspberry Pi 3/4 Models (overlay miniuart-bt is needed
  70. to enable the RPi3 serial console otherwise occupied by the bluetooth
  71. chip). Alternative would be to disable the serial console in cmdline.txt
  72. and /etc/inittab.
  73. How to write the SD card
  74. ========================
  75. Once the build process is finished you will have an image called "sdcard.img"
  76. in the output/images/ directory.
  77. Copy the bootable "sdcard.img" onto an SD card with "dd":
  78. $ sudo dd if=output/images/sdcard.img of=/dev/sdX
  79. Insert the SDcard into your Raspberry Pi, and power it up. Your new system
  80. should come up now and start two consoles: one on the serial port on
  81. the P1 header, one on the HDMI output where you can login using a USB
  82. keyboard.
  83. How to write to CM4 eMMC memory
  84. ===============================
  85. For CM4 modules without eMMC memory see above for booting from SD card,
  86. for CM4 moduels with eMMC memory proceed as following:
  87. - fit jumper on IO Board header J2 to disable eMMC boot
  88. - connect IO Board micro USB port (J11 USB slave) to your host linux system
  89. - power up CM4/IO Board (lsusb command should show a '0a5c:2711 Broadcom Corp.
  90. BCM2711 Boot' device)
  91. - run 'sudo ./host/bin/rpiboot', output should look like the following:
  92. Waiting for BCM2835/6/7/2711...
  93. Loading embedded: bootcode4.bin
  94. Sending bootcode.bin
  95. Successful read 4 bytes
  96. Waiting for BCM2835/6/7/2711...
  97. Loading embedded: bootcode4.bin
  98. Second stage boot server
  99. Loading embedded: start4.elf
  100. File read: start4.elf
  101. Second stage boot server done
  102. - a USB mass storage device should show up (the CM4 eMMC memory), proceed
  103. as described above to copy sdcard.img to it
  104. - power down CM4/IO Board
  105. - remove jumper on IO Board header J2 to re-enable eMMC boot
  106. - power up CM4/IO Board