The lack of modularity on all-in-one computers (eg the Raspberry Pi 500+) was enough to make us build an alternative desktop solution out of a Compute Module 5. The idea being to make something a bit more future proof than an all-in-one that retains some of the charm/convenience but doesn't involve a perfectly good keyboard becoming ewaste once the brains of the machine start to look dated.
It's has a footprint that is about ten times smaller and is a few hundred times more powerful than the original. It runs RaspiOS.
It has the upside of letting you use a hot-swappable keyboard so that you can swap out switches as you go down the mechanical keyboard rabbit hole. It also has full size HDMI ports and a speaker to let you add a startup sound.
[irix OS, SGI irix and the 4dwm gui are trademarks of silicon graphics. inc.]
Here's an overview video of the full build and a demo of it in action (click/tap to play):
- A Raspberry Pi CM5
- A Raspberry Pi CM5 IO Board
- nVME drive
- An 8 ohm 3w speaker
- MAX98357 Audio Power Amplifier Module
- 3d printed case (stl files in /3d)
- 4 x feet (to give some clearance for the down-firing speaker)
- Wires (to attach the speaker to the HAT)
- microSD card ≥8 GB (for RaspiOS transfer)
Attach the 8 ohm speaker to the 3d printed lid, pointing downwards. Then connect to the MAX98357 amp as follows:
| MAX98357A Pin | Connect to CM5 J8 Pin | GPIO | Function |
|---|---|---|---|
| VIN | Pin 2 or Pin 4 | — | 5 V power supply |
| GND | Pin 6 (or any GND) | — | Ground |
| BCLK | Pin 12 | GPIO18 | I²S Bit Clock |
| LRC | Pin 35 | GPIO19 | I²S Word Select (LRCLK) |
| DIN | Pin 40 | GPIO21 | I²S Audio Data |
| MAX98357A | Speaker |
|---|---|
| SPK+ | Speaker + |
| SPK− | Speaker − |
Attach the CM5 io board to the top of the enclosure. Place the rubber feet on the second (bottom part) of the enclosure, to give the speaker some room. Slide the cover on. Screw shut (TODO: Add images)
- CM5 mounted on IO Board
- NVMe SSD in USB/PCIe adapter
- microSD card ≥8 GB (for first boot)
- Monitor, keyboard, and mouse for desktop setup
- A second computer to flash the SD card and/or NVMe
- Download and install Raspberry Pi Imager on another computer.
- Insert your SD card.
- Select OS -> Raspberry Pi OS Full Desktop (Trixie).
- Select the SD card as target.
- (Optional) Open Advanced Options (gear icon) to set hostname, enable SSH, configure Wi-Fi, and locale.
- Click Write and wait for completion.
Note: This initial flashing must be done on a separate computer before first boot on the CM5.
- Insert SD card into the IO Board.
- Connect monitor, keyboard, and mouse.
- Power on - the desktop environment should appear.
- Open a terminal and update the system:
sudo apt update && sudo apt full-upgrade -y
sudo rpi-update
sudo rebootsudo rpi-eeprom-update
sudo rpi-eeprom-update -asudo rpi-eeprom-config --editSet:
BOOT_UART=1
BOOT_ORDER=0xf461 # SD first, NVMe second, USB thirdSave and exit.
- Insert NVMe SSD via USB/PCIe adapter.
- Verify it is detected:
lsblk-
SD card:
/dev/mmcblk0 -
NVMe:
/dev/nvme0n1 -
Wipe NVMe if necessary:
sudo wipefs -a /dev/nvme0n1- On a second computer or on the CM5, open Raspberry Pi Imager.
- Select OS -> Raspberry Pi OS Lite (Trixie).
- Select NVMe SSD as target.
- (Optional) Configure Advanced Options for SSH, Wi-Fi, and locale.
- Click Write and wait for completion.
Alternatively, if using CM5 CLI, you can use
rpi-imager --cli <image> /dev/nvme0n1.
If you want preconfigured settings on NVMe, mount the NVMe boot partition:
sudo mkdir /mnt/nvfat
sudo mount /dev/nvme0n1p1 /mnt/nvfat
sudo cp /boot/firmware/user-data /mnt/nvfat/
sudo cp /boot/firmware/network-config /mnt/nvfat/
sudo cp /boot/firmware/config.txt /mnt/nvfat/Optionally edit /mnt/nvfat/cmdline.txt to suppress first-boot prompts:
quiet splash plymouth.ignore-serial-consoles cfg80211.ieee80211_regdom=US
- Shut down CM5.
- Remove SD card.
- Power on CM5 - it should now boot from NVMe and display the full desktop.
sudo apt update && sudo apt full-upgrade -y
sudo rpi-update
sudo reboot- Optional: expand filesystem via
sudo raspi-config-> “Expand Filesystem” - Configure Wi-Fi, user accounts, and desktop applications as desired.
In your running RaspiOS, edit /boot/firmware/config.txt to include
dtparam=i2s=on
dtoverlay=hifiberry-dac
Congratulations, you now have a little computer that is a nice combo of ever so old and brand new.
It's easy to take a fabulous sound file and have a systemd command play it at startup.

