[PATCH 1/2] Fix usage of CONFIG_PREBOOT

Tom Rini trini at konsulko.com
Mon Nov 21 18:33:49 CET 2022


On Sun, Jul 10, 2022 at 01:42:55PM +0200, Pali Rohár wrote:

> Due to usage of PREBOOT in Kconfig, macro CONFIG_PREBOOT is always defined
> when CONFIG_USE_PREBOOT is enabled. In case CONFIG_PREBOOT is not
> explicitly enabled it is set to empty C string and therefore
> '#ifdef CONFIG_PREBOOT' guard does not work. Fix this issue by introducing
> a new Kconfig symbol PREBOOT_DEFINED which cause to define new C macro
> CONFIG_PREBOOT_DEFINED only when CONFIG_PREBOOT is really defined.
> 
> Change usage of '#ifdef CONFIG_PREBOOT' by '#ifdef CONFIG_USE_PREBOOT' for
> code which checks if preboot code would be called and by
> '#ifdef CONFIG_PREBOOT_DEFINED' for defining preboot code.
> 
> Signed-off-by: Pali Rohár <pali at kernel.org>

For the record, we need to long term figure out a better solution to
user configurable default environment stuff.  Doing this via Kconfig is
fragile / problematic. However, as this patch does solve a real problem,
applied to u-boot/master, thanks!

-- 
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/20221121/98366e24/attachment.sig>


More information about the U-Boot mailing list