build: allow AutoLoad and AutoProbe to specify modules not included in the package
authorFelix Fietkau <nbd@openwrt.org>
Wed, 19 Nov 2014 20:16:50 +0000 (20:16 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 19 Nov 2014 20:16:50 +0000 (20:16 +0000)
On out-of-tree modules depending on other out-of-tree modules from a
different tree, module dependencies are not filled properly.
This change helps with adding those dependencies in the AutoLoad call

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 43323

include/kernel.mk

index ae2dcc3fd98206871751e002cb25c412a02ff501..28c8cf8974cff31a22efa64282357468e3725a19 100644 (file)
@@ -84,10 +84,8 @@ define ModuleAutoLoad
                boot="$$$$$$$$2"; \
                shift 2; \
                for mod in $$$$$$$$mods; do \
-                       if [ -e $(2)/$(MODULES_SUBDIR)/$$$$$$$$mod.ko ]; then \
-                               mkdir -p $(2)/etc/modules.d; \
-                               echo "$$$$$$$$mod" >> $(2)/etc/modules.d/$(1); \
-                       fi; \
+                       mkdir -p $(2)/etc/modules.d; \
+                       echo "$$$$$$$$mod" >> $(2)/etc/modules.d/$(1); \
                done; \
                if [ -e $(2)/etc/modules.d/$(1) ]; then \
                        if [ "$$$$$$$$boot" = "1" ]; then \
@@ -103,10 +101,8 @@ define ModuleAutoLoad
                boot="$$$$$$$$3"; \
                shift 3; \
                for mod in $$$$$$$$mods; do \
-                       if [ -e $(2)/$(MODULES_SUBDIR)/$$$$$$$$mod.ko ]; then \
-                               mkdir -p $(2)/etc/modules.d; \
-                               echo "$$$$$$$$mod" >> $(2)/etc/modules.d/$$$$$$$$priority-$(1); \
-                       fi; \
+                       mkdir -p $(2)/etc/modules.d; \
+                       echo "$$$$$$$$mod" >> $(2)/etc/modules.d/$$$$$$$$priority-$(1); \
                done; \
                if [ -e $(2)/etc/modules.d/$$$$$$$$priority-$(1) ]; then \
                        if [ "$$$$$$$$boot" = "1" ]; then \