Browse Source

allow to disable kernel module autoloading mechanism, useful when a big defconfig is used

Waldemar Brodkorb 7 years ago
parent
commit
5b1d047a64
2 changed files with 11 additions and 1 deletions
  1. 4 1
      package/base-files/Makefile
  2. 7 0
      target/config/Config.in.runtime

+ 4 - 1
package/base-files/Makefile

@@ -6,7 +6,7 @@ include $(ADK_TOPDIR)/mk/rootfs.mk
 
 PKG_NAME:=		base-files
 PKG_VERSION:=		1.1
-PKG_RELEASE:=		24
+PKG_RELEASE:=		25
 PKG_SECTION:=		base/apps
 PKG_DESCR:=		basic files and scripts
 
@@ -36,6 +36,9 @@ ifeq ($(ADK_RUNTIME_INIT_SYSTEMD),)
 	cp ./files/fstab $(IDIR_BASE_FILES)/etc
 	cp ./files/modules $(IDIR_BASE_FILES)/etc
 	ln -sf ../proc/mounts $(IDIR_BASE_FILES)/etc/mtab
+ifeq ($(ADK_RUNTIME_LOAD_KERNEL_MODULES),)
+	-rm $(IDIR_BASE_FILES)/etc/init.d/kmod
+endif
 ifeq ($(ADK_TARGET_WITH_NETDEVICE),y)
 	cp ./files/interfaces-dhcp $(IDIR_BASE_FILES)/etc/network/interfaces
 	cp ./files/rc.netinfo $(IDIR_BASE_FILES)/etc/

+ 7 - 0
target/config/Config.in.runtime

@@ -98,6 +98,13 @@ config ADK_RUNTIME_BASE_COREUTILS
 
 endchoice
 
+config ADK_RUNTIME_LOAD_KERNEL_MODULES
+	bool "load all installed kernel modules on bootup"
+	default y
+	help
+	  If you don't want to load all installed kernel modules
+	  by default on bootup, disable this option.
+
 config ADK_RUNTIME_FIX_PERMISSION
 	bool "fix permissions for target files (suid bit, ..)"
 	select ADK_HOST_BUILD_FAKEROOT