Hi Pali, On Sun, 10 Jul 2022 at 05:43, Pali Rohár <p...@kernel.org> 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 <p...@kernel.org> > --- > board/boundary/nitrogen6x/nitrogen6x.c | 4 ++-- > boot/Kconfig | 4 ++++ > include/env_default.h | 2 +- > 3 files changed, 7 insertions(+), 3 deletions(-)
Can you not use: #idef CONFIG_USE_PREBOOT ? You should not be checking for the existence of a string Kconfig. Regards, Simon