kernel: do not try to probe builtin modules on empty kmod package install
authorJonas Gorski <jonas.gorski@gmail.com>
Sun, 18 Jun 2017 15:40:01 +0000 (17:40 +0200)
committerJonas Gorski <jonas.gorski@gmail.com>
Thu, 20 Jul 2017 10:49:09 +0000 (12:49 +0200)
Builtin modules are always present, and trying to load them will cause
modprobe to spew errors when installing the empty kmod packages.

Fix this by never generating any postinst module install instructions
for builtin modules.

Fixes #842.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
include/kernel.mk

index 7674f0dadc202a4aa02c609296acc191377a3cad..d780ef0ce2d79c4009c2960f369277d661816fec 100644 (file)
@@ -136,6 +136,7 @@ define ModuleAutoLoad
                local mod; \
                shift 2; \
                for mod in $$$$$$$$mods; do \
+                       [ -e $(2)/$(MODULES_SUBDIR)/$$$$$$$$mod.ko ] || continue; \
                        mkdir -p $(2)/etc/modules.d; \
                        echo "$$$$$$$$mod" >> $(2)/etc/modules.d/$(1); \
                done; \
@@ -154,6 +155,7 @@ define ModuleAutoLoad
                local mod; \
                shift 3; \
                for mod in $$$$$$$$mods; do \
+                       [ -e $(2)/$(MODULES_SUBDIR)/$$$$$$$$mod.ko ] || continue; \
                        mkdir -p $(2)/etc/modules.d; \
                        echo "$$$$$$$$mod" >> $(2)/etc/modules.d/$$$$$$$$priority-$(1); \
                done; \