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 <itugrok@yahoo.com>
$(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