readme.txt 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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
  60. | +-- start.elf
  61. | `-- overlays/ [2]
  62. +-- sdcard.img
  63. `-- zImage
  64. [1] Not all of them will be present, depending on the RaspberryPi
  65. model you are using.
  66. [2] Only for the Raspberry Pi 3/4 Models (overlay miniuart-bt is needed
  67. to enable the RPi3 serial console otherwise occupied by the bluetooth
  68. chip). Alternative would be to disable the serial console in cmdline.txt
  69. and /etc/inittab.
  70. How to write the SD card
  71. ========================
  72. Once the build process is finished you will have an image called "sdcard.img"
  73. in the output/images/ directory.
  74. Copy the bootable "sdcard.img" onto an SD card with "dd":
  75. $ sudo dd if=output/images/sdcard.img of=/dev/sdX
  76. Insert the SDcard into your Raspberry Pi, and power it up. Your new system
  77. should come up now and start two consoles: one on the serial port on
  78. the P1 header, one on the HDMI output where you can login using a USB
  79. keyboard.
  80. How to write to CM4 eMMC memory
  81. ===============================
  82. For CM4 modules without eMMC memory see above for booting from SD card,
  83. for CM4 moduels with eMMC memory proceed as following:
  84. - fit jumper on IO Board header J2 to disable eMMC boot
  85. - connect IO Board micro USB port (J11 USB slave) to your host linux system
  86. - power up CM4/IO Board (lsusb command should show a '0a5c:2711 Broadcom Corp.
  87. BCM2711 Boot' device)
  88. - run 'sudo ./host/bin/rpiboot', output should look like the following:
  89. Waiting for BCM2835/6/7/2711...
  90. Loading embedded: bootcode4.bin
  91. Sending bootcode.bin
  92. Successful read 4 bytes
  93. Waiting for BCM2835/6/7/2711...
  94. Loading embedded: bootcode4.bin
  95. Second stage boot server
  96. Loading embedded: start4.elf
  97. File read: start4.elf
  98. Second stage boot server done
  99. - a USB mass storage device should show up (the CM4 eMMC memory), proceed
  100. as described above to copy sdcard.img to it
  101. - power down CM4/IO Board
  102. - remove jumper on IO Board header J2 to re-enable eMMC boot
  103. - power up CM4/IO Board