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 05F05158015 for ; Sun, 17 Dec 2023 13:11:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 028622BC03A; Sun, 17 Dec 2023 13:11:15 +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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B31792BC01E for ; Sun, 17 Dec 2023 13:11:14 +0000 (UTC) Message-ID: <4c267eb9934d69f1a91b624977e1bbfd7e248e92.camel@gentoo.org> Subject: Re: [gentoo-dev] [PATCH 3/3] kernel-build.eclass: fix KERNEL_EFI_ZBOOT not being probed on partially supported arches From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org, dist-kernel@gentoo.org Cc: WANG Xuerui Date: Sun, 17 Dec 2023 14:11:09 +0100 In-Reply-To: <20231217120943.831106-4-xen0n@gentoo.org> References: <20231217120943.831106-1-xen0n@gentoo.org> <20231217120943.831106-4-xen0n@gentoo.org> Organization: Gentoo Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-7MspHSIOS1uRrfJZhHAw" User-Agent: Evolution 3.50.2 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 X-Archives-Salt: 517fe10d-d465-4b1b-9989-f2a1152a42e1 X-Archives-Hash: 869c5bc586e7640f1e579e0c7a143ac9 --=-7MspHSIOS1uRrfJZhHAw Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, 2023-12-17 at 20:09 +0800, WANG Xuerui wrote: > The several partially-supported arches (those relying on > USE=3Dsavedconfig) 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(). >=20 > Move the probing to near the end of eclass src_configure(), so the flag > correctly reflects the reality in all circumstances. >=20 > Signed-off-by: WANG Xuerui > --- > eclass/kernel-build.eclass | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) >=20 > 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 > =20 > + # If this is set by USE=3Dsecureboot or user config this will have an e= ffect > + # on the name of the output image. Set this variable to track this sett= ing. > + if grep -q "CONFIG_EFI_ZBOOT=3Dy" .config; then > + KERNEL_EFI_ZBOOT=3D1 > + fi > + > mkdir -p "${WORKDIR}"/modprep || die > mv .config "${WORKDIR}"/modprep/ || die > emake O=3D"${WORKDIR}"/modprep "${MAKEARGS[@]}" olddefconfig > @@ -456,12 +462,6 @@ kernel-build_merge_configs() { > =20 > ./scripts/kconfig/merge_config.sh -m -r \ > .config "${merge_configs[@]}" || die > - > - # If this is set by USE=3Dsecureboot or user config this will have an e= ffect > - # on the name of the output image. Set this variable to track this sett= ing. > - if grep -q "CONFIG_EFI_ZBOOT=3Dy" .config; then > - KERNEL_EFI_ZBOOT=3D1 > - fi > } > =20 > fi This doesn't seem correct. It won't work if KERNEL_EFI_ZBOOT is set by one of the merged configs. --=20 Best regards, Micha=C5=82 G=C3=B3rny --=-7MspHSIOS1uRrfJZhHAw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQFGBAABCgAwFiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAmV+820SHG1nb3JueUBn ZW50b28ub3JnAAoJEGOa2uIyniQOlUAH/1gNjDcX1pTSjL7ZLmWy93VrYWLd8wlV TfY58kLXNG5JKD/1PfLbxzb5QwynY0qkTsOAQvuY1ud90zUvMmkhB0UxhQwfiYRF tpyUoBhMlht5Oo5kIb+DKdDk4knXZ8w1xrdXMkqdnEUzV+2j6MW7W3vvGoSlyvte kF3FuXFl6zzP579cTvGWH/2RQFWgEt1xa+OBXNuzR5DRQnVMLYO2FPk2GkWZi8JG v6DioSB1G+R8C1x+DzaRaXVP/mULH9zFb27HFlMKsAxPpg3H7GqmFFkoJd1WGTSe jm5ryrAfdJMdcWY9D3DJExh0pGHrnJWxXR+Y3jjTbDOxOVXvL4y41XA= =6d9r -----END PGP SIGNATURE----- --=-7MspHSIOS1uRrfJZhHAw--