From eb9c9ce745eaace2bb438e17c02e73d397908717 Mon Sep 17 00:00:00 2001 From: daijoubu Date: Tue, 28 Apr 2026 17:26:08 -0700 Subject: [PATCH] fix: disable bootloader variants for targets without storage backend ANYFC, CLRACINGF4AIR (V1/V2/V3), FF_F35_LIGHTNING, WINGFC, FLYINGRCF4WINGMINI_NOT_RECOMMENDED, AIRBOTF7, and OMNIBUSF7NANOV7 all lack USE_FLASHFS/USE_SDCARD in their target config. Building _bl/_for_bl/_with_bl variants for these targets produces binaries that define MSP_FIRMWARE_UPDATE but have no storage backend, making OTA firmware update silently non-functional. Add NO_BOOTLOADER to cmake/stm32.cmake (following the DISABLE_MSC pattern) and set it on each affected target. This suppresses the broken bootloader build variants while leaving open the possibility of adding proper storage support to these targets in the future. Note: bootloader variants are not built by CI (they are not added to VALID_TARGETS), so this bug was never caught by automated builds. Fixes: https://github.com/iNavFlight/inav/issues/11521 --- cmake/stm32.cmake | 4 ++-- src/main/target/AIRBOTF7/CMakeLists.txt | 4 ++-- src/main/target/ANYFC/CMakeLists.txt | 2 +- src/main/target/CLRACINGF4AIR/CMakeLists.txt | 6 +++--- src/main/target/FF_F35_LIGHTNING/CMakeLists.txt | 4 ++-- .../FLYINGRCF4WINGMINI_NOT_RECOMMENDED/CMakeLists.txt | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cmake/stm32.cmake b/cmake/stm32.cmake index 091cf31fd5d..1954093e9b9 100644 --- a/cmake/stm32.cmake +++ b/cmake/stm32.cmake @@ -285,7 +285,7 @@ function(target_stm32) cmake_parse_arguments( args # Boolean arguments - "DISABLE_MSC;BOOTLOADER" + "DISABLE_MSC;BOOTLOADER;NO_BOOTLOADER" # Single value arguments "HSE_MHZ;LINKER_SCRIPT;NAME;OPENOCD_TARGET;OPTIMIZATION;STARTUP;SVD" # Multi-value arguments @@ -377,7 +377,7 @@ function(target_stm32) setup_firmware_target(${main_target_name} ${name} ${ARGN}) - if(args_BOOTLOADER) + if(args_BOOTLOADER AND NOT args_NO_BOOTLOADER) # Bootloader for the target set(bl_suffix _bl) add_stm32_executable( diff --git a/src/main/target/AIRBOTF7/CMakeLists.txt b/src/main/target/AIRBOTF7/CMakeLists.txt index 3d0e5bf1b83..305c0d44811 100644 --- a/src/main/target/AIRBOTF7/CMakeLists.txt +++ b/src/main/target/AIRBOTF7/CMakeLists.txt @@ -1,2 +1,2 @@ -target_stm32f722xe(AIRBOTF7 SKIP_RELEASES) -target_stm32f722xe(OMNIBUSF7NANOV7 SKIP_RELEASES) +target_stm32f722xe(AIRBOTF7 SKIP_RELEASES NO_BOOTLOADER) +target_stm32f722xe(OMNIBUSF7NANOV7 SKIP_RELEASES NO_BOOTLOADER) diff --git a/src/main/target/ANYFC/CMakeLists.txt b/src/main/target/ANYFC/CMakeLists.txt index 82d68535fa8..480531d92e3 100644 --- a/src/main/target/ANYFC/CMakeLists.txt +++ b/src/main/target/ANYFC/CMakeLists.txt @@ -1 +1 @@ -target_stm32f405xg(ANYFC SKIP_RELEASES) \ No newline at end of file +target_stm32f405xg(ANYFC SKIP_RELEASES NO_BOOTLOADER) \ No newline at end of file diff --git a/src/main/target/CLRACINGF4AIR/CMakeLists.txt b/src/main/target/CLRACINGF4AIR/CMakeLists.txt index 26cc0addb43..d53bc5aff04 100644 --- a/src/main/target/CLRACINGF4AIR/CMakeLists.txt +++ b/src/main/target/CLRACINGF4AIR/CMakeLists.txt @@ -1,3 +1,3 @@ -target_stm32f405xg(CLRACINGF4AIR SKIP_RELEASES) -target_stm32f405xg(CLRACINGF4AIRV2 SKIP_RELEASES) -target_stm32f405xg(CLRACINGF4AIRV3 SKIP_RELEASES) +target_stm32f405xg(CLRACINGF4AIR SKIP_RELEASES NO_BOOTLOADER) +target_stm32f405xg(CLRACINGF4AIRV2 SKIP_RELEASES NO_BOOTLOADER) +target_stm32f405xg(CLRACINGF4AIRV3 SKIP_RELEASES NO_BOOTLOADER) diff --git a/src/main/target/FF_F35_LIGHTNING/CMakeLists.txt b/src/main/target/FF_F35_LIGHTNING/CMakeLists.txt index 15380146f56..415a69ebc51 100644 --- a/src/main/target/FF_F35_LIGHTNING/CMakeLists.txt +++ b/src/main/target/FF_F35_LIGHTNING/CMakeLists.txt @@ -1,2 +1,2 @@ -target_stm32f405xg(FF_F35_LIGHTNING) -target_stm32f405xg(WINGFC) +target_stm32f405xg(FF_F35_LIGHTNING NO_BOOTLOADER) +target_stm32f405xg(WINGFC NO_BOOTLOADER) diff --git a/src/main/target/FLYINGRCF4WINGMINI_NOT_RECOMMENDED/CMakeLists.txt b/src/main/target/FLYINGRCF4WINGMINI_NOT_RECOMMENDED/CMakeLists.txt index 6da40b8ae6d..9c9a729ef0a 100644 --- a/src/main/target/FLYINGRCF4WINGMINI_NOT_RECOMMENDED/CMakeLists.txt +++ b/src/main/target/FLYINGRCF4WINGMINI_NOT_RECOMMENDED/CMakeLists.txt @@ -1 +1 @@ -target_stm32f405xg(FLYINGRCF4WINGMINI_NOT_RECOMMENDED) +target_stm32f405xg(FLYINGRCF4WINGMINI_NOT_RECOMMENDED NO_BOOTLOADER)