Skip to content

Commit ca86421

Browse files
authored
Merge pull request #1270 from kernelkit/rpi4-doc
Update RPi64 docs a bit [skip ci]
2 parents 9a8d131 + 834f325 commit ca86421

File tree

2 files changed

+308
-45
lines changed

2 files changed

+308
-45
lines changed
Lines changed: 308 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,322 @@
1-
# Raspberry Pi 3B/4B
1+
# Raspberry Pi 3B/4B/CM4
22

3-
## Support level
3+
## Overview
44

5-
Full support for base board but not any extension board on the GPIOs.
6-
Other RPi boards of the same generation may work as well, but may need
7-
some additional testing/work. A few CM4 variants have been tested and
8-
seem to work as expected, but YMMV as always.
5+
The Raspberry Pi is one of the most popular single-board computers with full
6+
Infix support for networking features, making it an excellent platform for
7+
learning, prototyping, and lightweight network applications.
98

10-
### Touch screen
9+
### Hardware Features
1110

12-
The [Raspberry Pi touch display v1][0] is supported on the 4B, including
13-
touch functionality. There are multiple touchscreens on the market for
14-
Raspberry Pi, but currently only the official first version with 800x480
15-
resolution is supported. Infix supplies all drivers required to utilize
16-
the hardware, but you need to add the actual graphical application in a
17-
container.
11+
**Raspberry Pi 3B:**
1812

19-
There are some important considerations you need to know about when
20-
using Infix for graphical applications. The container needs access to
21-
`/dev/dri/` to be able to access the graphics card, it also need access
22-
to `/run/udev` to be able to find the input devices.
13+
- Broadcom BCM2837B0 ARM Cortex-A53 quad-core processor @ 1.4 GHz
14+
- 1 GB LPDDR2 RAM
15+
- microSD card slot for storage
16+
- 4x USB 2.0 ports
17+
- Fast Ethernet (100 Mbps)
18+
- Dual-band WiFi (2.4 GHz + 5 GHz) and Bluetooth 4.2
19+
- HDMI port
20+
- GPIO header (40-pin)
2321

24-
Example of running Doom in Infix:
22+
**Raspberry Pi 4B:**
2523

