kernel: pcnet32: load module at boot

config_generate runs from preinit (82_config_generate), which comes before
kmodloader loads /etc/modules.d from /etc/init.d/boot. On targets without a
board-specific network config, such as malta, 99-default_network only adds a
wan interface if eth1 exists at that point:

  [ -d /sys/class/net/eth1 ] && ucidef_set_interface_wan 'eth1'

Since pcnet32 was not loaded yet, eth1 never showed up in time, so malta images
never got a wan interface, even with a second NIC attached. QEMU with two pcnet
NICs, as used by openwrt-tests, shows the problem: ubus call
network.interface.wan status returns "Not found".

Add pcnet32 to modules-boot.d, as is already done for r8169 and e1000e, so the
NICs exist when the board config is generated. Its dependency kmod-mii already
loads at boot.

Link: https://github.com/openwrt/openwrt/pull/26374
Signed-off-by: Paul Spooren <mail@aparcar.org>
This commit is contained in:
Paul Spooren committed 2026-11-01 23:11:43 +01:00
1 parent ba2d402119
commit b3a3e4bdd0
1 file changed
+1 -1
+1 -1
View File
@@ -1636,7 +1636,7 @@ define KernelPackage/pcnet32
DEPENDS:=@(PCI_SUPPORT||TARGET_malta) +kmod-mii
KCONFIG:=CONFIG_PCNET32
FILES:=$(LINUX_DIR)/drivers/net/ethernet/amd/pcnet32.ko
AUTOLOAD:=$(call AutoProbe,pcnet32)
AUTOLOAD:=$(call AutoProbe,pcnet32,1)
endef
define KernelPackage/pcnet32/description