summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* eclass/(dist-)kernel-*.eclass: drop installkernel-gentoo-7Andrew Ammerlaan2024-01-071-78/+0
| | | | | | | | because we drop the generation of the initrd/uki here we can remove KERNEL_IUSE_SECUREBOOT since this is now exactly the same as KERNEL_IUSE_MODULES_SIGN Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* dist-kernel-utils.eclass: Add dist-kernel_compressed_module_cleanupMichał Górny2023-12-301-0/+37
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* dist-kernel-utils.eclass: support loong in dist-kernel_get_image_pathWANG Xuerui2023-12-191-0/+7
| | | | | | | The filenames to use are taken from upstream: https://github.com/torvalds/linux/blob/v6.6/arch/loongarch/boot/Makefile. Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
* eclass/(dist-)kernel{-utils,-install}: More flexible initrd generationAndrew Ammerlaan2023-12-051-20/+30
| | | | | | | | | | | | | We only need to call dracut to generate an initrd/uki if we are using <=sys-kernel/installkernel-gentoo-7. sys-kernel/installkernel-systemd already calls dracut via its plugin system if it is installed. sys-kernel/installkernel-gentoo-8[dracut] now also contains the code required to generate an initrd or uki. This change makes it possible for users to use other/custom initrd generators with our dist kernels if they are using installkernel-systemd. Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* dist-kernel-utils.eclass: set arch to kernel for installationAndrew Ammerlaan2023-11-181-1/+3
| | | | | | | | | | | Some kernel-install plugins may require locating files in the installed kernel source tree, on e.g. amd64 they will fail to do so if we do not use tc-arch-kernel. sys-kernel/dkms' kernel-install plugin is an example of a plugin that requires this fix. Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* dist-kernel-utils.eclass: drop workaround skipping dracut kernel-installAndrew Ammerlaan2023-11-101-14/+0
| | | | | | | | We have bumped the minimal version of dracut to 059-r4, this version contains the fixes to the kernel-install plugin we need to prevent the plugin from running again if the system is using uki's. Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* dist-kernel-utils.eclass: introduce KERNEL_EFI_ZBOOTAndrew Ammerlaan2023-09-041-1/+8
| | | | | | | | This new variable will track if CONFIG_EFI_ZBOOT is enabled or not Closes: https://bugs.gentoo.org/897684 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* dist-kernel-utils.eclass: support CONFIG_EFI_ZBOOT with USE=securebootAndrew Ammerlaan2023-09-021-5/+6
| | | | | | | | | This config options changes the name of the final image Closes: https://bugs.gentoo.org/897684 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/32532 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* dist-kernel-utils.eclass: only sign image if it is a UKIAndrew Ammerlaan2023-08-271-4/+4
| | | | | | | | | If we are not using UKIs we don't have to do anything since the kernel image was already signed in kernel-build.eclass. Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/32464 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* dist-kernel-utils.eclass: also rebuild initrd when using uki'sAndrew Ammerlaan2023-07-271-2/+2
| | | | | | | | An UKI contains some initrd, so in situations where we want to regenerate the initrd we also want to rebuild the UKIs Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Signed-off-by: Matthew Thode <prometheanfire@gentoo.org>
* dist-kernel-utils.eclass: dist-kernel_get_image_path: handle sparcSam James2023-07-211-1/+1
| | | | | | Same as hppa/ppc*. Signed-off-by: Sam James <sam@gentoo.org>
* dist-kernel-utils.eclass: optionally sign the kernelsAndrew Ammerlaan2023-07-201-1/+17
| | | | Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* dist-kernel-utils.eclass: fix user script overridesChris Pritchard2023-07-051-4/+4
| | | | | | | Closes: https://bugs.gentoo.org/909538 Signed-off-by: Chris Pritchard <chris@christopherpritchard.co.uk> Closes: https://github.com/gentoo/gentoo/pull/31745 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* dist-kernel-utils.eclass: skip initrd installation when using ukiAndrew Ammerlaan2023-06-201-4/+14
| | | | | | | | | | Gets rid of a hack that prevents 50-dracut.install from regenerating the initrd when calling kernel-install. Instead instruct kernel-install to simply not run this plugin. Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/31358 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* dist-kernel-utils.eclass: fix extension of generated efi fileAndrew Ammerlaan2023-06-201-2/+2
| | | | | | | If kernel-install is configured to use the uki layout the extension of the efi file that we install has to be .efi otherwise kernel-install returns an error. Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* dist-kernel-utils.eclass: Add a PV → KV conversion functionMichał Górny2022-10-191-0/+16
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* dist-kernel-utils.eclass: support EAPI 8Mike Gilbert2022-09-091-10/+4
| | | | Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* dist-kernel-utils.eclass: add riscv kernel image pathSam James2022-05-081-0/+3
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* dist-kernel-utils.eclass: add hppa to dist-kernel_get_image_path()Sam James2022-01-201-2/+2
| | | | | | Uses same logic as ppc/ppc64. Just adding to the case statement. Signed-off-by: Sam James <sam@gentoo.org>
* dist-kernel-utils.eclass: add ppc(32) supportGeorgy Yakovlev2021-12-161-1/+2
| | | | | Bug: https://bugs.gentoo.org/794799 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
* dist-kernel-utils.eclass: Support dracut's uefi=yes optionMichał Górny2021-01-161-1/+30
| | | | | | | | | Support dracut's uefi=yes configuration option that creates a combined UEFI stub, kernel and initramfs in a single UEFI executable. If such an output is detected, install it in place of the actual kernel image and stub out the duplicate initrd to save space. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* kernel-install.eclass: Improve failed install error messagesMichał Górny2021-01-161-2/+2
| | | | | | | Support and use nonfatal to provide a detailed error message when kernel postinst fails, in particular the correct 'emerge --config' command. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* dist-kernel-utils.eclass: Add a function to rebuild initramfsMichał Górny2021-01-131-0/+36
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* dist-kernel-utils.eclass: Introduce eclass for helper functionsMichał Górny2021-01-131-0/+96
Move some of the utility functions from kernel-install.eclass into dist-kernel-utils.eclass, in order to permit using them without having all kernel-install phases exported. This will be used in order to support rebuilding initramfs in sys-fs/zfs-kmod. Since the eclasses are used only by dist-kernel project eclasses and ebuilds, update the function prefix while moving them. Signed-off-by: Michał Górny <mgorny@gentoo.org>