readme.txt 4.3 KB

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