[PATCH 2/2] Nokia RX-51: Remove CONFIG_PREBOOT from defconfig

Tom Rini trini at konsulko.com
Wed Jul 27 20:58:20 CEST 2022


On Wed, Jul 27, 2022 at 08:52:01PM +0200, Pali Rohár wrote:
> On Wednesday 27 July 2022 14:48:23 Tom Rini wrote:
> > On Wed, Jul 27, 2022 at 08:34:41PM +0200, Pali Rohár wrote:
> > > On Monday 25 July 2022 17:21:00 Tom Rini wrote:
> > > > On Sun, Jul 10, 2022 at 01:42:56PM +0200, Pali Rohár wrote:
> > > > 
> > > > > CONFIG_PREBOOT just cause putting "preboot=CONFIG_PREBOOT" into env list.
> > > > > Value CONFIG_PREBOOT="run preboot" in defconfig is just nonsense and does
> > > > > not do anything useful (it is infinite recursion). Config file for this
> > > > > board already contains default preboot= env variable with correct value,
> > > > > which has higher priority than CONFIG_PREBOOT and this is reason why
> > > > > nonsense CONFIG_PREBOOT is ignored.
> > > > > 
> > > > > Remove nonsense and unused CONFIG_PREBOOT from nokia_rx51_defconfig file.
> > > > > 
> > > > > Signed-off-by: Pali Rohár <pali at kernel.org>
> > > > 
> > > > Applied to u-boot/master, thanks!
> > > 
> > > Patch 1/2 is missing.
> > 
> > Sorry if I was unclear enough in the rest of the emails, I'm not
> > applying 1/2.  The empty string is fine enough (again, other variables
> > have this issue).  Unless I missed something and there's a run-time
> > failure that 1/2 resolves?
> 
> The issue is that preboot= variable is defined in ENV array two times.
> Once in Kconfig and second time in regular environment define.
> 
> It is just coincidence that the definition from Kconfig is ignored
> because currently it is put _after_ the regular preboot= definition. But
> this is fragile and probably some unrelated change/patch could change
> this behavior.
> 
> We really do not want two preboot= definitions in ENV array and pray
> that the correct one would be used by U-Boot at runtime.

It's not coincidence, it's down to link order.  So it's not going to
break anytime soon.  And it's not just preboot that's in this situation.

A more generic approach to deal with this would be appreciated.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220727/ae2d574b/attachment.sig>


More information about the U-Boot mailing list