raspberry-pi: Disable unused Pi 1 kernel modules

Nixpkgs enables optional kernel modules by default, including the RP1 PWM
and camera drivers and the DesignWare I2C driver. The ARM32 build fails in
modpost when these drivers reference __aeabi_uldivmod and __aeabi_ldivmod,
which are unavailable to kernel modules.

Disable the affected drivers when rpiVersion is 1. The Pi 1 uses BCM2835
peripherals and has no RP1 or DesignWare I2C controller, so these drivers
are not needed. The BCM2835 PWM and camera drivers remain enabled.

OpenWrt excludes the DesignWare I2C core on its older 32-bit Raspberry Pi
targets for the same reason.

Link: https://github.com/openwrt/openwrt/commit/11de7145c95259899d8880f4d53f933c591fbd00
Link: https://github.com/NixOS/nixpkgs/issues/464515
Signed-off-by: Cryolitia PukNgae <cryolitia@mercallure.com>
This commit is contained in:
Cryolitia PukNgae committed 2026-10-19 16:01:18 +08:00
1 parent 60a624466c
commit 9d17af9966
1 file changed
+12
+12
View File
@@ -83,6 +83,18 @@ in
PREEMPT = lib.mkForce no;
PREEMPT_LAZY = lib.mkForce no;
PREEMPT_VOLUNTARY = lib.mkForce yes;
}
# These controllers are absent on Pi 1. Nixpkgs' automatic module selection
# enables them, but they use division helpers unavailable to 32-bit modules.
# https://github.com/NixOS/nixpkgs/issues/464515
// lib.optionalAttrs (rpiVersion == 1) {
PWM_RP1 = no;
I2C_DESIGNWARE_CORE = no;
I2C_DESIGNWARE_SLAVE = no;
I2C_DESIGNWARE_PLATFORM = no;
I2C_DESIGNWARE_PCI = no;
VIDEO_RP1_CFE = no;
VIDEO_RP1_CFE_DOWNSTREAM = no;
};
extraMeta =