Skip to content
Prev Previous commit
Next Next commit
loader: ensure sfu magic is always included in the loader binary
  • Loading branch information
pennam committed Jan 14, 2026
commit 3171acd04fcee49ceafdbc7f8fe7e56abe98301f
2 changes: 1 addition & 1 deletion libraries/SFU/extra/loader/ota.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

// Loader is checking this "magic" string is included in the OTA file.
// If not included OTA is aborted.
static const char sfu_version_magic_string[] __attribute__ ((section(".rodata"), used)) = "SFU version";
static const char sfu_version_magic_string[] __attribute__ ((section(".rodata.sfu_magic"), used)) = "SFU version";


static const uint32_t crc_table[256] = {
Expand Down
2 changes: 2 additions & 0 deletions variants/PORTENTA_C33/fsp.ld
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ SECTIONS
*(.dtors)

*(.rodata*)
/* Ensure SFU magic bytes are not removed */
KEEP(*(.rodata.sfu_magic))

KEEP(*(.eh_frame*))

Expand Down