genkernel icon indicating copy to clipboard operation
genkernel copied to clipboard

Fix modinfo error

Open reagentoo opened this issue 2 years ago • 8 comments

gen_moddeps.sh: always include firmware for built-in modules with ALLFIRMWARE="no"

These do not occur in the "modules.dep" file so they won't be caught by the
dependency scanning loop in gen_dep_list() - they need to be manually added
to the module list.

Closes: #54
Signed-off-by: Maciej S. Szmigiero <[email protected]>
gen_moddeps.sh: use KEXT along with default '.ko' extension to prevent modinfo error

Also improved gen_dep_list() and get rid xbasename()

Bug: https://bugs.gentoo.org/922663
Closes: #57
Signed-off-by: Dmitriy Baranov <[email protected]>
gen_initramfs.sh: copy compressed firmwares

Signed-off-by: Dmitriy Baranov <[email protected]>
gen_initramfs.sh: unpack compressed modules/firmwares to reduce image size

Signed-off-by: Dmitriy Baranov <[email protected]>
gen_initramfs.sh: fix gen_die message in append_modules()

Signed-off-by: Dmitriy Baranov <[email protected]>
gen_configkernel.sh: add priority kernel config in determine_kernel_config_file()

This is useful for building an image with sys-kernel/gentoo-kernel.

Signed-off-by: Dmitriy Baranov <[email protected]>

reagentoo avatar Feb 02 '24 09:02 reagentoo

Tested this PR and the use case from #54 seems okay, as long as sys-kernel/linux-firmware has USE="-compress-xz".

With USE="compress-xz" (and probably other compress-* options too) the firmware files aren't included in the initramfs, so this will probably need a separate fix.

maciejsszmigiero avatar Feb 03 '24 18:02 maciejsszmigiero

With USE="compress-xz" (and probably other compress-* options too) the firmware files aren't included in the initramfs, so this will probably need a separate fix.

I also don't like that modules.dep can contain multiple extensions: .ko and .ko.xz. For example: uncompressed extended modules (e.g. sys-fs/zfs-kmod) and compressed all gentoo-kernel's modules. I think we need to add IUSE modules-compress in virtual/dist-kernel and upgrade linux-mod-r1.eclass to restrict usage different modules-compress for all packages. Converting PR to draft...

@mgorny Can you please suggest?

reagentoo avatar Feb 05 '24 07:02 reagentoo

I also don't like that modules.dep can contain multiple extensions: .ko and .ko.xz For example: uncompressed extended modules (e.g. sys-fs/zfs-kmod) and compressed all gentoo-kernel's modules.

I had compressed firmware (sys-kernel/linux-firmware) on mind, not modules.

maciejsszmigiero avatar Feb 05 '24 10:02 maciejsszmigiero

I also don't like that modules.dep can contain multiple extensions: .ko and .ko.xz For example: uncompressed extended modules (e.g. sys-fs/zfs-kmod) and compressed all gentoo-kernel's modules.

I had compressed firmware (sys-kernel/linux-firmware) on mind, not modules.

I understood you. But I think you correctly pointed out earlier that this is a separate fix for future PRs. I would also like your opinion on modules and modules-compress IUSE.

reagentoo avatar Feb 05 '24 10:02 reagentoo

I would also like your opinion on modules and modules-compress IUSE.

I think that supporting compressed modules and firmware in genkernel would make a lot of sense, considering it's only a matter of wildcard matching filename{,.xz,.zstd} for firmware or filename.ko{,.gz,.xz,.zstd} for modules.

maciejsszmigiero avatar Feb 06 '24 18:02 maciejsszmigiero

@FlyingWaffleDev @maciejsszmigiero Please test PR on your configurations. Note:

  • added support for compressed modules/firmwares
  • auto use kernel-config from packaged kernels (sys-kernel/gentoo-kernel)

reagentoo avatar Mar 06 '24 09:03 reagentoo

I have tested this PR and it works fine with XZ-compressed sys-kernel/linux-firmware, including for modules built into kernel.

maciejsszmigiero avatar Mar 09 '24 15:03 maciejsszmigiero

@robbat2 @thesamesam Look here please.

reagentoo avatar Mar 16 '24 09:03 reagentoo

@benkohler

thesamesam avatar May 20 '24 08:05 thesamesam