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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CD511158015 for ; Sun, 17 Dec 2023 12:11:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E15A72BC081; Sun, 17 Dec 2023 12:10:14 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9DF9D2BC07E for ; Sun, 17 Dec 2023 12:10:14 +0000 (UTC) From: WANG Xuerui To: dist-kernel@gentoo.org Cc: gentoo-dev@lists.gentoo.org, WANG Xuerui Subject: [gentoo-dev] [PATCH 3/3] kernel-build.eclass: fix KERNEL_EFI_ZBOOT not being probed on partially supported arches Date: Sun, 17 Dec 2023 20:09:43 +0800 Message-ID: <20231217120943.831106-4-xen0n@gentoo.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231217120943.831106-1-xen0n@gentoo.org> References: <20231217120943.831106-1-xen0n@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 96476b99-4e85-43dc-8580-8a7f9cc4e453 X-Archives-Hash: 3e024a2d754b29947b9d6bffa6375ab5 The several partially-supported arches (those relying on USE=savedconfig) directly return in src_prepare(), hence previously the CONFIG_EFI_ZBOOT probing didn't have a chance to run when building for those arches, leading to wrong kernel artifact path and failed src_install(). Move the probing to near the end of eclass src_configure(), so the flag correctly reflects the reality in all circumstances. Signed-off-by: WANG Xuerui --- eclass/kernel-build.eclass | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass index 6b692dc4f9a0..7a041a8aacdf 100644 --- a/eclass/kernel-build.eclass +++ b/eclass/kernel-build.eclass @@ -203,6 +203,12 @@ kernel-build_src_configure() { .config) fi + # If this is set by USE=secureboot or user config this will have an effect + # on the name of the output image. Set this variable to track this setting. + if grep -q "CONFIG_EFI_ZBOOT=y" .config; then + KERNEL_EFI_ZBOOT=1 + fi + mkdir -p "${WORKDIR}"/modprep || die mv .config "${WORKDIR}"/modprep/ || die emake O="${WORKDIR}"/modprep "${MAKEARGS[@]}" olddefconfig @@ -456,12 +462,6 @@ kernel-build_merge_configs() { ./scripts/kconfig/merge_config.sh -m -r \ .config "${merge_configs[@]}" || die - - # If this is set by USE=secureboot or user config this will have an effect - # on the name of the output image. Set this variable to track this setting. - if grep -q "CONFIG_EFI_ZBOOT=y" .config; then - KERNEL_EFI_ZBOOT=1 - fi } fi -- 2.43.0