build(kconfig): clear the additional init file when the option is unset

config_additional_init was only written when BOARD_ADDITIONAL_INIT was
set, so clearing the option in an existing build directory left the
cached name in place and the ROMFS kept the old rc.additional_init.

Standalone, goes before the board commit.

Co-authored-by: Andre Heinemans <andre.heinemans@nxp.com>
This commit is contained in:
Peter van der PerkandAndre Heinemans authored and Ramon Roche committed 2026-11-06 07:32:53 -08:00
1 parent 7f68c3eea0
commit 469ce82e38
1 file changed
+2 -4
+2 -4
View File
@@ -390,10 +390,8 @@ if(EXISTS ${BOARD_DEFCONFIG})
set(config_romfs_root ${ROMFSROOT} CACHE INTERNAL "ROMFS root" FORCE)
endif()
# ADDITIONAL INIT
if(ADDITIONAL_INIT)
set(config_additional_init ${ADDITIONAL_INIT} CACHE INTERNAL "additional init" FORCE)
endif()
# ADDITIONAL INIT (set unconditionally so clearing the option takes effect in an existing build)
set(config_additional_init "${ADDITIONAL_INIT}" CACHE INTERNAL "additional init" FORCE)
if(UAVCAN_INTERFACES)
set(config_uavcan_num_ifaces ${UAVCAN_INTERFACES} CACHE INTERNAL "UAVCAN interfaces" FORCE)