DietPi version | G_DIETPI_VERSION_CORE=8
G_DIETPI_VERSION_SUB=22
G_DIETPI_VERSION_RC=3
G_GITBRANCH=‘master’
G_GITOWNER=‘MichaIng’
Distro version | bookworm
Kernel version | Linux DietPi 5.10.160-legacy-rk35xx #1 SMP Mon Aug 28 01:21:24 UTC 2023 aarch64 GNU/Linux
Architecture | arm64
SBC model | Orange Pi 5 (aarch64)
Power supply used | 5V4A RPI
SD card used | SanDisk ultra
Additional Information (if applicable)
Software title | DietPi
Upgrade from 8.21 to 8.22
Steps to reproduce
On 8.21 I manually added overlays to /boot/dietpiEnv.txt:
overlays=opi5-spi4-m0-cs1-spidev opi5-pwm15-m2
After a reboot, PWM and SPI were working as expected.
Then I upgraded DietPi from 8.21 to 8.22 and PWM and SPI stopped working.
Expected behaviour
With the overlays in /boot/dietpiEnv.txt , PWM and SPI should still work
Actual behaviour
PWM and SPI don’t work.
The PWM and SPI resources no longer exist after the upgrade:
/sys/class/pwm/pwmchip15 → doesn’t exist anymore after upgrade
/dev/spidev4.1 → doesn’t exist anymore after upgrade
I was finally able to solve the problem myself. It might have been a kernel update, but I’m not sure.
Unfortunately my knowledge is not that deep in Linux.
Isn’t the DietPi version related (coupled) to the kernel version? Is a kernel update possible without updating DietPi?
Anyway, the solution was to update /boot/dietpiEnv.txt as follows:
rootdev=UUID=[myuuid]
rootfstype=ext4
# The init system logs to the console defined last.
consoleargs=console=tty1
usbstoragequirks=
extraargs=net.ifnames=0
docker_optimizations=on
overlay_path=rockchip
overlay_prefix=rk3588
overlays=spi4-m0-cs1-spidev pwm15-m2
user_overlays=
So overlays changed from opi5-spi4-… to spi4-… (the opi5- prefix got removed).
The same for pwm: opi5-pwm15-… → pwm15-…
After a reboot, pwm15-m2 appears here:
/sys/class/pwm/pwmchip2
I would like to add configuration of spi, pwm and i2c to dietpi-config.
I have developer skills but not specific to Linux.
So could anyone give me some hints/advises on how to add spi, pwm and i2c configuration to dietpi-config?
DietPi version is not related to a kernel version. For most of SBC we don’t do one kernel development and use different kernel depending on SBC. Could be vendor kernel, Armbian or others.
Usually they will be updated running apt upgrade, which we trigger automatically before applying our DietPi update.