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 45A49C4332F for ; Thu, 22 Dec 2022 07:50:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A300285215; Thu, 22 Dec 2022 08:49:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="UOG9SLEz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0533385245; Thu, 22 Dec 2022 08:49:56 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0A0A082BCD for ; Thu, 22 Dec 2022 08:49:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1AB72610A5; Thu, 22 Dec 2022 07:49:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30D45C433F0; Thu, 22 Dec 2022 07:49:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671695390; bh=MoZbYh72BKscFxCE47UEgvjmEKY8TuEitM7Z4BCzXts=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UOG9SLEzrOgLnNcOCCKyMKxaySbBQyFylAWxN/etDvZDvTcIXueKtue6qH9+33h8j rdy2haedS2b039r06wwsCWQvo+fqKJ3PDDOIXqDMOKifkuWs/His06gsh6IAMuVb+5 ahBctjIihIV2Y8yjFz3hiFMGxjv1qAdKXygxG2I+nZF06BqMzxaaIIGYpAAbCR//kx GJVmQqGe6dNkOv/KS/UfqGzFK4sDp20SFHrEmQhSfmbEEK9HcJqCh9Rz296kA2Riru 7VloXwO0NtXc+T7Oieyt6oyxBdGyX0iKgimdcI4gASn/NtAHqvRBF/BoLaksLgX++V D2xgTzP+X6W4A== Received: by pali.im (Postfix) id 4322570E; Thu, 22 Dec 2022 08:49:47 +0100 (CET) Date: Thu, 22 Dec 2022 08:49:47 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Tom Rini Cc: u-boot@lists.denx.de Subject: Re: Broken commit d433c74eecdce1e4952ef4e8c712a9289c0dfcc2 Message-ID: <20221222074947.iqulzr3s77j5jbva@pali> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221222025415.GH3787616@bill-the-cat> User-Agent: NeoMutt/20180716 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 On Wednesday 21 December 2022 21:54:15 Tom Rini wrote: > On Fri, Dec 16, 2022 at 10:56:39PM +0100, Pali Rohár wrote: > > On Friday 05 August 2022 16:21:24 Pali Rohár wrote: > > > Broken is also commit d433c74eecdce1e4952ef4e8c712a9289c0dfcc2. Seems > > > that all kconfig migration changes done after that commit are broken. > > > > > > I really do not have energy to investigate what and how was broken due > > > to incorrect kconfig migration. > > > > > > > > > I did simple test. Applied following change: > > > > > > 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" > > > > > > #endif /* __CONFIG_H */ > > > + > > > +#ifdef CONFIG_SDCARD > > > +#error > > > +#endif > > > > > > And then called: > > > > > > make CROSS_COMPILE=powerpc-linux-gnuspe- P2020RDB-PC_defconfig u-boot.bin > > > > > > And it failed, even when this defconfig file is not SD card builds. > > > > 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. > > > > 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? > > 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_P1010RDB_PB \ > || TARGET_P1020RDB_PC || TARGET_P1020RDB_PD || TARGET_P2020RDB) \ > && !CMD_NAND) > > To, I think: > choice > prompt "Freescale PBL load location" > depends on RAMBOOT_PBL > > 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. 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. Before commit d433c74eecdce1e4952ef4e8c712a9289c0dfcc2 everything worked fine and CONFIG_SDCARD was not defined for P2020RDB-PC_defconfig. After commit d433c74eecdce1e4952ef4e8c712a9289c0dfcc2, symbol CONFIG_SDCARD is defined. You can check it by adding into config.h: +#ifdef CONFIG_SDCARD +#error +#endif > 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/mpc85xx/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 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. 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. > help > With this option final image would have prepended QorIQ pre-PBL eSDHC > 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 > > 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) > > config SDCARD > > But no one enables CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR. It is optional _user_ symbol. During compilation of sd card version of u-boot, user can enable it. For turris 1.x board there is waiting patch on the list which uses it. No review yet? > 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. > > -- > Tom 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. Compare git checkout d433c74eecdce1e4952ef4e8c712a9289c0dfcc2~1 and git checkout d433c74eecdce1e4952ef4e8c712a9289c0dfcc2 Because it worked fine before commit d433c74eecdce1e4952ef4e8c712a9289c0dfcc2.