espressif:esp32: Add multi image support
Changes on configuration and flash area organization for supporting
multi image and implementation for booting on different processors
on esp32
Signed-off-by: Almir Okato <almir.okato@espressif.com>
diff --git a/boot/espressif/bootloader.conf b/boot/espressif/bootloader.conf
index f350262..7107e7e 100644
--- a/boot/espressif/bootloader.conf
+++ b/boot/espressif/bootloader.conf
@@ -3,13 +3,33 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_ESP_BOOTLOADER_SIZE=0xF000
-CONFIG_ESP_APPLICATION_PRIMARY_START_ADDRESS=0x10000
+CONFIG_ESP_IMAGE0_PRIMARY_START_ADDRESS=0x10000
CONFIG_ESP_APPLICATION_SIZE=0x100000
-CONFIG_ESP_APPLICATION_SECONDARY_START_ADDRESS=0x110000
+CONFIG_ESP_IMAGE0_SECONDARY_START_ADDRESS=0x110000
CONFIG_ESP_MCUBOOT_WDT_ENABLE=y
CONFIG_ESP_SCRATCH_OFFSET=0x210000
CONFIG_ESP_SCRATCH_SIZE=0x40000
+# Enables multi image, if it is not defined, it is assumed
+# only one updatable image
+# CONFIG_ESP_IMAGE_NUMBER=2
+
+# Enables multi image boot on independent processors
+# (main host OS is not responsible for booting the second image)
+# Use only with CONFIG_ESP_IMAGE_NUMBER=2
+# CONFIG_ESP_MULTI_PROCESSOR_BOOT=y
+
+# Example of values to be used when multi image is enabled
+# Notice that the OS layer and update agent must be aware
+# of these regions
+# CONFIG_ESP_APPLICATION_SIZE=0x50000
+# CONFIG_ESP_IMAGE0_PRIMARY_START_ADDRESS=0x10000
+# CONFIG_ESP_IMAGE0_SECONDARY_START_ADDRESS=0x60000
+# CONFIG_ESP_IMAGE1_PRIMARY_START_ADDRESS=0xB0000
+# CONFIG_ESP_IMAGE1_SECONDARY_START_ADDRESS=0x100000
+# CONFIG_ESP_SCRATCH_OFFSET=0x150000
+# CONFIG_ESP_SCRATCH_SIZE=0x40000
+
# CONFIG_ESP_SIGN_EC256=y
# CONFIG_ESP_SIGN_ED25519=n
# CONFIG_ESP_SIGN_RSA=n