| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
(de)compressing modules changes the path of the module files so we need to
run depmod to ensure that tools such as modprobe/modinfo work.
Note that depmod is often, but *not* always, run by sys-kernel/installkernel.
Systemd installs a hook to do this, but there is no equivalent on openrc
systems. So instead just ensure that the tree of modules we install is
consistent here in the eclass.
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The source symlink does not exist on all systems.
If we can't find any config at all then there will be no preferred suffix
which means we fall back to the old '-nt' based cleaning.
Closes: https://bugs.gentoo.org/937569
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/38016
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adjusts kernel-install_compress_modules to use the new function
dist-kernel_get_module_suffix. This makes no functional difference
at the moment since gentoo-kernel-bin is the only consumer and it has
XZ compression in the config. Still this makes it possible to compile
alternate prebuilt kernels with alternate module compression support, and may
in the future help to support gzip and zstd module compression in
gentoo-kernel-bin.
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
| |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The kernels 'make rpm-pkg' and 'make deb-pkg' install the config
and System.map into the modules directory for easy access. Let's
do the same here so our gpkg's are more symetric to rpm's and
deb's and tools that look for these files there can find it.
This also provides an easy location for the user to access the
config. Considering that /boot/config-x.y.z does not always
exist (the config instalation via /sbin/installkernel depends
on layout and +/-systemd configuration).
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/37684
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Now that we have an improved version check in kernel-build.eclass,
copy it here so that the two eclasses match.
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/37327
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dist-kernel releases are required to match the package's version, with
'_' substituted for '-' as per kernel release format rules. Curiously,
we made no such substitution on the kernel install directory names.
The consequence of this is that Catalyst has technically only been
working with dist-kernels by pure coincidence - it had never been tested
with kernels containing '_' in ${PV}. When attempting to build install
media for the Gentoo Asahi project, which necessitates using kernels
versioned with '_p*', Catalyst's call to Dracut's --kver argument
passes in the name of the source directory while Dracut expects
the kernel release (module directory).
Make sure that all directories installed by the kernel match the
kernel's own idea of its version exactly. This fixes Catalyst,
makes directories like /usr/src/linux-* consistent with /lib/modules
For compatibility with existing bin kernels, KV_FULL will be
set to ${PV}${KV_LOCALVERSION} in kernel-install.eclass if it
has not been explicitly set elsewhere.
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: Zen <z@pyl.onl>
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
|
|
|
|
| |
ebuilds and eclasses using dist-kernel_reinstall_initramfs should also
have the check for mounted /boot and ESP. We can do this safely via
mount-boot-utils.eclass which does not export any phases.
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The kernel build system sets the permissions on the kernel
image to 644. However objcopy creates a file with permissions
755. This causes a discrepancy in the permissions on the
installed kernel image between +generic-uki,-generic-uki and
between gentoo-kernel, gentoo-kernel-bin.
Restore the symmetry by explicitly setting the objcopy'ed
files permissions to 644.
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/35214
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
|
|
| |
and also link generic initrd/uki.efi
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
| |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/922185
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/34843
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
it is not strictly necessary, i.e. we might also want to just use the
generic initrd. Or install the uki in the grub layout. But more importantly
this requirement creates a bit of an unfortunate conflict in binpkg-docker
that would otherwise have to be resolved with manual overrides of install.conf.
See-also: https://github.com/projg2/binpkg-docker/pull/7
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
|
|
|
| |
and switch order since we are deprecating installkernel-systemd and
have moved this functionality into installkernel(-gentoo).
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/917145
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
plymouth pulls in drm, and drm includes all gpu drivers and their firmware
especially the firmware files are very big. The whole thing costs us
15M on each initrd, and therefore gpkg. Also exclude the netronome
drivers, these also have ridiculously large firmware files.
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Add a function to compress modules manually. It will be used
in sys-kernel/gentoo-kernel-bin.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
When KERNEL_IUSE_GENERIC_UKI is set (to gatekeep for new ebuilds),
enable XZ module compression in kernel and add IUSE=module-compress.
When the flag is enabled, the modules are installed .xz compressed
per the config. When it is disabled, they are installed uncompressed
but the kernel retains module compression support.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
| |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/34450
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some basic benchmarks:
-rw------- 1 root root 103494321 Dec 24 11:10 bzip2
-rw------- 1 root root 112179814 Dec 24 11:02 gzip-nostrip
-rw------- 1 root root 112179814 Dec 24 11:06 gzip-strip
-rw------- 1 root root 112179814 Dec 24 11:08 gzip-strip-aggressive
-rw------- 1 root root 130847597 Dec 24 11:19 lz4
-rw------- 1 root root 66948253 Dec 24 11:13 lzma
-rw------- 1 root root 124285638 Dec 24 11:18 lzop
-rw------- 1 root root 80242444 Dec 24 11:14 xz
-rw------- 1 root root 66744036 Dec 24 11:59 xz-9e--check
-rw------- 1 root root 85917687 Dec 24 11:20 zstd
Strip does nothing, which makes sense since portage already did this.
xz is our size champion so pick this one to compress our initrd
With this change the generic UKI is: 82515840, versus
My own hostonly UKI of the same kernel version: 29390720.
Which is still 2.8 times larger, but significantly better then the 5 times
larger we had before!
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/34024
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
- optionally build a generic unified kernel image
- only install this uki.efi in any binary generated binpkgs, this saves space
- extract the initrd and kernel image from the uki in pkg_postinst
- own image, initrd and uki install paths
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Right now the loong profiles in Gentoo only cover the 64-bit ISA, so we
can unconditionally specify loongarch64 for QEMU.
Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On systemd systems the dracut systemd modules are included automatically.
Systemd insists our dummy root has some valid /etc/os-release file, otherwise
it refuses the switch root operation. However, with this fix it still does not
boot up correctly on systemd systems, it gets stuck in an infinite boot loop.
Presumably the reason has something to do with our dummy root not having a real
systemd init to switch root to. We add the systemd dracut modules to the omit
list to prevent the problem and ensure the test phase behaves the same on
systemd and non-systemd systems.
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Nowadays the name of the unified kernel image is always uki.efi,
not initrd.uefi.
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
|
|
|
| |
059-r4 contains the fixes to the kernel-install plugin that we need
to be able to drop a workaround in dist-kernel-utils.eclass
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
sys-kernel/installkernel-systemd
This reflects better that we don't necessarily need the systemd bootloader
to use the systemd kernel-install system.
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This only has effect when building the gpkg for gentoo-kernel-bin which
overrides CONFIG_MODULE_SIG_FORCE. To ensure that the module signing
was successful we instruct the kernel to reject modules with an invalid
signature.
This has no effect on other kernel packages which already have
CONFIG_MODULE_SIG_FORCE=y.
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/32463
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: David Seifert <soap@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Do not assume PV and kernel version must always match. Use PV for
kernel install directory (i.e. /usr/src/linux) but get the release
from the kernel build directory for the module directory. Update
preinst version check to account for live ebuilds.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
| |
Reverts: 55a495ad71b0ce1620488f389baddeebc787ee64
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
| |
Add a KV_FULL variable that defaults to the kernel version derived
from PV, and can be used by ebuilds to override the version
if necessary.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/843821
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/835396
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/794799
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
| |
Closes: https://github.com/gentoo/gentoo/pull/21549
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
|
|
|
|
|
|
|
| |
some modules slow down or even fail to boot in our test environment
force qemu dracut module while at it.
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|