Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 631B3C4332F for ; Thu, 22 Dec 2022 14:29:37 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 451FE853F5; Thu, 22 Dec 2022 15:29:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="QOrAo4zC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B0D0B8540D; Thu, 22 Dec 2022 15:29:33 +0100 (CET) Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BCB8885346 for ; Thu, 22 Dec 2022 15:29:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-yb1-xb2d.google.com with SMTP id g4so2133795ybg.7 for ; Thu, 22 Dec 2022 06:29:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=NYHkOGKJKyuuqLBPvVIFAzjIxvM78igY3jw3OSsgp60=; b=QOrAo4zCoDp0RC1+zY0en2AutdiabJT7hNjw1hnFAw3yrR49SogIw4aAcYKUbQ8xKw A2+AGds07Bc0sOkZvWnPB8p27tNF7cI051O7OOCZ6GBMJjLL0QxryAXjmBxd1ipAVUk6 TYTke8ln5gWhbE/MlG9n0x9YBJFNiG/ic9bgg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=NYHkOGKJKyuuqLBPvVIFAzjIxvM78igY3jw3OSsgp60=; b=YnjAHbvmCY+J75qm1EnevmN01xNDxKy4U4UCabb2u+ppQNbCrTWCfnbnMzpkkg8Th3 DsPqqVYeQMMDuj6DbWOyYUt5Bolja+Sl85OflnTpiDYxO/diLZMExiuQAHogtKZef/kO mkx7khDRfBPpvUrkI6bLiXX5sDDPSpbD3wfzHl2c03XAqYcCetZ0hstQ5KJeYG8CvcNQ 9lSOOKMuchehfRY87bDOPCxG48kaA0zw0OhXAHwNEAPDNHPvGFw1GpjJ5Zzb3qRvMTvB N64BWlVreYxTlgBUmjE+0FcSx1EWy7DT3Fe/BQckWQiTjzF4ACsMiIlAvZP9V1VqdkDN GByw== X-Gm-Message-State: AFqh2krQOXkINO5BZvHEf6KTR9ymCh7MTFzULukG0sbu7mwwatpl1TbV F0LyWc1oEzup/lmbLF1hrtNmYg== X-Google-Smtp-Source: AMrXdXsyGFmjB2dySBvFaqgRkWKjNyEK+Azq2v4Xl5QCGKQo2dX53FWSZK/Qlg9c66sT81TROBbEOQ== X-Received: by 2002:a25:1144:0:b0:757:707f:7305 with SMTP id 65-20020a251144000000b00757707f7305mr6053843ybr.15.1671719369214; Thu, 22 Dec 2022 06:29:29 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-0489-d0bf-dcad-62f5.res6.spectrum.com. [2603:6081:7b00:6400:489:d0bf:dcad:62f5]) by smtp.gmail.com with ESMTPSA id de10-20020a05620a370a00b00704c6263924sm147569qkb.13.2022.12.22.06.29.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Dec 2022 06:29:28 -0800 (PST) Date: Thu, 22 Dec 2022 09:29:27 -0500 From: Tom Rini To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: u-boot@lists.denx.de Subject: Re: Broken commit d433c74eecdce1e4952ef4e8c712a9289c0dfcc2 Message-ID: <20221222142927.GK3787616@bill-the-cat> References: <20220802091338.f4g45ldhc7qbg6hm@pali> <20220802105826.GB1146598@bill-the-cat> <20220803160013.4oh6x4glh2thtcog@pali> <20220803161318.GS1146598@bill-the-cat> <20220805142124.6swsha6aj62f33e3@pali> <20221216215639.vj4kffhcresvamqp@pali> <20221222025415.GH3787616@bill-the-cat> <20221222074947.iqulzr3s77j5jbva@pali> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="P2AAoPwFXL5FUngc" Content-Disposition: inline In-Reply-To: <20221222074947.iqulzr3s77j5jbva@pali> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean --P2AAoPwFXL5FUngc Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 22, 2022 at 08:49:47AM +0100, Pali Roh=E1r wrote: > On Wednesday 21 December 2022 21:54:15 Tom Rini wrote: > > On Fri, Dec 16, 2022 at 10:56:39PM +0100, Pali Roh=E1r wrote: > > > On Friday 05 August 2022 16:21:24 Pali Roh=E1r wrote: > > > > Broken is also commit d433c74eecdce1e4952ef4e8c712a9289c0dfcc2. See= ms > > > > that all kconfig migration changes done after that commit are broke= n. > > > >=20 > > > > I really do not have energy to investigate what and how was broken = due > > > > to incorrect kconfig migration. > > > >=20 > > > >=20 > > > > I did simple test. Applied following change: > > > >=20 > > > > diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2= _rdb_pc.h > > > > index a6523753d5ca..489f24df0ab1 100644 > > > > --- a/include/configs/p1_p2_rdb_pc.h > > > > +++ b/include/configs/p1_p2_rdb_pc.h > > > > @@ -624,3 +624,7 @@ __stringify(__PCIE_RST_CMD)"\0" > > > > "bootm $norbootaddr - $norfdtaddr" > > > > =20 > > > > #endif /* __CONFIG_H */ > > > > + > > > > +#ifdef CONFIG_SDCARD > > > > +#error > > > > +#endif > > > >=20 > > > > And then called: > > > >=20 > > > > make CROSS_COMPILE=3Dpowerpc-linux-gnuspe- P2020RDB-PC_defconfig u-= boot.bin > > > >=20 > > > > And it failed, even when this defconfig file is not SD card builds. > > >=20 > > > Tom, that commit d433c74eecdce1e4952ef4e8c712a9289c0dfcc2 is yours. > > > Could you please look at it? Because it is a regressions which made P1 > > > and P2 broken. Based on the past experience it really does not make > > > sense to wait for somebody who promised to do something as same > > > situation is just repeating. > > >=20 > > > Above diff is a simple check to verify if code conversion is correct = or > > > not. If _before_ conversion CONFIG_SDCARD was not defined then also > > > _after_ conversion this macro must not be defined. Right? > >=20 > > I dug through all of this again. I thought I understood what the right > > answer was again for a moment, but I don't. You, however, understand > > what platforms don't use PBL and what they use instead. I understand > > half of the fix, which is to change: > > choice > > prompt "Freescale PBL load location" > > depends on RAMBOOT_PBL || ((TARGET_P1010RDB_PA || TARGET_P1010R= DB_PB \ > > || TARGET_P1020RDB_PC || TARGET_P1020RDB_PD || TARGET_P= 2020RDB) \ > > && !CMD_NAND) > >=20 > > To, I think: > > choice > > prompt "Freescale PBL load location" > > depends on RAMBOOT_PBL > >=20 > > Then introduce some new, not "SDCARD" symbol, for the P1/P2 platforms > > that don't use PBL but instead the FSL_PREPBL_ESDHC_BOOT_SECTOR logic > > you introduced before. >=20 > P2020RDB-PC_defconfig is for booting from FLASH NOR, not from SD card. > CONFIG_SDCARD for P1/P2 must be defined when booting from SD card. >=20 > Before commit d433c74eecdce1e4952ef4e8c712a9289c0dfcc2 everything worked > fine and CONFIG_SDCARD was not defined for P2020RDB-PC_defconfig. After > commit d433c74eecdce1e4952ef4e8c712a9289c0dfcc2, symbol CONFIG_SDCARD is > defined. >=20 > You can check it by adding into config.h: >=20 > +#ifdef CONFIG_SDCARD > +#error > +#endif >=20 > > I say I almost thought I had it because I thought this would work: > > diff --git a/arch/powerpc/cpu/mpc85xx/Kconfig b/arch/powerpc/cpu/mpc85x= x/Kconfig > > index 24d3f1f20c25..59740b173b11 100644 > > --- a/arch/powerpc/cpu/mpc85xx/Kconfig > > +++ b/arch/powerpc/cpu/mpc85xx/Kconfig > > @@ -15,7 +15,7 @@ config CMD_ERRATA > > config FSL_PREPBL_ESDHC_BOOT_SECTOR > > bool "Generate QorIQ pre-PBL eSDHC boot sector" > > depends on MPC85xx > > - depends on SDCARD > > + depends on TARGET_P1020RDB_PC || TARGET_P1020RDB_PD || TARGET_P2020RDB >=20 > No, original code was OK. As is written in description > FSL_PREPBL_ESDHC_BOOT_SECTOR is for writing bootsector to SD card. And > it is optional as there is other way how to generate it, as described in > some doc/ file. >=20 > But if you choose to compile u-boot for P2020RDB-PC_defconfig (NOR > FLASH) then there is no SD card booting and hence > FSL_PREPBL_ESDHC_BOOT_SECTOR for P2020RDB-PC_defconfig must never be > generated. So FSL_PREPBL_ESDHC_BOOT_SECTOR must depends on SDCARD. >=20 > > help > > With this option final image would have prepended QorIQ pre-PBL eSD= HC > > boot sector suitable for SD card images. This boot sector instruct > > diff --git a/boot/Kconfig b/boot/Kconfig > > index 4a001bcee851..d1c9c5f25067 100644 > > --- a/boot/Kconfig > > +++ b/boot/Kconfig > > @@ -725,8 +725,7 @@ config RAMBOOT_PBL > > =20 > > choice > > prompt "Freescale PBL load location" > > - depends on RAMBOOT_PBL || ((TARGET_P1010RDB_PA || TARGET_P1010RDB_PB \ > > - || TARGET_P1020RDB_PC || TARGET_P1020RDB_PD || TARGET_P2020RDB) \ > > + depends on RAMBOOT_PBL || ((TARGET_P1010RDB_PA || TARGET_P1010RDB_PB)= \ > > && !CMD_NAND) > > =20 > > config SDCARD > >=20 > > But no one enables CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR. >=20 > It is optional _user_ symbol. During compilation of sd card version of > u-boot, user can enable it. >=20 > For turris 1.x board there is waiting patch on the list which uses it. > No review yet? >=20 > > But maybe that > > just needs to be enabled on the platforms in question, and then the > > first dependency change above is just dropping the SDCARD line? I really > > don't know, and I'd be equally happy to just remove all of the P1*/P2* > > boards if they don't boot and no one cares to fix them. > >=20 > > --=20 > > Tom >=20 > Just fix the conversion process. The rule is simple: if config.h did > not have enabled CONFIG_SDCARD then after conversion config.h must not > have it enabled. >=20 > Compare git checkout d433c74eecdce1e4952ef4e8c712a9289c0dfcc2~1 > and git checkout d433c74eecdce1e4952ef4e8c712a9289c0dfcc2 >=20 > Because it worked fine before commit > d433c74eecdce1e4952ef4e8c712a9289c0dfcc2. Thanks for explaining. Since you clearly understand what it should do, and I do not, please submit something to implement the correct questions in Kconfig. There was some overloading of a symbol before which I didn't understand, and still don't exactly. Otherwise, since I believe you're saying the Turris platform is fine, once Marek merges it (you will likely need to rebase on next, next week, once I finish merging all of the CONFIG migration stuff), I'll just delete the P1/P2 platforms sometime in the next release if no one actually cares to fix them. --=20 Tom --P2AAoPwFXL5FUngc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmOkaccACgkQFHw5/5Y0 tyxdigv/TRXUHGFvSCFXo98TInfKKvKFPE7m7nk1W1tlQT0KTsBUTO7D3HGfAY/a BuVGH+lb1/Kgk/I42mXFoqJ6adCv3g01ZAZBc2zYkr/soefBDc+5sHLRMJcerjx0 VttJ0Dz8uw8uYCjzrXjcg4Qy68i3MjImhIaTnAO/+v0L0iUYLJKl2t+op6O7u2NG OA7NNrCrSSdZ0wYIfgpCbv1HPNnb1WG52GWc3kowD4yw/hTU+3OFhtXVS6yKk9CR 0NaV95k//gAD8VflItMEu1P27UutpBUFtzDtd8/Ew9K3tPoQoFGDCF4QFMzzu+A6 Do7WJ4Tc1cSbqe8BX4m52+vqCkmTptwBpN1pjhovxdlcen+GopPKgAWfSXMJ1+sk mwNaz9OD69jDT/BsjAgHXuiAZFUly+WKODEYOx4/uEQDQcq7PU9xJ4TYPJewrsGW p42NbjX7Dx6Qe3bWu6zmGpM5YCYm3a/Mq71GIbMleCh5sXNUV0hUjKc4+ouIU1pA exDPMJom =9eMF -----END PGP SIGNATURE----- --P2AAoPwFXL5FUngc--