From: Tony Ambardar Date: Tue, 5 Dec 2023 09:09:46 +0000 (-0800) Subject: kernel: include modinfo for built-in modules X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e1d8e576147d813398c6797ca866f9d8a41a350e;p=openwrt%2Fstaging%2Fneocturne.git kernel: include modinfo for built-in modules Add modules.builtin.modinfo to the kernel package, to support presence testing using module aliases and printing module details with 'modinfo'. With related kmodloader changes this adds ~2 KB to compressed image sizes. root@OpenWrt:/# modinfo unix name: unix filename: (builtin) alias: net-pf-1 license: GPL root@OpenWrt:/# modprobe net-pf-1 && echo SUCCESS || echo FAIL SUCCESS Signed-off-by: Tony Ambardar --- diff --git a/package/kernel/linux/Makefile b/package/kernel/linux/Makefile index b198882979..6592b01678 100644 --- a/package/kernel/linux/Makefile +++ b/package/kernel/linux/Makefile @@ -61,6 +61,9 @@ define Package/kernel/install $(INSTALL_DIR) $(1)/$(MODULES_SUBDIR) $(INSTALL_DATA) $(LINUX_DIR)/modules.builtin $(1)/$(MODULES_SUBDIR) $(SED) 's,.*/,,' $(1)/$(MODULES_SUBDIR)/modules.builtin + strings $(LINUX_DIR)/modules.builtin.modinfo | \ + grep -E -v "\.(file$(if CONFIG_MODULE_STRIPPED,|parmtype))=" | \ + tr '\n' '\0' > $(1)/$(MODULES_SUBDIR)/modules.builtin.modinfo endef define Package/kernel/extra_provides