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 ACE8F158015 for ; Sun, 17 Dec 2023 16:08:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A40862BC03D; Sun, 17 Dec 2023 16:08:48 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 518C92BC01F for ; Sun, 17 Dec 2023 16:08:48 +0000 (UTC) Message-ID: <611b7521afc81b30c24414b70ebb9f161087cdb6.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 Date: Sun, 17 Dec 2023 17:08:43 +0100 In-Reply-To: <86d43105-8d01-4133-966e-961ca6881754@gentoo.org> References: <20231217120943.831106-1-xen0n@gentoo.org> <20231217120943.831106-4-xen0n@gentoo.org> <4c267eb9934d69f1a91b624977e1bbfd7e248e92.camel@gentoo.org> <86d43105-8d01-4133-966e-961ca6881754@gentoo.org> Organization: Gentoo Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-A5HUxyXs4s4jgkzjpP1U" 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: 6a2f9eb0-cb56-4ff2-bd47-46e9d9ce52f3 X-Archives-Hash: 09218c958fed217856103369cfccf2f1 --=-A5HUxyXs4s4jgkzjpP1U Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2023-12-18 at 00:02 +0800, WANG Xuerui wrote: > On 12/17/23 21:11, Micha=C5=82 G=C3=B3rny wrote: > > 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 fo= r > > > 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 fl= ag > > > 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 effect > > > + # on the name of the output image. Set this variable to track this = setting. > > > + 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 effect > > > - # on the name of the output image. Set this variable to track this = setting. > > > - 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. > But isn't the src_configure phase building upon the config already=20 > merged in src_prepare? The alternative would be keeping the=20 > kernel-build_merge_configs logic intact, but then it has to be=20 > duplicated for every early return branch in each ebuild's src_prepare,= =20 > which I think is too excessive... >=20 Ah, sorry, you're right. I didn't notice these were two different functions! --=20 Best regards, Micha=C5=82 G=C3=B3rny --=-A5HUxyXs4s4jgkzjpP1U Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQFGBAABCgAwFiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAmV/HQsSHG1nb3JueUBn ZW50b28ub3JnAAoJEGOa2uIyniQOb8QH/iwc+NoXU7EodzkGW13nm3wtV1rVqsLU OWrppcSxVJK96PwzQZ/W/DCwvAtaWBhP+Neg++5lEphtNbSFWsDqaUynH8ozWGL2 InhApBFnjaue/gD0dlE70wF5zI6X1j5idp1dBMITOvL+Z5c7/hVvWvkMqgdbhRgf zSffiHpGdHrYWz4z2YFycJeuBMbeS8HoH1fT06GWdfX4S5B+dYgwmwp8z3eH8NjL sjZav4p4vqgyCROh119D75c0UolXIlrD/oVAQfI7nILS0Beiaxkh4IFKDlTmjKef c9xEGamGTRLvr/mK5W55TF7VnZuTQ8M3vnKW9uDA2iOH7+t+v4fylZo= =EO4z -----END PGP SIGNATURE----- --=-A5HUxyXs4s4jgkzjpP1U--