Closed mniestroj closed 1 year ago
Visit the preview URL for this PR (updated for commit acb8b90):
https://golioth-zephyr-sdk-doxygen-dev--pr376-esp32-boot-o0r0haeq.web.app
(expires Thu, 04 May 2023 20:01:26 GMT)
🔥 via Firebase Hosting GitHub Action 🌎
Sign: a389eefadf4b4b68a539327b3459dd66c142cf49
@ChrisGammell This is where sysbuild is used. Based on the brief documentation above, you can see what are the advantages of using it in case of DFU capable firmware.
I'm having trouble getting the second binary build to make it past the signing process. It looks like the version number is in there, but it's not used as the argument for the --version
flag.
west build -b esp32 --sysbuild samples/dfu -- -DCONFIG_MCUBOOT_EXTRA_IMGTOOL_ARGS=\"1.2.3\"
...snip...
Error: Got unexpected extra argument (/home/mike/golioth-zephyr-workspace/modules/lib/golioth/build/dfu/zephyr/zephyr.signed.bin)
FATAL ERROR: command exited with status 2: /home/mike/golioth-zephyr-workspace/.venv/bin/imgtool sign --version 0.0.0+0 --align 4 --header-size 32 --slot-size 1048576 --key /home/mike/golioth-zephyr-workspace/bootloader/mcuboot/root-rsa-2048.pem 1.2.3 /home/mike/golioth-zephyr-workspace/modules/lib/golioth/build/dfu/zephyr/zephyr.bin /home/mike/golioth-zephyr-workspace/modules/lib/golioth/build/dfu/zephyr/zephyr.signed.bin
ninja: build stopped: subcommand failed.
[10/16] No configure step for 'mcuboot_espressif'
FAILED: dfu-prefix/src/dfu-stamp/dfu-build /home/mike/golioth-zephyr-workspace/modules/lib/golioth/build/dfu-prefix/src/dfu-stamp/dfu-build
cd /home/mike/golioth-zephyr-workspace/modules/lib/golioth/build/dfu && /usr/local/bin/cmake --build .
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /home/mike/golioth-zephyr-workspace/modules/lib/golioth/build
I'm having trouble getting the second binary build to make it past the signing process. It looks like the version number is in there, but it's not used as the argument for the
--version
flag.west build -b esp32 --sysbuild samples/dfu -- -DCONFIG_MCUBOOT_EXTRA_IMGTOOL_ARGS=\"1.2.3\" ...snip... Error: Got unexpected extra argument (/home/mike/golioth-zephyr-workspace/modules/lib/golioth/build/dfu/zephyr/zephyr.signed.bin) FATAL ERROR: command exited with status 2: /home/mike/golioth-zephyr-workspace/.venv/bin/imgtool sign --version 0.0.0+0 --align 4 --header-size 32 --slot-size 1048576 --key /home/mike/golioth-zephyr-workspace/bootloader/mcuboot/root-rsa-2048.pem 1.2.3 /home/mike/golioth-zephyr-workspace/modules/lib/golioth/build/dfu/zephyr/zephyr.bin /home/mike/golioth-zephyr-workspace/modules/lib/golioth/build/dfu/zephyr/zephyr.signed.bin ninja: build stopped: subcommand failed. [10/16] No configure step for 'mcuboot_espressif' FAILED: dfu-prefix/src/dfu-stamp/dfu-build /home/mike/golioth-zephyr-workspace/modules/lib/golioth/build/dfu-prefix/src/dfu-stamp/dfu-build cd /home/mike/golioth-zephyr-workspace/modules/lib/golioth/build/dfu && /usr/local/bin/cmake --build . ninja: build stopped: subcommand failed. FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /home/mike/golioth-zephyr-workspace/modules/lib/golioth/build
Thanks for catching this! I've updated -DCONFIG_MCUBOOT_EXTRA_IMGTOOL_ARGS=...
argument in docs and in this PR description. It should work now.
Yes that got it building for me, thanks!
Edit: I had previously uploaded the wrong .bin file as the artifact and reported a problem here. All working now!
Add support for sysbuild for
esp32
board. That way all vanilla Zephyr boards will be supported using single, much simplified build/flash flow.The old flow
Update the submodules needed by the Espressif port:
Install IDF dependencies and set environment variables:
Compile and generate the ELF:
Convert the ELF to the final bootloader image, ready to be flashed:
Flash MCUboot in your board:
Flash Golioth DFU sample:
Sign sample image:
Flash sample image:
Prepare application image with new version (
1.2.3
):The new flow
Build bootloader and (signed) Golioth DFU sample:
Flash bootloader and sample:
Prepare application image with new version (
1.2.3
):