From 469ce82e38a612bb8690dd6ba1e2e12b09d68bff Mon Sep 17 00:00:00 2001 From: Peter van der Perk Date: Sat, 10 Oct 2026 15:24:41 +0200 Subject: [PATCH] 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 --- cmake/kconfig.cmake | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cmake/kconfig.cmake b/cmake/kconfig.cmake index d11f101fc95..5f844e956f8 100644 --- a/cmake/kconfig.cmake +++ b/cmake/kconfig.cmake @@ -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)