readme.txt 4.4 KB

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