24+
- Broadcom BCM2711 ARM Cortex-A72 quad-core processor @ 1.5 GHz
25+
- 1 GB, 2 GB, 4 GB, or 8 GB LPDDR4 RAM (depending on model)
26+
- microSD card slot for storage
27+
- 2x USB 3.0 + 2x USB 2.0 ports
28+
- Gigabit Ethernet
29+
- Dual-band WiFi (2.4 GHz + 5 GHz) and Bluetooth 5.0
30+
- 2x micro-HDMI ports (up to 4K output)
31+
- GPIO header (40-pin)
32+
- PoE support (with add-on HAT)
33+
34+
**Compute Module 4 (CM4):**
35+
36+
- Same processor as Pi 4B
37+
- Compact form factor for embedded applications
38+
- Optional eMMC storage (0 GB, 8 GB, 16 GB, or 32 GB)
39+
- Requires carrier board for I/O connectivity
40+
- Various configurations tested and working
41+
42+
### Default Network Configuration
43+
44+
Infix comes preconfigured with:
45+
46+
- **Ethernet port**: DHCP client enabled for internet connectivity
47+
- **WiFi interfaces** (wlan0, wlan1): Available for configuration as AP or client
48+
- **GPIO**: Available but extension boards not currently supported
49+
50+
### Support Level
51+
52+
Full support for base board networking and core functionality. GPIO extension
53+
boards (HATs) are not currently supported. Other Raspberry Pi boards of the
54+
same generation may work but may require additional testing.
55+
56+
## Getting Started
57+
58+
### Quick Start with SD Card
59+
60+
The easiest way to get started is using a microSD card:
61+
62+
1. **Download the SD card image:** [infix-rpi64-sdcard.img][2]
63+
2. **Flash the image to a microSD card:** see [this guide][0]
64+
3. **Boot the board:**
65+
- Insert the microSD card into your Raspberry Pi
66+
- Connect an Ethernet cable to your network
67+
- Connect power (see [Power Supply Requirements](#power-supply-requirements))
68+
- The board will boot automatically
69+
4. **Connect and login:**
70+
- SSH to the DHCP-assigned IP address
71+
- Default login: `admin` / `admin`
72+
73+
> [!NOTE]
74+
> Raspberry Pi 3B and 4B boot with a factory configuration (`factory-config.cfg`)
75+
> that enables DHCP client on the Ethernet port. This means you can access
76+
> the device over the network without needing a serial console. Simply find
77+
> the assigned IP address and SSH in!
78+
>
79+
> **Compute Module 4 (CM4)** and some other variants do not have this factory
80+
> configuration, so you'll need to use a serial console for initial setup or
81+
> configure the carrier board accordingly.
82+
83+
### First Boot Notes
84+
85+
On first boot, Infix will:
86+
87+
- Obtain an IP address via DHCP on the Ethernet port
88+
- Generate unique SSH host keys
89+
- Initialize the configuration system
90+
91+
You can find the assigned IP address by:
92+
93+
- Checking your DHCP server/router's client list
94+
- Using network scanning tools like `nmap` or `arp-scan`
95+
- Connecting via serial console and running `ip addr` (if needed)
96+
97+
## Hardware-Specific Features
98+
99+
### WiFi Configuration
100+
101+
Both Pi 3B and Pi 4B include dual-band WiFi that can be configured as a
102+
client (station mode). See the [Infix WiFi documentation][9] for detailed
103+
configuration examples.
104+
105+
To configure WiFi as a client, first store your WiFi password in the keystore:
106+
107+
```
108+
admin@infix:/> configure
109+
admin@infix:/config/> edit keystore symmetric-key mywifi
110+
admin@infix:/config/keystore/…/mywifi/> set key-format wifi-preshared-key-format
111+
admin@infix:/config/keystore/…/mywifi/> set cleartext-key YourWiFiPassword
112+
admin@infix:/config/keystore/…/mywifi/> leave
26113
```
27-
admin@example:/> configure
28-
admin@example:/config/> edit container doom
29-
admin@example:/config/container/doom/> set image docker://mattiaswal/alpine-doom:latest
30-
admin@example:/config/container/doom/> set privileged
31-
admin@example:/config/container/doom/> edit mount udev
32-
admin@example:/config/container/doom/mount/udev/> set type bind
33-
admin@example:/config/container/doom/mount/udev/> set target /run/udev/
34-
admin@example:/config/container/doom/mount/udev/> set source /run/udev/
35-
admin@example:/config/container/doom/mount/udev/> end
36-
admin@example:/config/container/doom/mount/xorg.conf/> set content U2VjdGlvbiAiT3V0cHV0Q2xhc3MiCiAgSWRlbnRpZmllciAidmM0IgogIE1hdGNoRHJpdmVyICJ2YzQiCiAgRHJpdmVyICJtb2Rlc2V0dGluZyIKICBPcHRpb24gIlByaW1hcnlHUFUiICJ0cnVlIgpFbmRTZWN0aW9uCg==
37-
admin@example:/config/container/doom/mount/xorg.conf/> set target /etc/X11/xorg.conf
38-
admin@example:/config/container/doom/mount/xorg.conf/> end
39-
admin@example:/config/container/doom/> edit volume var
40-
admin@example:/config/container/doom/volume/var/> set target /var
41-
admin@example:/config/container/doom/volume/var/> leave
42-
admin@example:/>
114+
115+
Then configure the WiFi interface using the keystore reference:
116+
117+
```
118+
admin@infix:/> configure
119+
admin@infix:/config/> edit interface wifi0
120+
admin@infix:/config/interface/wifi0/> set ipv4 dhcp-client
121+
admin@infix:/config/interface/wifi0/> set wifi ssid YourNetworkName
122+
admin@infix:/config/interface/wifi0/> set wifi secret mywifi
123+
admin@infix:/config/interface/wifi0/> set wifi country-code US
124+
admin@infix:/config/interface/wifi0/> leave
43125
```
44126

45127
> [!NOTE]
46-
> The `xorg.conf` [content mount][2] is a nifty detail of Infix that
47-
> allows you to keep all the relevant configuration in a single file.
48-
> The deta is "simply" `base64` encoded, so you do not really need the
49-
> features of the Infix CLI, everything can be set up remotely [using
50-
> `curl`][3] if you like.
128+
> The WiFi password (8-63 characters) is stored securely in the keystore as
129+
> `mywifi` (or any name you choose), which is then referenced in the WiFi
130+
> configuration. The country-code must match your location for regulatory
131+
> compliance (e.g., US, SE, DE, JP).
132+
133+
### Touch Screen Support
134+
135+
The [Raspberry Pi Touch Display v1][10] (800x480 resolution) is supported on
136+
the Pi 4B, including touch functionality. To use graphical applications with
137+
the touch screen, you need to run them in a container with proper device
138+
access.
139+
140+
#### Requirements for Graphical Applications
141+
142+
Containers need:
143+
- Access to `/dev/dri/` for graphics card access
144+
- Access to `/run/udev` for input device detection
145+
- Privileged mode or specific capabilities
146+
147+
#### Example: Running Doom with Touch Screen
148+
149+
```
150+
admin@infix:/> configure
151+
admin@infix:/config/> edit container doom
152+
admin@infix:/config/container/doom/> set image docker://mattiaswal/alpine-doom:latest
153+
admin@infix:/config/container/doom/> set privileged
154+
admin@infix:/config/container/doom/> edit mount udev
155+
admin@infix:/config/container/…/udev/> set type bind
156+
admin@infix:/config/container/…/udev/> set target /run/udev/
157+
admin@infix:/config/container/…/udev/> set source /run/udev/
158+
admin@infix:/config/container/…/udev/> end
159+
admin@infix:/config/container/doom/> edit mount xorg.conf
160+
admin@infix:/config/container/…/xorg.conf/> set content U2VjdGlvbiAiT3V0cHV0Q2xhc3MiCiAgSWRlbnRpZmllciAidmM0IgogIE1hdGNoRHJpdmVyICJ2YzQiCiAgRHJpdmVyICJtb2Rlc2V0dGluZyIKICBPcHRpb24gIlByaW1hcnlHUFUiICJ0cnVlIgpFbmRTZWN0aW9uCg==
161+
admin@infix:/config/container/…/xorg.conf/> set target /etc/X11/xorg.conf
162+
admin@infix:/config/container/…/xorg.conf/> end
163+
admin@infix:/config/container/doom/> edit volume var
164+
admin@infix:/config/container/…/var/> set target /var
165+
admin@infix:/config/container/…/var/> leave
166+
```
167+
168+
> [!NOTE]
169+
> The `xorg.conf` [content mount][3] is a useful Infix feature that allows you
170+
> to keep all configuration in a single file. The data is base64 encoded, and
171+
> everything can be set up remotely [using `curl`][4] if preferred.
172+
173+
### Power Supply Requirements
174+
175+
Proper power supply is critical for stable operation:
176+
177+
- **Raspberry Pi 4B:** 5V/3A USB-C power supply (official recommended)
178+
- **Raspberry Pi 3B:** 5V/2.5A micro-USB power supply
179+
- **Compute Module 4:** Power requirements depend on carrier board
180+
181+
Inadequate power can cause:
182+
- Random reboots or crashes
183+
- USB device failures
184+
- Network disconnections
185+
- Corrupted storage
186+
187+
<img align="right" src="gpio-pinout.png" alt="GPIO Pinout" width=300 padding=10>
188+
189+
### Serial Console Access (Optional)
190+
191+
A serial console is useful for debugging but not required for Pi 3B/4B, since
192+
the factory configuration enables network access via DHCP. For CM4 and other
193+
variants without factory configuration, serial console access is required for
194+
initial setup.
195+
196+
To connect via serial:
197+
198+
1. Connect a USB-to-TTL serial adapter (3.3V) to GPIO pins:
199+
- GND (black wire) → Pin 6 (Ground)
200+
- TX → Pin 8 (GPIO 14, RXD)
201+
- RX → Pin 10 (GPIO 15, TXD)
202+
- **VCC (red wire) → Leave disconnected** (Pi has its own power supply)
203+
2. Use 115200 baud, 8 data bits, no parity, 1 stop bit (115200 8N1)
204+
3. Connect using `screen`, `minicom`, or similar terminal emulator
205+
206+
The image shows the standard 40-pin GPIO header pinout. For serial console:
207+
- **Pin 6** (black) = Ground
208+
- **Pin 8** (orange) = TxD (UART) - connect to RX on your adapter
209+
- **Pin 10** (orange) = RxD (UART) - connect to TX on your adapter
210+
211+
> [!WARNING]
212+
> Use only 3.3V serial adapters. 5V adapters will damage your Raspberry Pi!
213+
214+
## Troubleshooting
215+
216+
### Board won't boot
217+
218+
- Verify the power supply meets requirements (see [Power Supply Requirements](#power-supply-requirements))
219+
- Check that the SD card is properly seated
220+
- Try re-flashing the SD card image
221+
- Look for the green LED activity indicator (should flash during boot)
222+
- Connect via serial console to see boot messages if needed
223+
224+
### Can't find IP address
225+
226+
- Ensure Ethernet cable is properly connected (look for link LED activity)
227+
- Verify your DHCP server is running and has available addresses
228+
- Check your router/DHCP server's client list for new devices
229+
- Use `nmap` or `arp-scan` to scan your network
230+
- Connect via serial console and run `ip addr` to see the assigned address
231+
232+
### WiFi not working
233+
234+
- Verify WiFi regulatory domain is set correctly
235+
- Check that SSID and password are correct
236+
- Ensure WiFi channel is supported in your region
237+
- Try connecting to a 2.4 GHz network first (better compatibility)
238+
239+
### SD card corruption
240+
241+
If the system becomes unresponsive or won't boot:
242+
243+
- Always use proper shutdown procedures (don't just pull power)
244+
- Use a quality SD card (Class 10, A1, or better recommended)
245+
- Consider using a UPS or battery backup for critical deployments
246+
- Verify power supply meets requirements (see [Power Supply Requirements](#power-supply-requirements))
247+
248+
### Container/Docker issues
249+
250+
- Verify adequate RAM is available (check with `free -h`)
251+
- Ensure sufficient SD card space (check with `df -h`)
252+
- For Pi 3B, consider using lighter containers due to limited RAM
253+
254+
## Additional Resources
255+
256+
- [Infix Documentation][1]
257+
- [Flashing SD Card Guide][0]
258+
- [Infix Container Documentation][3]
259+
- [Scripting with RESTCONF][4]
260+
- [Release Downloads][8]
261+
- [Official Raspberry Pi Documentation][11]
262+
263+
## Building Custom Images
264+
265+
See the main Infix documentation for building from source. To build a custom
266+
Raspberry Pi image:
267+
268+
```bash
269+
# Build the bootloader (only needed once or when bootloader changes)
270+
make O=x-boot rpi64_boot_defconfig
271+
make O=x-boot
272+
273+
# Build main system
274+
make aarch64_defconfig
275+
make
276+
277+
# Create SD card image
278+
./utils/mkimage.sh -od raspberrypi-rpi64
279+
```
280+
281+
The resulting image will be in `output/images/infix-rpi64-sdcard.img`.
282+
283+
### Customizing the Build
284+
285+
You can customize the build by:
286+
- Modifying `board/aarch64/raspberrypi-rpi64/config.txt` for boot configuration
287+
- Adding packages to the Buildroot configuration
288+
- Customizing the device tree in `board/aarch64/raspberrypi-rpi64/dts/`
289+
290+
## Performance Notes
291+
292+
### Raspberry Pi 4B vs 3B
293+
294+
The Pi 4B offers significant improvements over the 3B:
295+
- 3x faster processor
296+
- Up to 8x more RAM
297+
- Gigabit Ethernet (vs 100 Mbps)
298+
- USB 3.0 for faster storage and peripherals
299+
- Better thermal performance
300+
301+
For network-intensive applications, the Pi 4B is strongly recommended.
302+
303+
### Raspberry Pi as a Router
51304

52-
### Pre-built images
305+
While capable of basic routing tasks, be aware of limitations:
306+
- Single Ethernet port (consider USB Ethernet adapters for multi-port setups)
307+
- CPU-based packet processing (no hardware offload)
308+
- Best suited for home/lab use rather than high-throughput production
53309

54-
Pre-built SD card images are available here: [infix-rpi64-sdcard.img][sdcard]
310+
For applications requiring multiple ports or high performance, consider
311+
dedicated networking hardware like the [Banana Pi R3][12].
55312

56-
[0]: https://www.raspberrypi.com/products/raspberry-pi-touch-display/
57-
[1]: https://github.com/kernelkit/infix/releases/download/latest-boot/infix-rpi64-sdcard.img
58-
[2]: https://kernelkit.org/infix/latest/container/#content-mounts
59-
[3]: https://kernelkit.org/infix/latest/scripting-restconf/
313+
[0]: https://kernelkit.org/posts/flashing-sdcard/
314+
[1]: https://kernelkit.org/infix/latest/
315+
[2]: https://github.com/kernelkit/infix/releases/download/latest-boot/infix-rpi64-sdcard.img
316+
[3]: https://kernelkit.org/infix/latest/container/#content-mounts
317+
[4]: https://kernelkit.org/infix/latest/scripting-restconf/
318+
[8]: https://github.com/kernelkit/infix/releases/tag/latest-boot
319+
[9]: https://kernelkit.org/infix/latest/networking/#wifi
320+
[10]: https://www.raspberrypi.com/products/raspberry-pi-touch-display/
321+
[11]: https://www.raspberrypi.com/documentation/
322+
[12]: https://kernelkit.org/infix/latest/hardware/#banana-pi-bpi-r3
220 KB
Loading

0 commit comments

Comments
 (0)