| 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>
|
|
|
|
|
|
|
|
|
|
| |
Depending on system configuration and hardware, added firmware and
modules might not be required for Plymouth to function.
Bug: https://bugs.gentoo.org/753617
Signed-off-by: FlyingWaffle <flyingwaffle@pm.me>
Closes: https://github.com/gentoo/genkernel/pull/29
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>
|
|
|
|
|
|
|
| |
We're trying to phase it out as it's non-portable. Use bash's `type -P` where
available (preferable as it avoids user functions) or `command -v` if POSIX.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
Noticed after ulm reported it on IRC.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This restores the --kernel-cross-compile= option from genkernel 3.x,
which controls only the --kernel-xxx= options as opposed to both kernel
and userspace options controlled by --cross-compile=.
Also adds documentation on the missing options in default
genkernel.conf.
Bug: https://bugs.gentoo.org/716862
Signed-off-by: Matoro Mahri <matoro@users.noreply.github.com>
Signed-off-by: Matt Turner <mattst88@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>
|
|
|
|
|
|
|
|
| |
non-static kernels
Fixes: 153a877d ("Refactor (compressed) kernel module handling")
Bug: https://bugs.gentoo.org/821484
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
| |
override for BUSYBOX_CONFIG
Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru>
Closes: https://github.com/gentoo/genkernel/pull/23
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>
|
|
|
|
|
|
|
| |
_tc-getPROG() can only override variable with user provided value
when there is a default value.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
| |
building of kernel and initramfs
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
temporary location when --no-install is set
This will ensure that we won't install anything on user's system when
--no-install was set.
While here, make use of expand_file() for --kernel-modules-prefix.
Bug: https://bugs.gentoo.org/505810
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>
|
|
|
|
|
|
| |
/etc/kernels when --save-config is set
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>
|
|
|
|
|
|
|
| |
Set $CHOST variable via config so that we no longer need to call
gcc directly to determine CHOST value.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add handling for compression method "best" and "fastest".
- Make use of new get_initramfs_compression_method_by_{compression,speed}
functions.
- Set CONFIG_RD_<TYPE>=n or CONFIG_INITRAMFS_COMPRESSION_<TYPE>=n
only when required to avoid second `make oldconfig` call due to
changed .config file.
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>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
| |
$SANDBOX_ON can be unset causing 'unary operator expected' error.
Fixes c0e013c ("gen_determineargs.sh: determine_real_args(): Error out early when already running within a sandbox")
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
running within a sandbox
We cannot spawn a sandbox when we are already running within a sandbox.
This commit will make genkernel error out early to tell user about
the problem.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
| |
This commit will make kernel config filename used by --save-config
feature customizable like previous commit 769a07fd3e947 did for
initramfs and kernel image.
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's possible that user has set conflicting emerge options like
"--ask" in EMERGE_DEFAULT_OPTS which could break genkernel.
Calling emerge with --ignore-default-opts will allow us to
avoid such scenarios.
In addition, --module-rebuild-cmd (MODULEREBUILD_CMD) option was
added to allow user to alter default command.
Closes: https://bugs.gentoo.org/705082
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Some packages will fail to build when path contains character sequences
like ".o". Using "_" as separator in mktemp() template will avoid that
problem.
Link: https://github.com/jthornber/thin-provisioning-tools/issues/127
Thanks-to: Doug Freed <dwfreed@mtu.edu>
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
| |
variables
We always need GK_FILENAME_* variables, even when not installing anything.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
| |
Using "-s" is not enough, file could be a directory.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
validation
Using "-s" is not enough, file could be a directory. Better check for
content!
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
| |
Embedding microcode updates into initramfs is deprecated when
system is able to load multiple initramfs.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
additional modules
This is needed to get modules, used by genkernel features,
like bcache module which is used by "dobcache" feature,
into initramfs.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
| |
validation to determine_real_args()
This will allow us to fail early.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
| |
--no-mrproper
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>
|
|
|
|
|
|
| |
$SSH_AUTHORIZED_KEYS_FILE errors
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
| |
after $KERNEL_DIR
Bug: https://bugs.gentoo.org/698828
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|