aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gen_configkernel.sh: config_kernel(): Ensure kernel supports TMPFSThomas Deutschmann2020-08-281-0/+5
| | | | | | This is required for UDEV support. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* --luks: Add support for Serpent cipherThomas Deutschmann2020-08-211-0/+14
| | | | | Link: https://forums.gentoo.org/viewtopic-t-1117806.html Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: config_kernel(): Set CONFIG_CRYPTO_AES_586 only for X86Thomas Deutschmann2020-08-211-5/+5
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: set_initramfs_compression_method(): Ensure that set ↵Thomas Deutschmann2020-08-011-1/+15
| | | | | | | | | compression method is supported by the kernel When we didn't build kernel we have to be sure that kernel can actually decompress chosen initramfs compression type. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Unify 'confgrep' handling via new get_grep_cmd_for_file() functionThomas Deutschmann2020-08-011-8/+2
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: config_kernel(): Ensure that CONFIG_INITRAMFS_SOURCE is ↵Thomas Deutschmann2020-07-161-10/+10
| | | | | | | | | | | | | always unset config_kernel() runs only once. For this run, even when --integrated-initramfs is set, the kernel option CONFIG_INITRAMFS_SOURCE should be unset *when* we are also tasked to create an initramfs. Otherwise, functions like set_initramfs_compression_method() can fail when used kernel config had integrated initramfs but new kernel doesn't. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: config_kernel(): Re-order config checksThomas Deutschmann2020-07-161-24/+23
| | | | | | Re-order config checks for better logical grouping. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: set_initramfs_compression_method() refactoredThomas Deutschmann2020-07-161-40/+88
| | | | | | | | | | | | | - 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>
* gen_configkernel.sh: config_kernel(): Don't set ↵Thomas Deutschmann2020-07-161-2/+9
| | | | | | | | | | | CONFIG_CRYPTO_AES_{X86_64,586} for >=linux-5.4 Options were removed in linux-5.4 [Link 1]. Link 1: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1d2c3279311e4f03fcf164e1366f2fda9f4bfccf Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> merge
* Make kernel config filename customizableThomas Deutschmann2020-03-041-1/+1
| | | | | | | | 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>
* gen_configkernel.sh: config_kernel(): Make sure kernel supports initramfsThomas Deutschmann2020-01-121-0/+6
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: config_kernel(): Make sure kernel supports set ↵Thomas Deutschmann2020-01-121-0/+3
| | | | | | initramfs compression method Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: create_initramfs(): Outsource compression method handling ↵Thomas Deutschmann2020-01-121-0/+67
| | | | | | into set_initramfs_compression_method() Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Style fix: Use curly bracesThomas Deutschmann2020-01-111-4/+4
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: config_kernel(): Make sure that CONFIG_INITRAMFS_SOURCE ↵Thomas Deutschmann2019-12-291-0/+12
| | | | | | | | is unset Ensure that CONFIG_INITRAMFS_SOURCE is unset to avoid clashing with --integrated-initramfs. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: config_kernel(): Add virtiofs supportThomas Deutschmann2019-11-261-0/+12
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: config_kernel(): Ensure that required kernel options ↵Thomas Deutschmann2019-11-241-0/+23
| | | | | | for --mdadm are set Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* kernel-generic-config: Disable Virtio by default, use --virtioThomas Deutschmann2019-11-241-0/+3
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: determine_kernel_config_file(): clarify $KERNEL_CONFIG ↵Thomas Deutschmann2019-11-211-4/+16
| | | | | | errors Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: determine_kernel_config_file(): Don't check same config ↵Thomas Deutschmann2019-11-191-1/+7
| | | | | | file multiple times Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: config_kernel(): Show change of used kernel config ↵Thomas Deutschmann2019-11-191-3/+3
| | | | | | already at loglevel 1 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: config_kernel(): Use global KV_NUMERIC variableThomas Deutschmann2019-09-291-11/+11
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: config_kernel(): Update --microcode kernel options handlingThomas Deutschmann2019-09-291-9/+30
| | | | | | | | - Don't try to set CONFIG_MICROCODE_*EARLY for >= linux-4.4 - Check for CONFIG_MICROCODE_{AMD,INTEL} in sanity check Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: determine_kernel_config_file(): Add kconfig containing ↵Thomas Deutschmann2019-08-101-6/+30
| | | | | | | | | | | | | | | | | | KERNEL_LOCALVERSION to kconfig candidate list Since we added $ARCH to KERNEL_LOCALVERSION by default, $KV from fresh kernel sources won't match with saved kernel config file anymore which will break kernel upgrades when saved kernel config file was just copied to new kernel version without removing LOV part. WIth this commit we still prefer extracted $KV when looking for kernel config file, however, we will also look for kernel config file where $KV contains KERNEL_LOCALVERSION we are going to use in addition. Bug: https://bugs.gentoo.org/691852 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Change kernel and initramfs default filename in $BOOTDIRThomas Deutschmann2019-07-291-1/+1
| | | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | 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>
* Make use of new is_gzipped() functionThomas Deutschmann2019-07-261-1/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: Refactor kernel config handling in config_kernel()Thomas Deutschmann2019-07-231-15/+29
| | | | | | | Make sure that we always end up with set kernel config when no kernel config exists in kernel outputdir. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add --kernel-localversion optionThomas Deutschmann2019-07-211-0/+19
| | | | | | | This option will set/unset kernel option CONFIG_LOCALVERSION. Closes: https://bugs.gentoo.org/521774 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: config_kernel(): Ensure that CONFIG_TTY & ↵Thomas Deutschmann2019-07-161-0/+11
| | | | | | | | CONFIG_UNIX98_PTYS is set ...when building initramfs. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: config_kernel(): Fix code styleThomas Deutschmann2019-07-161-16/+16
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: config_kernel(): No need to re-check required kernel ↵Thomas Deutschmann2019-07-161-13/+13
| | | | | | options when config wasn't modified Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: config_kernel(): Don't check kernelruntask's return ↵Thomas Deutschmann2019-07-151-1/+0
| | | | | | | | | | value anymore When compile_generic() was refactored via commit 7b3103c0856dd9ad0652bf2ac27d0d907250ea4e, error checking was added directly to that function. Bug: https://bugs.gentoo.org/689890 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add bcache supportThomas Deutschmann2019-07-141-0/+9
| | | | | | | Kernel command-line argument only, adds "dobcache". Bug: https://bugs.gentoo.org/605094 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Rework --luks supportThomas Deutschmann2019-07-141-0/+65
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: Refactor config_kernel()Thomas Deutschmann2019-07-141-155/+160
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: config_kernel(): Make use of KCONFIG_MODIFIED_MARKERThomas Deutschmann2019-07-141-2/+2
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_configkernel.sh: Refactor determine_config_file()Thomas Deutschmann2019-07-141-3/+4
| | | | | | - Rename to determine_kernel_config_file(). Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Normalize "..." outputThomas Deutschmann2019-07-141-21/+21
| | | | | | | When "..." is used to indicate that genkernel will be doing something, use " ..." notation. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Replace backticksThomas Deutschmann2019-07-141-1/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* config_kernel(): Clarify output regarding skipped 'make clean'Thomas Deutschmann2019-07-141-1/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add special value "default" for --kernel-config parameterThomas Deutschmann2019-03-291-11/+27
| | | | | | | | | | --kernel-config=default will make genkernel to ignoring all user kernel configurations so that genkernel will use default kernel configuration shipped with genkernel to build a kernel. Useful to start from scratch if needed or for debugging. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* determine_config_file(): add support for file path (tilde) expansionThomas Deutschmann2019-03-291-24/+43
| | | | | | | | | | | | | In addition, we make --kernel-config parameter more exclusive: Before this change, if user had set --kernel-config but value was invalid (i.e. file didn't exist) we silently fallback to default configuration. Now we will error out if --kernel-config is set but value is invalid (i.e. no file). Closes: https://bugs.gentoo.org/412321 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* config_kernel(): Force --static and --no-ramdisk-modulesThomas Deutschmann2019-03-291-0/+15
| | | | | | | | ...if kernel doesn't support modules to avoid that genkernel will run into errors when trying to call 'make modules' or expects to build initramfs with modules when there aren't any modules. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* config_kernel(): fix commentThomas Deutschmann2019-03-281-1/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* config_kernel(): No need to call determine_config_file againThomas Deutschmann2019-03-281-1/+0
| | | | | | | ...which was already called in genkernel before and config file cannot change at runtime. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* determine_config_file(): add some verbose outputThomas Deutschmann2019-03-281-6/+14
| | | | | | ...to understand what is happening and why. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* config_kernel(): add sanity check for required optionsThomas Deutschmann2019-03-261-18/+51
| | | | | | | | | | | | Sometimes, genkernel modifies kernel config (.config), i.e. when parameter like "--lvm", "--hyperv" or "--virtio" are set. However, this can fail (for example if a required dependency is not set). To avoid problems like an unbootable system, we check for required options and error out if they are missing. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* config_kernel(): run def/oldconfig when we have modified .configThomas Deutschmann2019-03-261-0/+16
| | | | | | | This is needed to avoid a prompt if a newly added/modified kernel config option adds additional option(s) not yet found in .config. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* config_kernel(): rewrite --microcode handlingThomas Deutschmann2019-03-261-6/+13
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>