From: nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Date: Fri, 26 Feb 2010 22:45:54 +0000 (+0000)
Subject: add support for marking specific kernel module packages as potentially being required... 
X-Git-Url: https://git.rohieb.name/openwrt.git/commitdiff_plain/99411298b4b284975fa059f5dda1ce78c04edd85

add support for marking specific kernel module packages as potentially being required for mounting the rootfs (patch by cshore)

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19878 3c298f89-4303-0410-b956-a3cf2f4a3e73
---

diff --git a/include/kernel.mk b/include/kernel.mk
index 480b9682c..1ca231282 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -70,6 +70,9 @@ define ModuleAutoLoad
 	add_module() { \
 		mkdir -p $(2)/etc/modules.d; \
 		( \
+			[ "$$$$$$$$3" = "1" ] && { \
+				echo '# May be required for rootfs' ; \
+			} ; \
 			for mod in $$$$$$$$2; do \
 				getvar mod; \
 			done \
@@ -154,7 +157,7 @@ $(call KernelPackage/$(1)/config)
 endef
 
 define AutoLoad
-  add_module $(1) "$(2)";
+  add_module $(1) "$(2)" $(3);
 endef
 
 ifdef DUMP