]> git.baikalelectronics.ru Git - uboot.git/commit
Fix usage of CONFIG_PREBOOT
authorPali Rohár <pali@kernel.org>
Sun, 10 Jul 2022 11:42:55 +0000 (13:42 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 21 Nov 2022 14:23:00 +0000 (09:23 -0500)
commit22a592c64e5986c14a84aea115fe097c6b8531bb
treef42641fdf3688dfbd6d518fb882beb9e6911e39b
parent0df5f0a6bdf2166df9a4ce84c9f5aa3029426c87
Fix usage of CONFIG_PREBOOT

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@kernel.org>
board/boundary/nitrogen6x/nitrogen6x.c
boot/Kconfig
include/env_default.h