Fix modinfo error
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]>
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.
With
USE="compress-xz"(and probably othercompress-*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?
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 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.
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.
@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)
I have tested this PR and it works fine with XZ-compressed sys-kernel/linux-firmware, including for modules built into kernel.
@robbat2 @thesamesam Look here please.
@benkohler