| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FIRMWARE=yes behavior is changed:
Only the minimum number of firmware files will be copied.
The list is generated using the `modinfo -F firmware [modules]...` command.
The ability to copy all firmware(s) is also available with a new
ALLFIRMWARE setting (see the modified genkernel.conf for more details).
As for changes in the source code:
gen_moddeps.sh: Significantly redesigned module list generation.
To get a list of modules, use the `mod_dep_list()` function instead
of `gen_dep_list()`. Modules that are not in the kernel (=n or invalid)
will be filtered out. Aliases will be replaced with real names
(including dependencies).
Signed-off-by: Dmitry Baranov <reagentoo@gmail.com>
Closes: https://github.com/gentoo/genkernel/pull/40
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/753617
Signed-off-by: FlyingWaffle <flyingwaffle@pm.me>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
| |
In some cases, qlist's pipe detection may not work, and this is fatal to
our build. Let's just force -C on all qlist calls.
Signed-off-by: Ben Kohler <bkohler@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cryptsetup LUKS2 format comes with an ability to automatically unlock
multiple devices (root, swap, etc.) sharing the same passphrase, without
retyping it for each of them, by loading it into the user keyring.
This commit adds such (optional) genkernel support for loading LUKS
passphrase into the user keyring on boot.
In the default mode of operation the newly added key is (possibly) used
only to unlock root and swap devices and is removed soon after that.
By providing appropriate kernel command line parameter the key can be left
in the keyring instead (with an optional timeout) for unlocking other LUKS
devices post-initramfs time.
Because one of the most common use cases of this functionality will be
having an encrypted swap for doing suspend to disk (hibernation) let's also
make sure that we don't unlock the root device when doing so is unnecessary
(when we are resuming the system from hibernation).
Since the security of a FDE passphrase is of paramount importance in this
solution significant care has been taken not to leak it accidentally:
* The passphrase is read directly by keyctl to avoid storing it in the
shell,
* If the passphrase is used only to unlock root and swap devices (which is
the default mode of operation) the init script will check whether its
removal from keyring has actually succeeded and, if not, reboot the system
rather than continue while leaving it exposed,
* keyutils includes a patch (already upstreamed) to wipe the passphrase
from memory when no longer needed.
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
|
|
|
|
|
|
|
|
|
|
| |
dmraid
luks
lvm
multipath
Bug: https://bugs.gentoo.org/749957
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
|
|
|
|
|
|
| |
>=glibc-2.34
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
| |
>=glibc-2.34
Bug: https://bugs.gentoo.org/823716
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
In >=sys-apps/baselayout-2.8, /etc/modprobe.d was moved to /lib/modprobe.d.
This commit will try to copy /etc/modprobe.d and /lib/modprobe.d but will
no longer fail if one directory is missing.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To support a specific module compression algorithm, two things are needed:
Used depmod utility on host system building the kernel must support chosen
module compression algorithm to generate proper modules.dep file or
genkernel would be unable to read module dependencies when copying modules
to initramfs.
At runtime, used modprobe utility must be able to handle chosen module
compression algorithm or modules would be unloadable.
To address the first requirement, genkernel will now check if used kmod
utility on host system supports chosen module compression algorithm.
To address the runtime requirement, this commit will switch from BusyBox's
modutils implementation to kmod because BusyBox does not support ZSTD
compression (yet).
Bug: https://bugs.gentoo.org/809344
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
We want debug output but then we cannot use return value
from this function.
Transforming function to determine_KEXT() like determine_KV()
will fix the problem and allows us to keep debug output.
Fixes: 234ce29 ("gen_moddeps.sh: modules_kext() refactored")
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
| |
This will allow us to call modules_kext() just once.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
| |
Used by vdev_id UDEV helper.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Because we are copying UDEV rules from host system, we have
to ensure that used UDEV dir matches our initramfs environment to
prevent errors like
failed to execute '/lib/udev/vdev_id' '/lib/udev/vdev_id -e': No such file or directory
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/767937
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Move from space-separated list to comma-separated list
to add support for firmware files with spaces.
- Add support for firmware files with spaces.
- Check for specified firmware files in determine_real_args() which
will allow us to error out early.
- Clarify documentation.
Fixes: c576f99b0b ("Misc improvements for FIRMWARE* handling")
Bug: https://bugs.gentoo.org/775221
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
| |
Since commit 0785165ca64 we set LC_ALL in global scope.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
| |
this function
These files should be present all the time, not just when built with --ssh option set.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
| |
'/proc/self/mounts'
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
To help debugging, 'gksosreport' was added (idea was borrowed from dracut):
Whenever a user run into a problem and get to a rescue shell, running "gksosreport"
will generate /run/initramfs/gksosreport.txt containing useful debug information
suitable to attach to bug reports.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Now that we are using UDEV and have to preserve /run, we can also
use /run to always store log from initramfs.
This will make debugging easier because user don't have to explicit
enable logging (disabling is still possible).
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
| |
Now that we always build util-linux for switch_root, we no longer
need this option.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
switch_root from busybox does not move /dev, /sys, /proc and /run.
If we do that manually there is a small window for a race condition
when /dev, /sys or /proc is still needed but already moved. switch_root
from util-linux will move these mounts on its own and will therefore
avoid any potential problems.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Will fix
syslogin_perform_logout: logout(pts/0) returned an error: No such file or directory
error logged by dropbear.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
| |
initramfs content
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
| |
realpath
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/738740
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/483146
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Before this change we had different names in config file
and command-line for the same thing.
With this change we have one option named KERNEL_MODULES_PREFIX and its
corresponding --kernel-modules-prefix command-line argument.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/733946
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
| |
must be called when kerncache is used
Follow-up: a864c2f ("gen_initramfs.sh: create_initramfs(): Call set_initramfs_compression_method() when not building kernel")
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
We need to switch from using MDEV to UDEV to avoid boot problems
due to timeouts caused by some UDEV rules from real system when
real system is using systemd.
Bug: https://bugs.gentoo.org/706434
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
set_initramfs_compression_method() when not building kernel
We need to call set_initramfs_compression_method() manually when we didn't build
kernel in same run to ensure that $COMPRESS_INITRD_TYPE is initialized.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
--compress-initramfs-type to determine_real_args()
This will allow us to error out early if required user space tool
needed to compress initramfs based on specified --compress-initramfs-type
is missing or selected type is invalid/unsupported.
Best/fastest list is based on results from [Link1][Link2][Link3].
Link1: https://events.static.linuxfound.org/sites/events/files/lcjpcojp13_klee.pdf
Link2: https://kernel.ubuntu.com/~cking/boot-speed-eoan-5.3/kernel-compression-method.txt
Link3: https://lwn.net/Articles/817134/
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
| |
net-misc/dropbear is required
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
linked libraries
lddtree will always report "not found" when doing cross-compile.
Because we will error out later nonetheless when copying will fail, we don't
need such a check in advance.
Closes: https://bugs.gentoo.org/727442
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
| |
b2sum can be used to verify (boot) media since
commit 5c55dd467a563623f16be27f670b5a3ddc79fb02.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/709478
Signed-off-by: Michael Gerlach <n3ph@cccfr.de>
Closes: https://github.com/gentoo/genkernel/pull/13
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
determine_real_args()
This will allow us to fail early if splash_geninitramfs isn't available.
Bug: https://bugs.gentoo.org/705304
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|