[PATCH 07/20] kernel: copy all built kernel modules to root filesystem image

Felix Fietkau nbd at nbd.name
Fri Nov 17 22:57:35 PST 2023


On 17.11.23 22:31, Elliott Mitchell wrote:
> On Fri, Nov 17, 2023 at 05:20:33PM +0100, Felix Fietkau wrote:
>> On 11.11.23 01:21, Elliott Mitchell wrote:
>> > This removes the requirement for to create a package for all modules.
>> > Now devices can simply specify in-tree drivers/other to be built as
>> > modules and they will be present in the resultant image.
>> > 
>> > Signed-off-by: Elliott Mitchell <ehem+openwrt at m5p.com>
>> 
>> It seems to me that this completely ignores the use case of having 
>> release builds that ship a lot of kernel modules as installable 
>> packages. Did I misread something?
>> If not, this gets a strong NACK from me.
> 
> Should be completely orthogonal, though it could have bugs.
> 
> Using `cp -l` has two valuable effects:  First, it reduces storage space
> usage.  Second, it serves to mark module files as belonging to a package.
> 
> My goal is previously setting a kernel option to "m" in a configuration
> file, but not having a package causes it to be built, then ignored.  I
> want this to do something sensible, not simply waste electricity
> building a module and then tossing it in the garbage.
> 
> Hmm, come to think of it, that should be $(XARGS) (fix on commit?).

Thanks for the explanation, it makes more sense to me now.
That said, I see a few pitfalls here:

1. If you select kernel modules that depend on other modules selected 
via kmod packages, you end up with non-functional modules with missing 
dependencies in the rootfs.
2. If the kmod package selection accidentally ends up selecting extra 
modules that aren't stored in the package, you end up with rootfs bloat.

I'm fine with the cp -l change, but I think adding all remaining modules 
to the rootfs is not something we should do by default (maybe opt-in?)

By the way, I still get bounces when replying to you, because your mail 
server is refusing my mail.

- Felix



More information about the openwrt-devel mailing list