Skip to content

Commit

Permalink
kernel: include built-in module list
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
guidosarducci committed Jan 6, 2024
1 parent 46a2490 commit 29f6da4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package/kernel/linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 29f6da4

Please sign in to comment.