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