Skip to content

fix: disable bootloader variants for targets without storage backend#11522

Open
daijoubu wants to merge 1 commit intoiNavFlight:maintenance-9.xfrom
daijoubu:fix-bootloader-targets-no-storage
Open

fix: disable bootloader variants for targets without storage backend#11522
daijoubu wants to merge 1 commit intoiNavFlight:maintenance-9.xfrom
daijoubu:fix-bootloader-targets-no-storage

Conversation

@daijoubu
Copy link
Copy Markdown
Contributor

@daijoubu daijoubu commented Apr 29, 2026

Summary

Seven target configs (covering 9 build targets) have BOOTLOADER enabled via their MCU family cmake function but define no storage backend (USE_FLASHFS / USE_SDCARD) in target.h. This fails to build triggering a check for a storage backend in firmware_update_common.c and bl_main.c — MSP_FIRMWARE_UPDATE requires afatfs or a flash partition at runtime.

Closes #11521

Changes

  • cmake/stm32.cmake: add NO_BOOTLOADER boolean flag (following the existing DISABLE_MSC pattern); guard bootloader variant build with if(args_BOOTLOADER AND NOT args_NO_BOOTLOADER)
  • Set NO_BOOTLOADER on all affected targets:
    • ANYFC
    • CLRACINGF4AIR, CLRACINGF4AIRV2, CLRACINGF4AIRV3
    • FF_F35_LIGHTNING, WINGFC
    • FLYINGRCF4WINGMINI_NOT_RECOMMENDED
    • AIRBOTF7, OMNIBUSF7NANOV7

The NO_BOOTLOADER flag is intentionally a per-target opt-out rather than a cmake-level guard, so that adding storage support to any of these targets in the future automatically re-enables the bootloader build without further cmake changes.

Testing

  • FF_F35_LIGHTNING builds successfully (release target, good smoke test)
  • ANYFC builds successfully
  • ANYFC_bl no longer exists as a build target (confirmed: No rule to make target 'ANYFC_bl')
  • MATEKF765SE builds with bootloader support intact (regression check)

Notes

Bootloader variants are not included in VALID_TARGETS and are therefore never built by CI, which is why this has gone undetected.

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: iNavFlight#11521
@github-actions
Copy link
Copy Markdown

Test firmware build ready — commit eb9c9ce

Download firmware for PR #11522

234 targets built. Find your board's .hex file by name on that page (e.g. MATEKF405SE.hex). Files are individually downloadable — no GitHub login required.

Development build for testing only. Use Full Chip Erase when flashing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant