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 72CEE138334 for ; Tue, 26 Mar 2019 08:07:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4932EE0897; Tue, 26 Mar 2019 08:07:18 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 1A241E0894 for ; Tue, 26 Mar 2019 08:07:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 011F2335CFE for ; Tue, 26 Mar 2019 08:07:17 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3E94158B for ; Tue, 26 Mar 2019 08:07:14 +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: <1553587432.f1ad7c2096dd405915a6cf21af4b8e58f4e41b3d.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: f1ad7c2096dd405915a6cf21af4b8e58f4e41b3d X-VCS-Branch: master Date: Tue, 26 Mar 2019 08:07:14 +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: f204211f-3d24-41eb-8d7b-fc45631e0a33 X-Archives-Hash: b1f3b354d39b6a4a370f9f33030d7b6b commit: f1ad7c2096dd405915a6cf21af4b8e58f4e41b3d Author: Thomas Deutschmann gentoo org> AuthorDate: Tue Mar 26 03:52:54 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Tue Mar 26 08:03:52 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=f1ad7c20 config_kernel(): rewrite --microcode handling Signed-off-by: Thomas Deutschmann gentoo.org> gen_configkernel.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/gen_configkernel.sh b/gen_configkernel.sh index 8d96838..a5266e4 100755 --- a/gen_configkernel.sh +++ b/gen_configkernel.sh @@ -529,17 +529,24 @@ config_kernel() { kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_CRYPTO_DEV_VIRTIO" "${newvirtio_setting}" fi - # Microcode setting, intended for early microcode loading - # needs to be compiled in. - kconfig_microcode_intel=(CONFIG_MICROCODE_INTEL CONFIG_MICROCODE_INTEL_EARLY) - kconfig_microcode_amd=(CONFIG_MICROCODE_AMD CONFIG_MICROCODE_AMD_EARLY) + # Microcode setting, intended for early microcode loading, if --microcode if [[ -n "${MICROCODE}" ]] then - kconfigs=(CONFIG_MICROCODE CONFIG_MICROCODE_OLD_INTERFACE CONFIG_MICROCODE_EARLY) + print_info 1 "$(getIndent 1)>> Ensure that required kernel options for early microcode loading support are set..." + kconfig_microcode_intel=(CONFIG_MICROCODE_INTEL CONFIG_MICROCODE_INTEL_EARLY) + + kconfig_microcode_amd=(CONFIG_MICROCODE_AMD) + [ $(($KV_MAJOR * 1000 + ${KV_MINOR})) -le 4003 ] && kconfig_microcode_amd+=(CONFIG_MICROCODE_AMD_EARLY) + + kconfigs=(CONFIG_MICROCODE CONFIG_MICROCODE_OLD_INTERFACE) + [ $(($KV_MAJOR * 1000 + ${KV_MINOR})) -le 4003 ] && kconfigs+=(CONFIG_MICROCODE_EARLY) + [[ "$MICROCODE" == all ]] && kconfigs+=( ${kconfig_microcode_amd[@]} ${kconfig_microcode_intel[@]} ) [[ "$MICROCODE" == amd ]] && kconfigs+=( ${kconfig_microcode_amd[@]} ) [[ "$MICROCODE" == intel ]] && kconfigs+=( ${kconfig_microcode_intel[@]} ) - for k in "${kconfigs[@]}" ; do + + for k in "${kconfigs[@]}" + do cfg=$(kconfig_get_opt "${KERNEL_OUTPUTDIR}/.config" "$k") case "$cfg" in y) ;; # Do nothing