aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* firmware: copy only the necessary firmware(s) into initramfsDmitry Baranov2023-08-301-3/+7
| | | | | | | | | | | | | | | | | | | 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>
* Plymouth support for genkernel (squashed).FlyingWaffle2023-08-301-0/+7
| | | | | | Bug: https://bugs.gentoo.org/753617 Signed-off-by: FlyingWaffle <flyingwaffle@pm.me> Signed-off-by: Sam James <sam@gentoo.org>
* genkernel.conf: make section titles more consistentDiego Viola2023-01-251-8/+8
| | | | | | | | | by capitalizing all section titles and using the same amount of = characters. Closes: https://github.com/gentoo/genkernel/pull/45 Signed-off-by: Diego Viola <diego.viola@gmail.com> Signed-off-by: Matt Turner <mattst88@gentoo.org>
* Reimplement --kernel-cross-compile= for genkernel 4.xMatoro Mahri2023-01-081-0/+25
| | | | | | | | | | | | | 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>
* genkernel: add keyctl support for loading LUKS passphrase into a keyringMaciej S. Szmigiero2022-05-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* gen_cmdline.sh: parse_cmdline(): Allow to override AS, AR, NM & Co via CLIv4.2.2Thomas Deutschmann2021-07-061-12/+26
| | | | | Bug: https://bugs.gentoo.org/786405 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Change --firmware-files handlingThomas Deutschmann2021-03-151-2/+2
| | | | | | | | | | | | | | | | - 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>
* genkernel.conf: typo fix: s/staticly/statically/Göktürk Yüksek2021-02-061-1/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* genkernel.conf: document zstd compression in commentThomas Deutschmann2020-08-301-1/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* genkernel.conf: document lz4 compression in commentKarlson2k (Evgeny Grin)2020-08-301-1/+1
| | | | | | Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru> Closes: https://github.com/gentoo/genkernel/pull/20 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Remove --disklabel optionThomas Deutschmann2020-08-281-3/+0
| | | | | | | Now that we always build util-linux for switch_root, we no longer need this option. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Make use of expand_file() for --linuxrc optionThomas Deutschmann2020-08-031-0/+3
| | | | | Bug: https://bugs.gentoo.org/483146 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Rename INSTALL_MOD_PATH option to KERNEL_MODULES_PREFIXThomas Deutschmann2020-08-031-2/+1
| | | | | | | | | | 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>
* Add b2sumThomas Deutschmann2020-02-151-0/+3
| | | | | | | b2sum can be used to verify (boot) media since commit 5c55dd467a563623f16be27f670b5a3ddc79fb02. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* genkernel.conf: Fix spellingThomas Deutschmann2019-12-161-1/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* genkernel.conf: Disable MICROCODE_INITRAMFS option by defaultThomas Deutschmann2019-12-041-3/+5
| | | | | | | Embedding microcode updates into initramfs is deprecated when system is able to load multiple initramfs. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add support for a custom font at bootThomas Deutschmann2019-11-241-0/+4
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add --utils-cxx optionThomas Deutschmann2019-09-301-1/+5
| | | | | | | | | | | To compile thin-provisioning-tools, required for LVM thin provisioning support which was added in commit 9dea735590ebfff278710148fa8743777a18c4bd, we need a C++ compiler. This option will allow user to specify custom C++ compiler (for example when using ccache/distcc). Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Change kernel and initramfs default filename in $BOOTDIRThomas Deutschmann2019-07-291-3/+3
| | | | | | | | | | | | | | | | | | This commit will change default kernel and initramfs filename: kernel-genkernel-%%ARCH%%-%%KV%% -> vmlinuz-%%KV%% System.map-genkernel--%%ARCH%%-%%KV%% -> System.map-%%KV%% initramfs-genkernel-%%ARCH%%-%%KV%% -> initramfs-%%KV%%.img The new naming will be consistent with kernel's "make install" and will allow to match files in /lib/modules with actual kernel. In addition, $ARCH value was moved to kernel's LOCALVERSION. This will ensure that this information is still present and when you do cross-compilation, that /lib/modules content don't get mixed. Bug: https://bugs.gentoo.org/390407 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Make initramfs and kernel filename customizableThomas Deutschmann2019-07-291-5/+17
| | | | | | | | | | | | | New options like --initramfs-filename or --kernel-filename will allow user to customize filenames used when installing initramfs or kernel into $BOOTDIR. Therefore --kernelname (KNAME) option was removed. Filename can contain placeholders like '%%ARCH%%' which will get replaced at runtime. Man page contains more information. Bug: https://bugs.gentoo.org/395095 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add feature to check for free disk space early at genkernel startv4.0.0_beta9Thomas Deutschmann2019-07-231-0/+6
| | | | | | | | | | | | To avoid preventable errors like running out of disk space while building a new kernel, two new options, --check-free-disk-space-bootdir and --check-free-disk-space-kerneloutputdir, were added. When set, disabled by default, genkernel will check early before starting to build kernel/initramfs for specified amount of free disk space. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add --kernel-localversion optionThomas Deutschmann2019-07-211-0/+4
| | | | | | | This option will set/unset kernel option CONFIG_LOCALVERSION. Closes: https://bugs.gentoo.org/521774 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add --no-sandbox optionThomas Deutschmann2019-07-211-0/+3
| | | | | | | This option is useful when you are calling genkernel within a sandboxed environment, i.e. when using genkernel within an ebuild. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add "--module-rebuild" parameterThomas Deutschmann2019-07-151-1/+5
| | | | | | | | | | | MODULEREBUILD option will be enabled by default. When enabled and we are building a non-static kernel for the same host (no cross-compile!), also building modules and install into into a non-custom location, we will now call `emerge @module-rebuild`. Closes: https://bugs.gentoo.org/453372 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* genkernel.conf: Add missing XFSPROGS optionsv4.0.0-beta.1Thomas Deutschmann2019-07-141-0/+3
| | | | | Fixes: ccfe8f4a8123 ("Add --xfsprogs support") Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* genkernel.conf: Remove deprecated ARCH_OVERRIDE optionThomas Deutschmann2019-07-141-3/+0
| | | | | | Was missed in commit a13fb7217b13511fabfe871a9fa2b701896b8d2f. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add bcache supportThomas Deutschmann2019-07-141-0/+3
| | | | | | | Kernel command-line argument only, adds "dobcache". Bug: https://bugs.gentoo.org/605094 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Rework --busybox supportThomas Deutschmann2019-07-141-1/+0
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Rework cross-compile supportThomas Deutschmann2019-07-141-6/+3
| | | | | | | | | | | | | - Add new "--cross-compile" parameter which will accept a target triplet and replaces "--arch-override", "--utils-arch", "--utils-cross-compile" and "--kernel-cross-compile" parameter. - Add "--utils-cflags" to allow user to overwrite CFLAGS used for compiling programs for initramfs. - Add tc-* functions. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* genkernel.conf: Adjust punctuationThomas Deutschmann2019-07-141-5/+5
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: Refactor setColorVars()Thomas Deutschmann2019-07-141-1/+1
| | | | | | | | - Renamed to set_color_vars() - Use NOCOLOR variable Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_package.sh: Refactor gen_modulespackage()Thomas Deutschmann2019-07-141-3/+3
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_package.sh: Refactor gen_minkernpackage()Thomas Deutschmann2019-07-141-4/+3
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_package.sh: Refactor gen_kerncache()Thomas Deutschmann2019-07-141-5/+4
| | | | | | | | | | - Make use of tar's auto-compress feature, i.e. use archive suffix to determine the compression program. - get_tar_cmd() function added which will try to return tar command utilizing pbzip2, pxz or pigz when possible. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* genkernel.conf: Clearify CLEAN configuration optionThomas Deutschmann2019-03-261-7/+6
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Initialize booleans with their default value for clarityThomas Deutschmann2019-03-261-10/+10
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add "--[no-]clear-cachedir" parameterThomas Deutschmann2019-03-231-1/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Update bootloader handlingThomas Deutschmann2019-03-231-1/+1
| | | | | | | | | | - Add --no-bootloader parameter - Treat empty BOOTLOADER like "no" value - Output information when bootloader update was skipped Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Convert all remaining options to yes/no values and use isTrue for consistencyThomas Deutschmann2019-03-231-81/+82
| | | | | Closes: https://bugs.gentoo.org/532084 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Misc improvements for FIRMWARE* handlingBen Kohler2019-03-081-2/+3
| | | | | | | | | | | Change append_firmware to use a space separated list rather than comma-separated. Also simplify that code a bit. Add checks to ensure FIRMWARE_FILES is a space-separated list, and using relative paths. Adjust genkernel.conf comments to clarify those requirements. Signed-off-by: Ben Kohler <bkohler@gentoo.org>
* genkernel.conf: update & clarify comments regarding FIRMWARE_* behaviorBen Kohler2019-03-081-1/+2
| | | | Signed-off-by: Ben Kohler <bkohler@gentoo.org>
* genkernel.conf: remove misleading comment about INSTALL defaultBen Kohler2019-03-071-2/+1
| | | | | | Fixes: https://bugs.gentoo.org/663550 Signed-off-by: Ben Kohler <bkohler@gentoo.org>
* microcode: add flexability: type & initramfs controlRobin H. Johnson2018-08-041-2/+8
| | | | | | | | | | | | | | | | | | | | | Bug reported that the MICROCODE option did not provide enough flexability, as it enabled both AMD & Intel options by default, and placed both sets of microcode into the initramfs. Existing boolean option MICROCODE is now a string, which takes no/all/amd/intel as inputs, describing which variant of kernel options to enable. Boolean inputs are converted to no/all settings. This option no longer include microcode in initramfs. New option MICROCODE_INITRAMFS, enabled by default, includes the microcode for matching kernel config options (INTEL/AMD) into the initramfs. For users using sys-boot/grub-2.02-r1 or another bootloader that supports multiple initramfs options, this option can be safely disabled. Fixes: https://bugs.gentoo.org/662492 Reported-by: Joerg Schaible <joerg.schaible@gmx.de> Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* genkernel.conf: fix a couple of paths in comments, thanks Mason LBBen Kohler2018-07-181-2/+2
| | | | Closes: https://bugs.gentoo.org/661560
* Kernel nconfig supportTomasz Wasiak2017-01-071-4/+4
| | | | | | | | Support for nconfig kernel configuration target. Minor fixes in [g|x]config support. Fixes: https://bugs.gentoo.org/show_bug.cgi?id=496512#c2 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* FL-1476: Add support for remote decryption of luks devices via dropbearSebastian Bauer2017-01-071-0/+3
| | | | | | (cherry picked from commit 1886bbafecca1c225646e8d297bbb522caedfd9b) Closes: https://bugs.gentoo.org/show_bug.cgi?id=440126 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Document microcode & NFS more.Robin H. Johnson2017-01-031-0/+6
| | | | | Fixes: https://bugs.gentoo.org/show_bug.cgi?id=604538 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Allow complete override of MODULES_*Robin H. Johnson2017-01-021-0/+7
| | | | | | | | | | | The long-standing but undocumented AMODULES_* options allow adding ADDITIONAL modules during boot, but there was no way to completely override the MODULES_* variables. Add this functionality now, and document it in genkernel.conf. Fixes: https://bugs.gentoo.org/show_bug.cgi?id=186652 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Document additional modules via AMODULES*Gil Kloepfer2017-01-021-0/+9
| | | | | Fixes: https://bugs.gentoo.org/show_bug.cgi?id=499628 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Implement kernel nconfig just like menuconfig.Vadim A. Misbakh-Soloviov (mva)2017-01-021-0/+6
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>