Using DietPi on the RevPi Flat S

Topics about the Software of Revolution Pi
Post Reply
User avatar
rubenwaterman
Posts: 2
Joined: 04 Aug 2025, 08:20

Using DietPi on the RevPi Flat S

Post by rubenwaterman »

I've been running Loxberry (https://wiki.loxberry.de/installation_v ... erry/start) for a while on a regular Raspberry Pi 4, with a separate Modbus USB stick and a 24V to 5V stepdown regulator (to provide the Raspberry Pi with 5V power). However, when I stumbled upon the RevPi Flat S, I thought it's a perfect replacement and probably much more durable since I can input the Modbus signal directly on the RS485-0 input and I can use the already available 24V in the panel.

Unfortunately Loxberry can only be installed when the device is running DietPi (https://dietpi.com/) which is a problem since in order to get access to the interfaces on the RevPi, I could only get this to work with flashing the RevPi image. I've tried to follow the steps from https://gitlab.com/revolutionpi/debos-build as closely as possible but unfortunately I can't seem to be able to load the correct overlays and/or kernel for the DietPi OS to see any of the RevPi interfaces :(

Here is roughly what I've done so far:

Code: Select all

# Flashed RevPi image first, which I then attempted to install DietPi on (unfortunately the dietpi-installer seems to override the revpi specifics)
bash -c "$(curl -sSfL 'https://raw.githubusercontent.com/MichaIng/DietPi/master/.build/images/dietpi-installer')"

Code: Select all

# Download and add the Revolution Pi repository key
wget https://gitlab.com/revolutionpi/debos-build/-/raw/master/overlays/repositories/usr/share/keyrings/_revpi-keyring.gpg -O /tmp/_revpi-keyring.gpg
sudo cp /tmp/_revpi-keyring.gpg /usr/share/keyrings/
sudo chmod 644 /usr/share/keyrings/_revpi-keyring.gpg

Code: Select all

# Add the Revolution Pi repository
echo "deb [signed-by=/usr/share/keyrings/_revpi-keyring.gpg] http://packages.revolutionpi.de/ bookworm main contrib" | sudo tee /etc/apt/sources.list.d/revpi.list
echo "deb [signed-by=/usr/share/keyrings/_revpi-keyring.gpg] http://packages.revolutionpi.de/ bookworm-backports main contrib" | sudo tee -a /etc/apt/sources.list.d/revpi.list
sudo apt update

Code: Select all

# Install essential Revolution Pi packages
sudo apt install -y linux-image-revpi-v8 revpi-firmware revpi-base-files revpi-tools

Code: Select all

# Install minimum packages for Revolution Pi system
sudo apt install -y picontrol pitest revpi-nm-config network-manager wpasupplicant wireless-regdb systemd-timesyncd iproute2

Code: Select all

# Copy Revolution Pi overlay
sudo cp /boot/firmware/overlays/revpi-dt-blob.dtbo /boot/firmware/dt-blob.bin

Code: Select all

# adjust /boot/firmware/config.txt to attempt to load the revpi kernel (added these two lines at the bottom)
kernel=vmlinuz-6.6.0-revpi9-rpi-v8
dtoverlay=vc4-kms-v3d,dwc2,dr_mode=host,ant2,revpi-flat-s-2022

Code: Select all

# rebooted system and check if revpi kernel is loaded (which it's not)
uname -a
Linux loxberry 6.12.34+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1~bookworm (2025-06-26) aarch64 GNU/Linux
Clearly, I must be doing something wrong as the RevPi kernel is not loaded and as a result when I run piTest -d, I don't get any devices:

Code: Select all

root@loxberry:/opt/loxberry# piTest -d
Failed to open /dev/piControl0: No such file or directory
Cannot retrieve device list: Operation not permitted
Any help would be greatly appreciated as otherwise I have to revert to my old setup of a regular Raspberry Pi :(
User avatar
nicolaiB
KUNBUS
Posts: 1131
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: Using DietPi on the RevPi Flat S

Post by nicolaiB »

Flat S should work with RS485 interface directly with any Raspberry Pi based OS if the right overlay is used. You wont need piControl or other stuff. Besides that: What was the issue when you tried to install loxberry with the RevPi OS?
Nicolai
User avatar
rubenwaterman
Posts: 2
Joined: 04 Aug 2025, 08:20

Re: Using DietPi on the RevPi Flat S

Post by rubenwaterman »

Hmm.. correct me if I'm wrong but I think the Flat S IOs are connected via some USB board internall? And it appears that when using just DietPi, I don't get any USB port to work (even inserting the Modbus External USB dongle I had to the regular Rapsberry Pi) so therefore also the internal RS485 ports didn't work (I think).

I'd of course prefer to use the RevPi image but when installing the loxberry setup (which one would do with the script below), it errors out indicating that this is not a DietPi installation and therefore aborts the install script.

Code: Select all

wget https://raw.githubusercontent.com/mschlenstedt/Loxberry_Installer/main/install.sh && bash install.sh | tee /boot/loxberry_install.log
User avatar
nicolaiB
KUNBUS
Posts: 1131
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: Using DietPi on the RevPi Flat S

Post by nicolaiB »

I've missed the implicit dependency. To I would suggest to install dietpi + our devicetree overlay (copy /boot/firmware/revpi-flat-s-2022.dtbo from the latest revpi image to the overlay folder on your dietpi). With this the raspberry bootloader will pick up all relevant hardware configuration and you can access the rs485 interface with the usual /dev/ttyAMA ...
Nicolai
Post Reply