The most efficient approach is to use a Raspberry Pi CM5 with a carrier board (such as WaveShare CM5-IO-BASE-B) and a M.2 SSD to have the fastest boot times.
Below tested hardware configuration
- Raspberry Pi Compute Module 5, 16 GB RAM, Wireless
- M2 2242 size SSD, 128 GB (SK M2 NVME 2242 128GB)
- WaveShare CM5-IO-BASE-B carrier board
- Raspberry Pi Compute Module 5 Passive Cooler
- (Optional) Compute Module CM4/CM5 Antenna kit
Install the M2 SSD and CM5 module with the provided screws.
To fit the passive cooler, unscrew the fan that comes with the CM5-IO-BASE-B carrier board and position it outside the box, routing the cable back inside through one of the openings.
The antenna kit is required to use WiFi, as the box will significantly attenuate any WiFi signals from reaching the onboard antenna. Note you must update the raspberry pi configuration to use the external antenna.
- Install Raspberry Pi Imager
- Install or build the latest version of rpiboot (On Windows, download the installer available in the releases page)
- Plug a USB-C cable to your PC while holding down the
BOOTbutton. In other carrier boards, instead, place a jumper betweennRPIBOOTandGND(J2 pins 1-2 in the official CM5 carrier board) before plugging in the USB-C cable. - Run
sudo rpiboot(On windows, launchrpi-mass-storage-gadget64.bat). This should mount a writeable USB drive on which we'll write the OS image. - Flash the image using the Raspberry Pi Imager utility. (Recommended to use 64-bit Raspberry Pi OS)
Source: https://www.waveshare.com/wiki/Compute_Module_Burn_EMMC
A few optional tweaks to improve boot times.
- Ensure everything is up to date
sudo apt update && sudo apt full-upgrade
- Update bootloader and reboot:
sudo rpi-eeprom-update -a
sudo reboot
-
Change the boot order to prefer NVMe:
- Open the Raspberry Pi configuration editor (
sudo raspi-config) - Navigate to
Advanced Options>Boot>Boot Order - Highlight
NVMe/USB Bootand press enter - Follow the prompts
- Open the Raspberry Pi configuration editor (
-
Disable network wait:
sudo systemctl disable --now NetworkManager-wait-online.service
sudo systemctl mask NetworkManager-wait-online.service
# Install dependencies
sudo apt install libasound2-dev
# Install the .NET SDK
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
chmod +x ./dotnet-install.sh
./dotnet-install.sh
rm ./dotnet-install.sh
echo 'export DOTNET_ROOT=$HOME/.dotnet' >> ~/.bashrc
echo 'export PATH=$PATH:$HOME/.dotnet' >> ~/.bashrc
source ~/.bashrc
# Clone the repository
git clone https://github.com/MatthewInch/UI24RBridge.git
# Build
cd UI24RBridge/UI24RBridgeTest/
dotnet build -c Release