Kernel with built-in modules only

Hello everyone,

I am new here and I have been digging for a while before asking but I would like to compile my OpenWrt Linux kernel with all the modules built-in as opposed to a bunch of .ko files that are loaded on boot. Is there an easy way to do that? I assumed selecting [ * ] as opposed to [m] in the menuconfig would take care of it but some script must be changing those settings in the background and I can't figure out which one.

Thank you in advance,


[ * ] means the module is installed in the base image, not that it's built into the kernel.

But it would be nice to be able to choose that the kernel module was built in. And I believe there are cases where it's to late to load a kernel module, ie to handle a watchdog. For me that builds my own system it would mean I could reduce the startup time slightly.

Another thing is that a few years ago kernel developers talked about removing the possibility to use built in modules. But I have not seen anything about that lately.

You need to use make kernel_menuconfig to circumvent OpenWrt's normal kernel module packaging system. Mark the desired modules as builtin in kernel_menuconfig and OpenWrt will build empty kmod-xxx packages for the affected modules (to still satisfy dependencies of packages).

I tried make kernel_menuconfig a long time ago on a pre Barrier Breaker system, it did not work then, so I didn't know it was supposed to work. I'll try it again. Thanks for the info.