From bd3ceb6e992dcb6dc2c2bc92d24a19dd9c9d64ed Mon Sep 17 00:00:00 2001 From: jpirnay Date: Sat, 2 May 2026 10:44:13 +0200 Subject: [PATCH] Add itsthisjustins ota fix for x3 --- platformio.ini | 2 +- src/platform/skip_efuse_blk_check.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 src/platform/skip_efuse_blk_check.c diff --git a/platformio.ini b/platformio.ini index 1d814e18..6777dcc4 100644 --- a/platformio.ini +++ b/platformio.ini @@ -37,7 +37,7 @@ build_flags = # Default is (320*4+1)*2=2562, we need more for larger images -DPNG_MAX_BUFFERED_PIXELS=16416 -Wno-bidi-chars - -Wl,--wrap=panic_print_backtrace,--wrap=panic_abort + -Wl,--wrap=panic_print_backtrace,--wrap=panic_abort,--wrap=bootloader_common_check_efuse_blk_validity -fno-exceptions build_unflags = diff --git a/src/platform/skip_efuse_blk_check.c b/src/platform/skip_efuse_blk_check.c new file mode 100644 index 00000000..d3e4ea4f --- /dev/null +++ b/src/platform/skip_efuse_blk_check.c @@ -0,0 +1,11 @@ +// Override the prebuilt libbootloader_support.a implementation. +// The X3's validation code misreads the new image's esp_app_desc_t through a +// misaligned bootloader_mmap pointer, producing garbage eFuse block revision +// values that fail the check. Safe to skip: the eFuse block revision gate is +// a manufacturing concern, not a runtime safety issue. +#include +esp_err_t __wrap_bootloader_common_check_efuse_blk_validity(uint32_t min_rev_full, uint32_t max_rev_full) { + (void)min_rev_full; + (void)max_rev_full; + return ESP_OK; +} \ No newline at end of file