diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2017-10-31 11:32:16 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2017-10-31 11:32:16 -0700 |
commit | 7e7984bf05103fe1cf13c76327636893ccd051a7 (patch) | |
tree | 5f529bde7e78111a8d8ec9a9fd1f1126294b6e20 | |
parent | Bump version to 3.5.2.2 (diff) | |
download | genkernel-7e7984bf05103fe1cf13c76327636893ccd051a7.tar.gz genkernel-7e7984bf05103fe1cf13c76327636893ccd051a7.tar.bz2 genkernel-7e7984bf05103fe1cf13c76327636893ccd051a7.zip |
gen_configkernel: if building non-modular, have to set =y not =m.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-x | gen_configkernel.sh | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/gen_configkernel.sh b/gen_configkernel.sh index 68c116fe..476a883d 100755 --- a/gen_configkernel.sh +++ b/gen_configkernel.sh @@ -120,11 +120,21 @@ config_kernel() { kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_EXT2_FS" "y" fi + # Do we support modules at all? + cfg_CONFIG_MODULES=$(kconfig_get_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_MODULES") + if isTrue "$cfg_CONFIG_MODULES" ; then + # yes, we support modules, set 'm' for new stuff. + newcfg_setting='m' + else + # no, we support modules, set 'y' for new stuff. + newcfg_setting='y' + fi + # If the user has configured DM as built-in, we need to respect that. cfg_CONFIG_BLK_DEV_DM=$(kconfig_get_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_BLK_DEV_DM") case "$cfg_CONFIG_BLK_DEV_DM" in y|m) ;; # Do nothing - *) cfg_CONFIG_BLK_DEV_DM='m' + *) cfg_CONFIG_BLK_DEV_DM=${newcfg_setting} esac # Make sure lvm modules are on if --lvm @@ -133,12 +143,12 @@ config_kernel() { cfg_CONFIG_DM_SNAPSHOT=$(kconfig_get_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_DM_SNAPSHOT") case "$cfg_CONFIG_DM_SNAPSHOT" in y|m) ;; # Do nothing - *) cfg_CONFIG_DM_SNAPSHOT='m' + *) cfg_CONFIG_DM_SNAPSHOT=${newcfg_setting} esac cfg_CONFIG_DM_MIRROR=$(kconfig_get_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_DM_MIRROR") case "$cfg_CONFIG_DM_MIRROR" in y|m) ;; # Do nothing - *) cfg_CONFIG_DM_MIRROR='m' + *) cfg_CONFIG_DM_MIRROR=${newcfg_setting} esac kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_BLK_DEV_DM" "${cfg_CONFIG_BLK_DEV_DM}" kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_DM_SNAPSHOT" "${cfg_CONFIG_DM_SNAPSHOT}" @@ -151,12 +161,12 @@ config_kernel() { cfg_CONFIG_DM_MULTIPATH=$(kconfig_get_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_DM_MULTIPATH") case "$cfg_CONFIG_DM_MULTIPATH" in y|m) ;; # Do nothing - *) cfg_CONFIG_DM_MULTIPATH='m' + *) cfg_CONFIG_DM_MULTIPATH=${newcfg_setting} esac cfg_CONFIG_DM_MULTIPATH_RDAC=$(kconfig_get_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_DM_MULTIPATH_RDAC") case "$cfg_CONFIG_DM_MULTIPATH_RDAC" in y|m) ;; # Do nothing - *) cfg_CONFIG_DM_MULTIPATH_RDAC='m' + *) cfg_CONFIG_DM_MULTIPATH_RDAC=${newcfg_setting} esac kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_BLK_DEV_DM" "${cfg_CONFIG_BLK_DEV_DM}" kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_DM_MULTIPATH" "${cfg_CONFIG_DM_MULTIPATH}" @@ -177,17 +187,17 @@ config_kernel() { cfg_CONFIG_ISCSI_BOOT_SYSFS=$(kconfig_get_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_ISCSI_BOOT_SYSFS") case "$cfg_CONFIG_ISCSI_BOOT_SYSFS" in y|m) ;; # Do nothing - *) cfg_CONFIG_ISCSI_BOOT_SYSFS='m' + *) cfg_CONFIG_ISCSI_BOOT_SYSFS=${newcfg_setting} esac cfg_CONFIG_ISCSI_TCP=$(kconfig_get_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_ISCSI_TCP") case "$cfg_CONFIG_ISCSI_TCP" in y|m) ;; # Do nothing - *) cfg_CONFIG_ISCSI_TCP='m' + *) cfg_CONFIG_ISCSI_TCP=${newcfg_setting} esac cfg_CONFIG_SCSI_ISCSI_ATTRS=$(kconfig_get_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_SCSI_ISCSI_ATTRS") case "$cfg_CONFIG_SCSI_ISCSI_ATTRS" in y|m) ;; # Do nothing - *) cfg_CONFIG_SCSI_ISCSI_ATTRS='m' + *) cfg_CONFIG_SCSI_ISCSI_ATTRS=${newcfg_setting} esac kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_ISCSI_BOOT_SYSFS" "${cfg_CONFIG_ISCSI_BOOT_SYSFS}" kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_ISCSI_TCP" "${cfg_CONFIG_ISCSI_TCP}" |