The VersaNode OS Kernel-level Mod Stage enables I²C, SPI, and 1‑Wire interfaces and drops a udev rule —
all without using on_chroot. Every modification is applied directly to
${ROOTFS_DIR}, making it safe for automated builds and reproducible images.
- Adds or updates the following entries in
${ROOTFS_DIR}/boot/firmware/config.txt:dtparam=i2c_arm=on dtparam=spi=on dtoverlay=w1-gpio
- Installs I/O toolchain packages via 00-packages (handled automatically by pi-gen):
i2c-toolspython3-smbusspi-tools
- Drops a udev rule to grant the
plugdevgroup access to I2C and SPI device nodes.
stage2-kmods/
00-versanode-bus-io/
00-packages
00-run.sh
files/
etc/udev/rules.d/99-versa-bus.rules
- Idempotent: re-runs won’t duplicate lines in
config.txt. - Compatible with both Raspberry Pi OS Lite and custom pi-gen derivatives.
- No root filesystem mounting tricks required — everything is path-relative.
