-
Notifications
You must be signed in to change notification settings - Fork 7.4k
soc: espressif: Build MCUboot Espressif Port using sysbuild #87710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
soc: espressif: Build MCUboot Espressif Port using sysbuild #87710
Conversation
5d0b930
to
068b0c5
Compare
dfbe166
to
9a4bf5f
Compare
2077475
to
db68a0f
Compare
db68a0f
to
3d99369
Compare
3d99369
to
72de282
Compare
fd0fbcc
to
e1c5597
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, LGTM, but we need to address the binding to the Zephyr application memory layout. Currently, the EP has a completely independent layout that would create an issue during the app loading.
|
||
/* Empty linker script to allow MCUboot Espressif Port to link in its | ||
* own way when building using sysbuild. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think EP is missing the memory allocations for the bootloader images that are being calculated in the memory.h
. The current layout in the boot/espressif/port/<soc>/bootloader.ld
could interfere with the images with higher SRAM consumption. Ex. ESP32-S3 iram_loader.text
is normally at the 0x403c6400
, while the EP integration ld sets this to the 0x403ba000
, which is ~50kB less.
Move BOOTLOADER_MCUBOOT configuration from boards/espressif/<BOARD>/Kconfig.sysbuild to soc/espressif/Kconfig.sysbuild so it applies generally to every board with Espressif's SoC when building a project using sysbuild. Signed-off-by: Almir Okato <[email protected]>
Enable sysbuild to build MCUboot Espressif's port as an external project. Signed-off-by: Almir Okato <[email protected]> Signed-off-by: Lucas Tamborrino <[email protected]> Signed-off-by: Marek Matej <[email protected]>
e1c5597
to
af9776f
Compare
The following west manifest projects have changed revision in this Pull Request:
✅ All manifest checks OK Note: This message is automatically posted and updated by the Manifest GitHub Action. |
Use sysbuild to build MCUboot Espressif Port as an external project.
The current sysbuild usage for Espressif should not be affected, so the regular
west build <BOARD> <SAMPLE> --sysbuild
still builds Zephyr Port. In order to build Espressif Port, the KconfigCONFIG_BOOTLOADER_MCUBOOT_ESPRESSIF
needs to be enabled on the sysbuild menuconfig, or it can be passed as sysbuild domain variable in the command line--sysbuild -DSB_CONFIG_BOOTLOADER_MCUBOOT_ESPRESSIF=y
.Kconfigs for Espressif's
Kconfig.sysbuild
were added to match MCUboot Espressif Port configuration, so they are partially similar to the regular Zephyr Port, but notice it's a different MCUboot Port.CONFIG_MCUBOOT_ESPRESSIF
indicates that the current build is MCUboot Espressif Port image. Defined in Espressif Port from MCUboot repository.(SB_)CONFIG_BOOTLOADER_MCUBOOT_ESPRESSIF
indicates to Espressif's sysbuild cmake that it needs to build the MCUboot Espressif Port bootloader and that it needs to set the main image as a MCUboot compatible image, similar as Zephyr already does with the CONFIG_BOOTLOADER_MCUBOOT for setting Zephyr Port and MCUboot compatibility when building with sysbuild.How to build and test:
hal_espressif
to the branch in the following PR: mcuboot: build MCUboot Espressif Port with Zephyr sysbuild hal_espressif#424mcuboot
to the branch in following PR: boot: espressif: integrate Espressif Port with Zephyr sysbuild system mcu-tools/mcuboot#2233OR