From 6662d84faa25a5c64bd4f5e07bc548ceaa7f2fb5 Mon Sep 17 00:00:00 2001 From: Glenn Moloney Date: Thu, 7 Sep 2023 08:52:39 +1000 Subject: [PATCH] esp32/boards: Add bootloader rollback support for all builds. Add "CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y" to ports/esp32/boards/sdkconfig.base so that all micropython esp32 images support OTA rollback in the bootloader. These images can then be converted to OTA-capable images as required by user tools. Also remove CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y from board-specific sdkconfig files as this is now the default. Signed-off-by: Glenn Moloney --- ports/esp32/boards/ARDUINO_NANO_ESP32/sdkconfig.board | 1 - ports/esp32/boards/ESP32_GENERIC/sdkconfig.ota | 1 - ports/esp32/boards/SIL_WESP32/sdkconfig.board | 1 - ports/esp32/boards/sdkconfig.base | 1 + 4 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ports/esp32/boards/ARDUINO_NANO_ESP32/sdkconfig.board b/ports/esp32/boards/ARDUINO_NANO_ESP32/sdkconfig.board index 4d175f7ed..888e22576 100644 --- a/ports/esp32/boards/ARDUINO_NANO_ESP32/sdkconfig.board +++ b/ports/esp32/boards/ARDUINO_NANO_ESP32/sdkconfig.board @@ -17,6 +17,5 @@ CONFIG_TINYUSB_DESC_MANUFACTURER_STRING="Arduino" CONFIG_TINYUSB_DESC_PRODUCT_STRING="Nano ESP32" # compatibility with Espressif Arduino core -CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP=y CONFIG_ESP_ENABLE_COREDUMP_TO_FLASH=y diff --git a/ports/esp32/boards/ESP32_GENERIC/sdkconfig.ota b/ports/esp32/boards/ESP32_GENERIC/sdkconfig.ota index 4a164aa6f..e3a1f81fd 100644 --- a/ports/esp32/boards/ESP32_GENERIC/sdkconfig.ota +++ b/ports/esp32/boards/ESP32_GENERIC/sdkconfig.ota @@ -1,4 +1,3 @@ -CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y CONFIG_PARTITION_TABLE_CUSTOM=y CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MiB-ota.csv" diff --git a/ports/esp32/boards/SIL_WESP32/sdkconfig.board b/ports/esp32/boards/SIL_WESP32/sdkconfig.board index be9e40c4c..741a4db43 100644 --- a/ports/esp32/boards/SIL_WESP32/sdkconfig.board +++ b/ports/esp32/boards/SIL_WESP32/sdkconfig.board @@ -13,7 +13,6 @@ CONFIG_ESP32_REV_MIN_1=y # OTA -CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y CONFIG_PARTITION_TABLE_CUSTOM=y CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-16MiB-ota.csv" diff --git a/ports/esp32/boards/sdkconfig.base b/ports/esp32/boards/sdkconfig.base index 4b7c85233..6526a8035 100644 --- a/ports/esp32/boards/sdkconfig.base +++ b/ports/esp32/boards/sdkconfig.base @@ -14,6 +14,7 @@ CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR=y # Bootloader config CONFIG_BOOTLOADER_LOG_LEVEL_WARN=y CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP=y +CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y # Change default log level to "ERROR" (instead of "INFO") CONFIG_LOG_DEFAULT_LEVEL_INFO=n