mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-14 13:08:30 +04:00
The bcm27xx/bcm2708 all-kmods CI build fails when modpost reaches the DesignWare I2C core module: ERROR: modpost: "__aeabi_uldivmod" [drivers/i2c/busses/i2c-designware-core.ko] undefined! This is triggered by CONFIG_ALL_KMODS=y. The old 32-bit Raspberry Pi subtargets do not normally select this driver for runtime use, but all-kmods forces the kmod package to be built anyway. On 32-bit ARM, raw 64-bit division in a module can cause GCC to emit the ARM EABI helper __aeabi_uldivmod, which is not available as a kernel module symbol. The failing reference comes from i2c-designware-master.c, where clock_calc() uses raw u64 division for SCL timing calculations (introduced with commit 3805d13c3ead21494f7d00aa44f10e3656363d4c in rpi-6.18.y / "i2c: designware: Support non-standard bus speeds"). That is a kernel-side portability issue, but these old bcm27xx subtargets do not use DesignWare I2C hardware. They use the Broadcom I2C controller instead. The failure is emitted for i2c-designware-core.ko, so guard the hidden core package itself rather than only guarding the platform or PCI frontend package. This prevents CONFIG_ALL_KMODS from selecting the failing core module directly on the affected 32-bit bcm27xx subtargets. DesignWare I2C is relevant for newer Raspberry Pi 5 / RP1 based systems, so keep it available for bcm2712. A similar issue was reported by NixOS for Raspberry Pi ARM builds, where i2c-designware-core.ko failed with the same unresolved __aeabi_uldivmod symbol. Their workaround was to disable the DesignWare I2C symbols for older Raspberry Pi targets that do not need them. Link: https://github.com/NixOS/nixpkgs/issues/464515 Until the underlying ARM32 kernel-side issue is fixed, avoid building the DesignWare core package on bcm2708, bcm2709 and bcm2710. Signed-off-by: Joshua Covington <joshuacov@gmail.com> Link: https://github.com/openwrt/openwrt/pull/23703 Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>