From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 19DB9138334 for ; Sun, 24 Nov 2019 20:00:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DB6FDE0884; Sun, 24 Nov 2019 20:00:26 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AA765E0880 for ; Sun, 24 Nov 2019 20:00:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D6BC934D2D9 for ; Sun, 24 Nov 2019 20:00:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B90E98D2 for ; Sun, 24 Nov 2019 20:00:13 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1574625557.54a1de904fbff716e7c513d31e07064a499d4512.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_configkernel.sh X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 54a1de904fbff716e7c513d31e07064a499d4512 X-VCS-Branch: master Date: Sun, 24 Nov 2019 20:00:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e69d862a-edb0-4fb1-b998-899db8c584b3 X-Archives-Hash: 22a2eca5bf47c2b9893a0bef842442a1 commit: 54a1de904fbff716e7c513d31e07064a499d4512 Author: Thomas Deutschmann gentoo org> AuthorDate: Sun Nov 24 14:38:51 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Sun Nov 24 19:59:17 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=54a1de90 gen_configkernel.sh: config_kernel(): Ensure that required kernel options for --mdadm are set Signed-off-by: Thomas Deutschmann gentoo.org> gen_configkernel.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/gen_configkernel.sh b/gen_configkernel.sh index 6141ba6..7dbcadd 100755 --- a/gen_configkernel.sh +++ b/gen_configkernel.sh @@ -340,6 +340,29 @@ config_kernel() { && required_kernel_options+=( 'CONFIG_BCACHE' ) fi + # Make sure all modues required for MD raid are enabled in the kernel, if --mdadm + if isTrue "${CMD_MDADM}" + then + print_info 2 "$(get_indent 1)>> Ensure that required kernel options for MDADM support are set ..." + local cfg_CONFIG_BLK_DEV_MD=$(kconfig_get_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_BLK_DEV_MD") + case "${cfg_CONFIG_BLK_DEV_MD}" in + y|m) ;; # Do nothing + *) cfg_CONFIG_BLK_DEV_MD=${newcfg_setting} + esac + + kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_BLOCK" "y" + kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_MD" "y" + kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_BLK_DEV_DM" "${cfg_CONFIG_BLK_DEV_DM}" \ + && required_kernel_options+=( 'CONFIG_BLK_DEV_DM' ) + kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_BLK_DEV_MD" "${cfg_CONFIG_BLK_DEV_MD}" \ + && required_kernel_options+=( 'CONFIG_BLK_DEV_MD' ) + kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_MD_LINEAR" "${cfg_CONFIG_BLK_DEV_MD}" + kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_MD_RAID0" "${cfg_CONFIG_BLK_DEV_MD}" + kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_MD_RAID1" "${cfg_CONFIG_BLK_DEV_MD}" + kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_MD_RAID10" "${cfg_CONFIG_BLK_DEV_MD}" + kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_MD_RAID456" "${cfg_CONFIG_BLK_DEV_MD}" + fi + # Make sure lvm modules are enabled in the kernel, if --lvm if isTrue "${CMD_LVM}" then