readme.txt 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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 CM (aka Raspberry Pi Compute Module).
  8. - the model Zero (aka Raspberry Pi Zero)
  9. - the model Zero W (aka Raspberry Pi Zero W)
  10. - the model Zero 2 W (aka Raspberry Pi Zero 2 W)
  11. - the model B2 (aka Raspberry Pi 2)
  12. - the model B3 (aka Raspberry Pi 3).
  13. - the model CM3 (aka Raspberry Pi Compute Module 3).
  14. - the model CM3+ (aka Raspberry Pi Compute Module 3+).
  15. - the model B4 (aka Raspberry Pi 4).
  16. - the model 400 (aka Raspberry Pi 400).
  17. - the model CM4 (aka Raspberry Pi Compute Module 4 and IO Board).
  18. - the model CM4s (aka Raspberry Pi Compute Module 4s).
  19. - the model B5 (aka Raspberry Pi 5).
  20. - the model 500 (aka Raspberry Pi 500).
  21. - the model CM5 (aka Raspberry Pi Compute Module 5 and IO Board).
  22. How to build it
  23. ===============
  24. Configure Buildroot
  25. -------------------
  26. There are several Raspberry Pi defconfig files in Buildroot, one for
  27. each major variant, which you should base your work on:
  28. For models A, B, A+, B+ and CM:
  29. $ make raspberrypi_defconfig
  30. For model Zero (model A+ in smaller form factor):
  31. $ make raspberrypi0_defconfig
  32. or for model Zero W (model Zero with wireless LAN and Bluetooth):
  33. $ make raspberrypi0w_defconfig
  34. For model Zero 2 W (model B3 in smaller form factor):
  35. $ make raspberrypizero2w_defconfig
  36. or for model Zero 2 W (model B3 in smaller form factor, 64-bit):
  37. $ make raspberrypizero2w_64_defconfig
  38. For model 2 B:
  39. $ make raspberrypi2_defconfig
  40. or for model 2 B (Rev 1.2, model B3 without wireless LAN and Bluetooth, 64 bit):
  41. $ make raspberrypi2_64_defconfig
  42. For model 3 B, B+, CM3 and CM3+:
  43. $ make raspberrypi3_defconfig
  44. or for model 3 B, B+, CM3 and CM3+ (64 bit):
  45. $ make raspberrypi3_64_defconfig
  46. For model 4 B, 400, CM4 and CM4s:
  47. $ make raspberrypi4_defconfig
  48. or for model 4 B, 400, CM4 and CM4s (64 bit):
  49. $ make raspberrypi4_64_defconfig
  50. For model CM4 (on IO Board):
  51. $ make raspberrypicm4io_defconfig
  52. or for CM4 (on IO Board - 64 bit):
  53. $ make raspberrypicm4io_64_defconfig
  54. For model 5 B and 500:
  55. $ make raspberrypi5_defconfig
  56. For model CM5 (on IO Board):
  57. $ make raspberrypicm5io_defconfig
  58. Build the rootfs
  59. ----------------
  60. Note: you will need to have access to the network, since Buildroot will
  61. download the packages' sources.
  62. You may now build your rootfs with:
  63. $ make
  64. (This may take a while, consider getting yourself a coffee ;-) )
  65. Result of the build
  66. -------------------
  67. After building, you should obtain this tree:
  68. output/images/
  69. +-- bcm2708-rpi-b-rev1.dtb [1]
  70. +-- bcm2708-rpi-b.dtb [1]
  71. +-- bcm2708-rpi-b-plus.dtb [1]
  72. +-- bcm2708-rpi-cm.dtb [1]
  73. +-- bcm2708-rpi-zero.dtb [1]
  74. +-- bcm2708-rpi-zero-w.dtb [1]
  75. +-- bcm2709-rpi-2-b.dtb [1]
  76. +-- bcm2710-rpi-2-b.dtb [1]
  77. +-- bcm2710-rpi-3-b.dtb [1]
  78. +-- bcm2710-rpi-3-b-plus.dtb [1]
  79. +-- bcm2710-rpi-cm3.dtb [1]
  80. +-- bcm2710-rpi-zero-2-w.dtb [1]
  81. +-- bcm2711-rpi-4-b.dtb [1]
  82. +-- bcm2711-rpi-400.dtb [1]
  83. +-- bcm2711-rpi-cm4.dtb [1]
  84. +-- bcm2711-rpi-cm4s.dtb [1]
  85. +-- bcm2712-rpi-5-b.dtb [1]
  86. +-- bcm2712d0-rpi-5-b.dtb [1]
  87. +-- bcm2712-rpi-500.dtb [1]
  88. +-- bcm2712-rpi-cm5-cm5io [1]
  89. +-- bcm2712-rpi-cm5l-cm5io [1]
  90. +-- boot.vfat
  91. +-- rootfs.ext4
  92. +-- rpi-firmware/
  93. | +-- bootcode.bin [2]
  94. | +-- cmdline.txt
  95. | +-- config.txt
  96. | +-- fixup.dat [3]
  97. | +-- fixup4.dat [4]
  98. | +-- start.elf [3]
  99. | +-- start4.elf [4]
  100. | `-- overlays/ [5]
  101. +-- sdcard.img
  102. +-- Image [1]
  103. `-- zImage [1]
  104. [1] Not all of them will be present, depending on the RaspberryPi
  105. model you are using.
  106. [2] Only for the Raspberry Pi 1, 2, 3, Zero, Zero W and Zero 2 W. The Raspberry
  107. Pi 4, 400, 5 and the Compute Module 4, 4s and 5 load the second stage
  108. bootloader from a SPI flash EEPROM.
  109. [3] Only for the Raspberry Pi 1, 2, 3, Zero and Zero 2.
  110. [4] Only for the Raspberry Pi 4, 400, Compute Module 4 and 4s.
  111. [5] Only for the Raspberry Pi installing device-tree overlays. The Raspberry Pi
  112. with Bluetooth connectivity (Zero W, Zero 2 W, 3, 4, 400, Compute Module 4
  113. and 4s) use the miniuart-bt overlay to enable UART0 for the serial console;
  114. the Bluetooth uses the mini-UART instead. Alternative would be to disable
  115. the serial console in cmdline.txt and /etc/inittab.
  116. How to write the SD card
  117. ========================
  118. Once the build process is finished you will have an image called "sdcard.img"
  119. in the output/images/ directory.
  120. Copy the bootable "sdcard.img" onto an SD card with "dd":
  121. $ sudo dd if=output/images/sdcard.img of=/dev/sdX
  122. Insert the SDcard into your Raspberry Pi, and power it up. Your new system
  123. should come up now and start two consoles: one on the serial port on
  124. the P1 header, one on the HDMI output where you can login using a USB
  125. keyboard.
  126. How to write to CM4 eMMC memory
  127. ===============================
  128. For CM4 modules without eMMC memory see above for booting from SD card,
  129. for CM4 modules with eMMC memory proceed as following:
  130. - fit jumper on IO Board header J2 to disable eMMC boot
  131. - connect IO Board micro USB port (J11 USB slave) to your host linux system
  132. - power up CM4/IO Board (lsusb command should show a '0a5c:2711 Broadcom Corp.
  133. BCM2711 Boot' device)
  134. - run 'sudo ./host/bin/rpiboot', output should look like the following:
  135. Waiting for BCM2835/6/7/2711...
  136. Loading embedded: bootcode4.bin
  137. Sending bootcode.bin
  138. Successful read 4 bytes
  139. Waiting for BCM2835/6/7/2711...
  140. Loading embedded: bootcode4.bin
  141. Second stage boot server
  142. Loading embedded: start4.elf
  143. File read: start4.elf
  144. Second stage boot server done
  145. - a USB mass storage device should show up (the CM4 eMMC memory), proceed
  146. as described above to copy sdcard.img to it
  147. - power down CM4/IO Board
  148. - remove jumper on IO Board header J2 to re-enable eMMC boot
  149. - power up CM4/IO Board
  150. CM5 debug UART
  151. ==============
  152. The debug UART header is not assembled on the Compute Module 5.
  153. 2.23. Debug UART
  154. Space is provided for the user to fit a debug UART connector. This
  155. connector provides the same functionality as Raspberry Pi 5. The
  156. connector is a three-pin 1mm pitch JST-SH connector, Part number
  157. BM03B-SRSS-TB. The signals are replicated on the bottom as test points.
  158. Appendix B: Test Points
  159. | Reference | X | Y | NAME |
  160. | TP35 | 11 | 37.8 | DEBUG_UART_TX |
  161. | TP36 | 8.5 | 37.1 | DEBUG_UART_RX |
  162. Debug UART
  163. TP35 and TP36 are a TX and RX of the debug UART. TP46 should be used as
  164. the ground. It is very useful to have access to these pins during
  165. programming and initial boot.
  166. See https://datasheets.raspberrypi.com/cm5/cm5-datasheet.pdf.
  167. The signals are not wired up to 100-pin headers either. And thus, it is
  168. impossible to output early boot traces in the EEPROM firmware without
  169. assembling a JST-SH connector (or using the test points).