aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Ambardar <itugrok@yahoo.com>2023-12-04 03:09:28 -0800
committerTony Ambardar <itugrok@yahoo.com>2024-01-06 08:34:17 -0800
commit29f6da43403c5131d0035de0bfc4107eee17953b (patch)
treeaa90ee8d703a2134fde3c82a8037ce0f62c966ed
parent46a2490e8f24a1ad47e53b0b4ee875fa3658f2c1 (diff)
kernel: include built-in module list
Add modules.builtin to the kernel package for improved handling of loadable and builtin modules. As with other distros, this allows 'modprobe <module>' to consistently return success for both loaded/built-in modules, a useful feature for presence-testing. Given OpenWrt's few built-in modules, this change and related kmodloader support add ~1 KB to the compressed image size. Using sch_fq_codel (builtin) and sch_cake (loadable) for example: root@OpenWrt:/# modprobe sch_fq_codel && echo SUCCESS || echo FAIL SUCCESS root@OpenWrt:/# modprobe sch_cake && echo SUCCESS || echo FAIL SUCCESS root@OpenWrt:/# rmmod sch_fq_codel module is builtin Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
-rw-r--r--package/kernel/linux/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/package/kernel/linux/Makefile b/package/kernel/linux/Makefile
index c88b5c1b31..b198882979 100644
--- a/package/kernel/linux/Makefile
+++ b/package/kernel/linux/Makefile
@@ -58,7 +58,9 @@ define Package/kernel
endef
define Package/kernel/install
- # nothing to do
+ $(INSTALL_DIR) $(1)/$(MODULES_SUBDIR)
+ $(INSTALL_DATA) $(LINUX_DIR)/modules.builtin $(1)/$(MODULES_SUBDIR)
+ $(SED) 's,.*/,,' $(1)/$(MODULES_SUBDIR)/modules.builtin
endef
define Package/kernel/extra_provides