Skip to content
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

samples/sysbuild/with_mcuboot and bootloader/mcuboot/samples/zephyr/hello-world: not use CONFIG_MCUBOOT_SIGNATURE_KEY_FILE #85270

Closed
zhang-wenchao opened this issue Feb 6, 2025 · 8 comments · May be fixed by #85288
Labels
bug The issue is a bug, or the PR is fixing a bug

Comments

@zhang-wenchao
Copy link
Contributor

zhang-wenchao commented Feb 6, 2025

Describe the bug

Default MCUBoot bootloader key file: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/root-rsa-2048.pem

How to change key file. try use CONFIG_MCUBOOT_SIGNATURE_KEY_FILE add prj.conf still the default.

To Reproduce

nrf52840:

$ west build -p always -b nrf52840_mdk --sysbuild

-- west build: making build dir /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build pristine
-- west build: generating a build system
Loading Zephyr module(s) (Zephyr base): sysbuild_default
-- Found Python3: /home/life/Develop/platform/zephyr-project/.venv/bin/python3 (found suitable version "3.11.2", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: /home/life/.cache/zephyr
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: nrf52840_mdk, qualifiers: nrf52840
Parsing /home/life/Develop/platform/zephyr-project/zephyr/share/sysbuild/Kconfig
Loaded configuration '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/_sysbuild/empty.conf'
Merged configuration '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/sysbuild.conf'
Configuration saved to '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/zephyr/.config'
Kconfig header saved to '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/_sysbuild/autoconf.h'
-- 
   *****************************
   * Running CMake for mcuboot *
   *****************************

Loading Zephyr default modules (Zephyr base).
-- Application: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/boot/zephyr
-- CMake version: 3.30.5
-- Found Python3: /home/life/Develop/platform/zephyr-project/.venv/bin/python (found suitable version "3.11.2", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: /home/life/.cache/zephyr
-- Zephyr version: 4.0.0 (/home/life/Develop/platform/zephyr-project/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: nrf52840_mdk, qualifiers: nrf52840
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.16.8 (/home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8)
-- Found toolchain: zephyr 0.16.8 (/home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8)
-- Found Dtc: /home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/life/Develop/platform/zephyr-project/zephyr/boards/makerdiary/nrf52840_mdk/nrf52840_mdk.dts
-- Found devicetree overlay: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/boot/zephyr/app.overlay
-- Generated zephyr.dts: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/mcuboot/zephyr/zephyr.dts
-- Generated pickled edt: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/mcuboot/zephyr/edt.pickle
-- Generated zephyr.dts: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/mcuboot/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/mcuboot/zephyr/include/generated/zephyr/devicetree_generated.h
-- Including generated dts.cmake file: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/mcuboot/zephyr/dts.cmake
Parsing /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/boot/zephyr/Kconfig
Loaded configuration '/home/life/Develop/platform/zephyr-project/zephyr/boards/makerdiary/nrf52840_mdk/nrf52840_mdk_defconfig'
Merged configuration '/home/life/Develop/platform/zephyr-project/bootloader/mcuboot/boot/zephyr/prj.conf'
Merged configuration '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/sysbuild/mcuboot.conf'
Merged configuration '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/mcuboot/zephyr/.config.sysbuild'
Configuration saved to '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/mcuboot/zephyr/.config'
Kconfig header saved to '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/mcuboot/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: /home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd (found version "2.38")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-- Using ccache: /usr/bin/ccache
MCUBoot bootloader key file: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/root-rsa-2048.pem
Calculated maximum number of sectors: 119
-- Configuring done (4.7s)
-- Generating done (0.2s)
-- Build files have been written to: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/mcuboot
-- 
   **********************************
   * Running CMake for with_mcuboot *
   **********************************

Loading Zephyr default modules (Zephyr base).
-- Application: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot
-- CMake version: 3.30.5
-- Found Python3: /home/life/Develop/platform/zephyr-project/.venv/bin/python (found suitable version "3.11.2", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: /home/life/.cache/zephyr
-- Zephyr version: 4.0.0 (/home/life/Develop/platform/zephyr-project/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: nrf52840_mdk, qualifiers: nrf52840
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.16.8 (/home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8)
-- Found toolchain: zephyr 0.16.8 (/home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8)
-- Found Dtc: /home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/life/Develop/platform/zephyr-project/zephyr/boards/makerdiary/nrf52840_mdk/nrf52840_mdk.dts
-- Generated zephyr.dts: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/zephyr.dts
-- Generated pickled edt: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/edt.pickle
-- Generated zephyr.dts: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/include/generated/zephyr/devicetree_generated.h
-- Including generated dts.cmake file: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/dts.cmake

warning: MCUBOOT_UPDATE_FOOTER_SIZE (defined at subsys/dfu/Kconfig:55) was assigned the value
'0x2000' but got the value ''. Check these unsatisfied dependencies: MCUBOOT_IMG_MANAGER (=n),
IMG_MANAGER (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_MCUBOOT_UPDATE_FOOTER_SIZE and/or look up
MCUBOOT_UPDATE_FOOTER_SIZE in the menuconfig/guiconfig interface. The Application Development
Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual
might be helpful too.

Parsing /home/life/Develop/platform/zephyr-project/zephyr/Kconfig
Loaded configuration '/home/life/Develop/platform/zephyr-project/zephyr/boards/makerdiary/nrf52840_mdk/nrf52840_mdk_defconfig'
Merged configuration '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/prj.conf'
Merged configuration '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/.config.sysbuild'
Configuration saved to '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/.config'
Kconfig header saved to '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: /home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd (found version "2.38")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-- Using ccache: /usr/bin/ccache
-- Including signing script: /home/life/Develop/platform/zephyr-project/zephyr/cmake/mcuboot.cmake
-- Configuring done (4.6s)
-- Generating done (0.1s)
-- Build files have been written to: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/with_mcuboot
-- Configuring done (11.8s)
-- Generating done (0.0s)
-- Build files have been written to: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build
-- west build: building application
[9/16] Performing build step for 'mcuboot'
[1/275] Preparing syscall dependency handling

[3/275] Generating include/generated/zephyr/version.h
-- Zephyr version: 4.0.0 (/home/life/Develop/platform/zephyr-project/zephyr), build: v4.0.0-65-ge397b1b65790
[275/275] Linking C executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       35232 B        48 KB     71.68%
             RAM:       22352 B       256 KB      8.53%
        IDT_LIST:          0 GB        32 KB      0.00%
Generating files from /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/mcuboot/zephyr/zephyr.elf for board: nrf52840_mdk
[11/16] Performing build step for 'with_mcuboot'
[1/130] Preparing syscall dependency handling

[2/130] Generating include/generated/zephyr/version.h
-- Zephyr version: 4.0.0 (/home/life/Develop/platform/zephyr-project/zephyr), build: v4.0.0-65-ge397b1b65790
[130/130] Linking C executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       18816 B       468 KB      3.93%
             RAM:        4240 B       256 KB      1.62%
        IDT_LIST:          0 GB        32 KB      0.00%
Generating files from /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/zephyr.elf for board: nrf52840_mdk
image.py: sign the payload
image.py: sign the payload
[16/16] Completed 'with_mcuboot'

esp32c3:

The esp chip seems to behave differently, the logs give no hint as to which file signature is used.

$ west build -p always -b esp32c3_devkitm --sysbuild
-- west build: making build dir /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build pristine
-- west build: generating a build system
Loading Zephyr module(s) (Zephyr base): sysbuild_default
-- Found Python3: /home/life/Develop/platform/zephyr-project/.venv/bin/python3 (found suitable version "3.11.2", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: /home/life/.cache/zephyr
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: esp32c3_devkitm, qualifiers: esp32c3
Parsing /home/life/Develop/platform/zephyr-project/zephyr/share/sysbuild/Kconfig
Loaded configuration '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/_sysbuild/empty.conf'
Merged configuration '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/sysbuild.conf'
Configuration saved to '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/zephyr/.config'
Kconfig header saved to '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/_sysbuild/autoconf.h'
-- 
   *****************************
   * Running CMake for mcuboot *
   *****************************

Loading Zephyr default modules (Zephyr base).
-- Application: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/boot/zephyr
-- CMake version: 3.30.5
-- Found Python3: /home/life/Develop/platform/zephyr-project/.venv/bin/python (found suitable version "3.11.2", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: /home/life/.cache/zephyr
-- Zephyr version: 4.0.0 (/home/life/Develop/platform/zephyr-project/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: esp32c3_devkitm, qualifiers: esp32c3
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.16.8 (/home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8)
-- Found toolchain: zephyr 0.16.8 (/home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8)
-- Found Dtc: /home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/life/Develop/platform/zephyr-project/zephyr/boards/espressif/esp32c3_devkitm/esp32c3_devkitm.dts
-- Found devicetree overlay: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/boot/zephyr/app.overlay
-- Generated zephyr.dts: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/mcuboot/zephyr/zephyr.dts
-- Generated pickled edt: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/mcuboot/zephyr/edt.pickle
-- Generated zephyr.dts: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/mcuboot/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/mcuboot/zephyr/include/generated/zephyr/devicetree_generated.h
-- Including generated dts.cmake file: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/mcuboot/zephyr/dts.cmake

warning: BOOT_MAX_IMG_SECTORS (defined at /home/life/Develop/platform/zephyr-
project/bootloader/mcuboot/boot/zephyr/Kconfig:449) was assigned the value '512' but got the value
''. Check these unsatisfied dependencies: (!BOOT_MAX_IMG_SECTORS_AUTO) (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BOOT_MAX_IMG_SECTORS and/or look up
BOOT_MAX_IMG_SECTORS in the menuconfig/guiconfig interface. The Application Development Primer,
Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
helpful too.

Parsing /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/boot/zephyr/Kconfig
Loaded configuration '/home/life/Develop/platform/zephyr-project/zephyr/boards/espressif/esp32c3_devkitm/esp32c3_devkitm_defconfig'
Merged configuration '/home/life/Develop/platform/zephyr-project/bootloader/mcuboot/boot/zephyr/prj.conf'
Merged configuration '/home/life/Develop/platform/zephyr-project/bootloader/mcuboot/boot/zephyr/socs/esp32c3.conf'
Merged configuration '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/sysbuild/mcuboot.conf'
Merged configuration '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/mcuboot/zephyr/.config.sysbuild'
Configuration saved to '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/mcuboot/zephyr/.config'
Kconfig header saved to '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/mcuboot/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: /home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/riscv64-zephyr-elf/riscv64-zephyr-elf/bin/ld.bfd (found version "2.38")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/riscv64-zephyr-elf/bin/riscv64-zephyr-elf-gcc
ESP-IDF path: /home/life/Develop/platform/zephyr-project/modules/hal/espressif
esptool path: /home/life/Develop/platform/zephyr-project/modules/hal/espressif/tools/esptool_py/esptool.py
check_callgraph using: /home/life/Develop/platform/zephyr-project/modules/hal/espressif/tools/ci/check_callgraph.py
-- Using ccache: /usr/bin/ccache
Calculated maximum number of sectors: 464
-- Configuring done (4.5s)
-- Generating done (0.2s)
-- Build files have been written to: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/mcuboot
-- 
   **********************************
   * Running CMake for with_mcuboot *
   **********************************

Loading Zephyr default modules (Zephyr base).
-- Application: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot
-- CMake version: 3.30.5
-- Found Python3: /home/life/Develop/platform/zephyr-project/.venv/bin/python (found suitable version "3.11.2", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: /home/life/.cache/zephyr
-- Zephyr version: 4.0.0 (/home/life/Develop/platform/zephyr-project/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: esp32c3_devkitm, qualifiers: esp32c3
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.16.8 (/home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8)
-- Found toolchain: zephyr 0.16.8 (/home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8)
-- Found Dtc: /home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/life/Develop/platform/zephyr-project/zephyr/boards/espressif/esp32c3_devkitm/esp32c3_devkitm.dts
-- Generated zephyr.dts: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/zephyr.dts
-- Generated pickled edt: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/edt.pickle
-- Generated zephyr.dts: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/include/generated/zephyr/devicetree_generated.h
-- Including generated dts.cmake file: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/dts.cmake

warning: MCUBOOT_UPDATE_FOOTER_SIZE (defined at subsys/dfu/Kconfig:55) was assigned the value
'0x1000' but got the value ''. Check these unsatisfied dependencies: MCUBOOT_IMG_MANAGER (=n),
IMG_MANAGER (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_MCUBOOT_UPDATE_FOOTER_SIZE and/or look up
MCUBOOT_UPDATE_FOOTER_SIZE in the menuconfig/guiconfig interface. The Application Development
Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual
might be helpful too.

Parsing /home/life/Develop/platform/zephyr-project/zephyr/Kconfig
Loaded configuration '/home/life/Develop/platform/zephyr-project/zephyr/boards/espressif/esp32c3_devkitm/esp32c3_devkitm_defconfig'
Merged configuration '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/prj.conf'
Merged configuration '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/.config.sysbuild'
Configuration saved to '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/.config'
Kconfig header saved to '/home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: /home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/riscv64-zephyr-elf/riscv64-zephyr-elf/bin/ld.bfd (found version "2.38")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/riscv64-zephyr-elf/bin/riscv64-zephyr-elf-gcc
-- Using ccache: /usr/bin/ccache
-- Including signing script: /home/life/Develop/platform/zephyr-project/zephyr/cmake/mcuboot.cmake
-- Configuring done (4.4s)
-- Generating done (0.2s)
-- Build files have been written to: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/with_mcuboot
-- Configuring done (11.4s)
-- Generating done (0.0s)
-- Build files have been written to: /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build
-- west build: building application
[9/16] Performing build step for 'with_mcuboot'
[1/189] Preparing syscall dependency handling

[2/189] Generating include/generated/zephyr/version.h
-- Zephyr version: 4.0.0 (/home/life/Develop/platform/zephyr-project/zephyr), build: v4.0.0-65-ge397b1b65790
[189/189] Linking C executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
     mcuboot_hdr:          32 B         32 B    100.00%
        metadata:          32 B         32 B    100.00%
           FLASH:      132492 B    4194240 B      3.16%
     iram0_0_seg:       16128 B     301568 B      5.35%
     dram0_0_seg:       27264 B     301568 B      9.04%
     irom0_0_seg:       11020 B         4 MB      0.26%
     drom0_0_seg:       67020 B         4 MB      1.60%
    rtc_iram_seg:          0 GB         8 KB      0.00%
        IDT_LIST:          0 GB         8 KB      0.00%
Generating files from /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/zephyr.elf for board: esp32c3_devkitm
[11/16] Performing build step for 'mcuboot'
[1/235] Preparing syscall dependency handling

[3/235] Generating include/generated/zephyr/version.h
-- Zephyr version: 4.0.0 (/home/life/Develop/platform/zephyr-project/zephyr), build: v4.0.0-65-ge397b1b65790
[235/235] Linking C executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
        iram_seg:       36370 B        38 KB     93.47%
 iram_loader_seg:        3688 B         5 KB     72.03%
        dram_seg:       34320 B        38 KB     88.20%
        IDT_LIST:          0 GB         8 KB      0.00%
Generating files from /home/life/Develop/platform/zephyr-project/zephyr/samples/sysbuild/with_mcuboot/build/mcuboot/zephyr/zephyr.elf for board: esp32c3_devkitm
esptool.py v4.7.0
Creating esp32c3 image...
Merged 6 ELF sections
Successfully created esp32c3 image.
[16/16] Completed 'mcuboot'

Environment (please complete the following information):

  • OS: Linux
  • Toolchain Zephyr SDK
  • v4.0.0-65-ge397b1b65790
@zhang-wenchao zhang-wenchao added the bug The issue is a bug, or the PR is fixing a bug label Feb 6, 2025
@zhang-wenchao zhang-wenchao changed the title esp32c3 mcuboot not use CONFIG_MCUBOOT_SIGNATURE_KEY_FILE samples/sysbuild/with_mcuboot: esp32c3 mcuboot not use CONFIG_MCUBOOT_SIGNATURE_KEY_FILE Feb 6, 2025
@zhang-wenchao zhang-wenchao changed the title samples/sysbuild/with_mcuboot: esp32c3 mcuboot not use CONFIG_MCUBOOT_SIGNATURE_KEY_FILE samples/sysbuild/with_mcuboot: not use CONFIG_MCUBOOT_SIGNATURE_KEY_FILE Feb 6, 2025
@zhang-wenchao
Copy link
Contributor Author

zhang-wenchao commented Feb 6, 2025

cd /bootloader/mcuboot

rm *.pem

cd samples/sysbuild/with_mcuboot

west build -p always -b esp32c3_devkitm --sysbuild

After I removed all the test pems of mcuboot, I was able to compile generate zephyr.signed.bin, this is obviously not normal.

west build -p always -b nrf52840_mdk --sysbuild

CMake Error at /home/life/Develop/platform/zephyr-project/zephyr/cmake/mcuboot.cmake:48 (message):
  west sign can't find file

I don't know where the esp series chips get the key from, the nrf chip gets the default root-rsa-2048.pem.

My core question is still how to customize.

@zhang-wenchao
Copy link
Contributor Author

I also tried bootloader/mcuboot/samples/zephyr/hello-world and got the same result, no configuration was followed.

@zhang-wenchao zhang-wenchao changed the title samples/sysbuild/with_mcuboot: not use CONFIG_MCUBOOT_SIGNATURE_KEY_FILE samples/sysbuild/with_mcuboot and bootloader/mcuboot/samples/zephyr/hello-world: not use CONFIG_MCUBOOT_SIGNATURE_KEY_FILE Feb 6, 2025
@zhang-wenchao
Copy link
Contributor Author

zhang-wenchao commented Feb 6, 2025

I hope the issue can be assigned and tracked to be resolved as soon as possible, and I will provide necessary assistance.Is this an issue with mcuboot upstream or zephyr? I will report the issue upstream if this issue is not appropriate here.

@nordicjm
Copy link
Collaborator

nordicjm commented Feb 6, 2025

Documented on https://docs.zephyrproject.org/latest/build/signing/index.html

SB_CONFIG_BOOT_SIGNATURE_KEY_FILE: the key file to use when singing images. If you have your own key, change this appropriately

@nordicjm nordicjm closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2025
@zhang-wenchao
Copy link
Contributor Author

@nordicjm

@sylvioalves

SB_CONFIG_BOOTLOADER_MCUBOOT=y
SB_CONFIG_BOOT_SIGNATURE_KEY_FILE="bootloader/mcuboot/root-rsa-2048.pem"

nrf52840 is normal.

esp32c3:

warning: BOOT_SIGNATURE_KEY_FILE (defined at share/sysbuild/images/bootloader/Kconfig:142) was
assigned the value 'bootloader/mcuboot/root-rsa-2048.pem' but got the value ''. See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BOOT_SIGNATURE_KEY_FILE and/or look up
BOOT_SIGNATURE_KEY_FILE in the menuconfig/guiconfig interface. The Application Development Primer,
Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
helpful too.

I recommend opening this issue to track esp32c3 specific issues.

@nordicjm
Copy link
Collaborator

nordicjm commented Feb 6, 2025

The default signature for that is none, you would need to select one of:

SB_CONFIG_BOOT_SIGNATURE_TYPE_RSA
SB_CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256
SB_CONFIG_BOOT_SIGNATURE_TYPE_ED25519

@zhang-wenchao
Copy link
Contributor Author

esp32c3 still has problems:

# Enable the bootloader when building with sysbuild.
SB_CONFIG_BOOTLOADER_MCUBOOT=y
SB_CONFIG_BOOT_SIGNATURE_KEY_FILE="/home/life/Develop/platform/zephyr-project/bootloader/mcuboot/root-rsa-2048.pem"
SB_CONFIG_BOOT_SIGNATURE_TYPE_RSA=y
$ west build -p always -b esp32c3_devkitm --sysbuild

-- west build: making build dir /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build pristine
-- west build: generating a build system
Loading Zephyr module(s) (Zephyr base): sysbuild_default
-- Found Python3: /home/life/Develop/platform/zephyr-project/.venv/bin/python3 (found suitable version "3.11.2", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: /home/life/.cache/zephyr
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: esp32c3_devkitm, qualifiers: esp32c3
Parsing /home/life/Develop/platform/zephyr-project/zephyr/share/sysbuild/Kconfig
Loaded configuration '/home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/_sysbuild/empty.conf'
Merged configuration '/home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/sysbuild.conf'
Configuration saved to '/home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/zephyr/.config'
Kconfig header saved to '/home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/_sysbuild/autoconf.h'
-- 
   *****************************
   * Running CMake for mcuboot *
   *****************************

Loading Zephyr default modules (Zephyr base).
-- Application: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/boot/zephyr
-- CMake version: 3.30.5
-- Found Python3: /home/life/Develop/platform/zephyr-project/.venv/bin/python (found suitable version "3.11.2", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: /home/life/.cache/zephyr
-- Zephyr version: 4.0.0 (/home/life/Develop/platform/zephyr-project/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: esp32c3_devkitm, qualifiers: esp32c3
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.16.8 (/home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8)
-- Found toolchain: zephyr 0.16.8 (/home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8)
-- Found Dtc: /home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/life/Develop/platform/zephyr-project/zephyr/boards/espressif/esp32c3_devkitm/esp32c3_devkitm.dts
-- Found devicetree overlay: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/boot/zephyr/app.overlay
-- Generated zephyr.dts: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/mcuboot/zephyr/zephyr.dts
-- Generated pickled edt: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/mcuboot/zephyr/edt.pickle
-- Generated zephyr.dts: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/mcuboot/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/mcuboot/zephyr/include/generated/zephyr/devicetree_generated.h
-- Including generated dts.cmake file: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/mcuboot/zephyr/dts.cmake

warning: BOOT_MAX_IMG_SECTORS (defined at /home/life/Develop/platform/zephyr-
project/bootloader/mcuboot/boot/zephyr/Kconfig:449) was assigned the value '512' but got the value
''. Check these unsatisfied dependencies: (!BOOT_MAX_IMG_SECTORS_AUTO) (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BOOT_MAX_IMG_SECTORS and/or look up
BOOT_MAX_IMG_SECTORS in the menuconfig/guiconfig interface. The Application Development Primer,
Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
helpful too.

Parsing /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/boot/zephyr/Kconfig
Loaded configuration '/home/life/Develop/platform/zephyr-project/zephyr/boards/espressif/esp32c3_devkitm/esp32c3_devkitm_defconfig'
Merged configuration '/home/life/Develop/platform/zephyr-project/bootloader/mcuboot/boot/zephyr/prj.conf'
Merged configuration '/home/life/Develop/platform/zephyr-project/bootloader/mcuboot/boot/zephyr/socs/esp32c3.conf'
Merged configuration '/home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/mcuboot/zephyr/.config.sysbuild'
Configuration saved to '/home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/mcuboot/zephyr/.config'
Kconfig header saved to '/home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/mcuboot/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: /home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/riscv64-zephyr-elf/riscv64-zephyr-elf/bin/ld.bfd (found version "2.38")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/riscv64-zephyr-elf/bin/riscv64-zephyr-elf-gcc
ESP-IDF path: /home/life/Develop/platform/zephyr-project/modules/hal/espressif
esptool path: /home/life/Develop/platform/zephyr-project/modules/hal/espressif/tools/esptool_py/esptool.py
check_callgraph using: /home/life/Develop/platform/zephyr-project/modules/hal/espressif/tools/ci/check_callgraph.py
-- Using ccache: /usr/bin/ccache
MCUBoot bootloader key file: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/root-rsa-2048.pem
Calculated maximum number of sectors: 464
-- Configuring done (4.5s)
-- Generating done (0.2s)
-- Build files have been written to: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/mcuboot
-- 
   *********************************
   * Running CMake for hello-world *
   *********************************

Loading Zephyr default modules (Zephyr base).
-- Application: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world
-- CMake version: 3.30.5
-- Found Python3: /home/life/Develop/platform/zephyr-project/.venv/bin/python (found suitable version "3.11.2", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: /home/life/.cache/zephyr
-- Zephyr version: 4.0.0 (/home/life/Develop/platform/zephyr-project/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: esp32c3_devkitm, qualifiers: esp32c3
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.16.8 (/home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8)
-- Found toolchain: zephyr 0.16.8 (/home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8)
-- Found Dtc: /home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/life/Develop/platform/zephyr-project/zephyr/boards/espressif/esp32c3_devkitm/esp32c3_devkitm.dts
-- Generated zephyr.dts: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/hello-world/zephyr/zephyr.dts
-- Generated pickled edt: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/hello-world/zephyr/edt.pickle
-- Generated zephyr.dts: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/hello-world/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/hello-world/zephyr/include/generated/zephyr/devicetree_generated.h
-- Including generated dts.cmake file: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/hello-world/zephyr/dts.cmake

warning: MCUBOOT_UPDATE_FOOTER_SIZE (defined at subsys/dfu/Kconfig:55) was assigned the value
'0x1000' but got the value ''. Check these unsatisfied dependencies: MCUBOOT_IMG_MANAGER (=n),
IMG_MANAGER (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_MCUBOOT_UPDATE_FOOTER_SIZE and/or look up
MCUBOOT_UPDATE_FOOTER_SIZE in the menuconfig/guiconfig interface. The Application Development
Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual
might be helpful too.

Parsing /home/life/Develop/platform/zephyr-project/zephyr/Kconfig
Loaded configuration '/home/life/Develop/platform/zephyr-project/zephyr/boards/espressif/esp32c3_devkitm/esp32c3_devkitm_defconfig'
Merged configuration '/home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/prj.conf'
Merged configuration '/home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/hello-world/zephyr/.config.sysbuild'
Configuration saved to '/home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/hello-world/zephyr/.config'
Kconfig header saved to '/home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/hello-world/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: /home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/riscv64-zephyr-elf/riscv64-zephyr-elf/bin/ld.bfd (found version "2.38")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/riscv64-zephyr-elf/bin/riscv64-zephyr-elf-gcc
-- Using ccache: /usr/bin/ccache
-- Including signing script: /home/life/Develop/platform/zephyr-project/zephyr/cmake/mcuboot.cmake
-- Configuring done (4.5s)
-- Generating done (0.2s)
-- Build files have been written to: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/hello-world
-- Configuring done (11.5s)
-- Generating done (0.0s)
-- Build files have been written to: /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build
-- west build: building application
[9/16] Performing build step for 'mcuboot'
[1/332] Preparing syscall dependency handling

[3/332] Generating include/generated/zephyr/version.h
-- Zephyr version: 4.0.0 (/home/life/Develop/platform/zephyr-project/zephyr), build: v4.0.0-65-ge397b1b65790
[327/332] Linking C executable zephyr/zephyr_pre0.elf
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/mcuboot/zephyr/zephyr_pre0.map 
: && ccache /home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/riscv64-zephyr-elf/bin/riscv64-zephyr-elf-gcc  -gdwarf-4 -gdwarf-4 zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr/zephyr_pre0.elf  zephyr/CMakeFiles/offsets.dir/./arch/riscv/core/offsets/offsets.c.obj  -T  zephyr/linker_zephyr_pre0.cmd  -Wl,-Map=/home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/mcuboot/zephyr/zephyr_pre0.map  -Wl,--whole-archive  app/libapp.a  zephyr/libzephyr.a  zephyr/arch/common/libarch__common.a  zephyr/arch/arch/riscv/core/libarch__riscv__core.a  zephyr/lib/libc/minimal/liblib__libc__minimal.a  zephyr/lib/libc/common/liblib__libc__common.a  zephyr/drivers/interrupt_controller/libdrivers__interrupt_controller.a  zephyr/drivers/clock_control/libdrivers__clock_control.a  zephyr/drivers/flash/libdrivers__flash.a  zephyr/drivers/gpio/libdrivers__gpio.a  zephyr/drivers/pinctrl/libdrivers__pinctrl.a  zephyr/drivers/timer/libdrivers__timer.a  modules/mbedtls/libmbedTLSBase.a  modules/mbedtls/libmbedTLSCrypto.a  modules/mbedtls/libmbedTLSX509.a  modules/mbedtls/libmodules__mbedtls.a  modules/mcuboot/libmcuboot_util.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  -L/home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/mcuboot/zephyr  zephyr/arch/common/libisr_tables.a  modules/mbedtls/libmbedTLSBase.a  modules/mbedtls/libmbedTLSCrypto.a  modules/mbedtls/libmbedTLSX509.a  -mabi=ilp32  -march=rv32imc_zicsr  -fuse-ld=bfd  -Wl,--gc-sections  -Wl,--build-id=none  -Wl,--sort-common=descending  -Wl,--sort-section=alignment  -Wl,-u,_OffsetAbsSyms  -Wl,-u,_ConfigAbsSyms  -nostdlib  -static  -Wl,-X  -Wl,-N  -Wl,--orphan-handling=warn  -Wl,-no-pie  -lgcc  -T/home/life/Develop/platform/zephyr-project/modules/hal/espressif/zephyr/esp32c3/src/linker/esp32c3.rom.alias.ld  -T/home/life/Develop/platform/zephyr-project/modules/hal/espressif/zephyr/esp32c3/../../components/esp_rom/esp32c3/ld/esp32c3.rom.ld  -T/home/life/Develop/platform/zephyr-project/modules/hal/espressif/zephyr/esp32c3/../../components/esp_rom/esp32c3/ld/esp32c3.rom.eco3.ld  -T/home/life/Develop/platform/zephyr-project/modules/hal/espressif/zephyr/esp32c3/../../components/esp_rom/esp32c3/ld/esp32c3.rom.api.ld  -T/home/life/Develop/platform/zephyr-project/modules/hal/espressif/zephyr/esp32c3/../../components/esp_rom/esp32c3/ld/esp32c3.rom.libgcc.ld  -T/home/life/Develop/platform/zephyr-project/modules/hal/espressif/zephyr/esp32c3/../../components/esp_rom/esp32c3/ld/esp32c3.rom.newlib.ld  -T/home/life/Develop/platform/zephyr-project/modules/hal/espressif/zephyr/esp32c3/../../components/esp_rom/esp32c3/ld/esp32c3.rom.version.ld  -T/home/life/Develop/platform/zephyr-project/modules/hal/espressif/zephyr/esp32c3/../../components/soc/esp32c3/ld/esp32c3.peripherals.ld -L"/home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/12.2.0"  -lgcc && cd /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/mcuboot/zephyr && /home/linuxbrew/.linuxbrew/Cellar/cmake/3.30.5/bin/cmake -E true
/home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/12.2.0/../../../../riscv64-zephyr-elf/bin/ld.bfd: zephyr/zephyr_pre0.elf section `.iram0.text' will not fit in region `iram_seg'
/home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/12.2.0/../../../../riscv64-zephyr-elf/bin/ld.bfd: zephyr/zephyr_pre0.elf section `.bss' will not fit in region `dram_seg'
/home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/12.2.0/../../../../riscv64-zephyr-elf/bin/ld.bfd: section .iram0.loader_text LMA [00000000403c9a00,00000000403ca867] overlaps section .iram0.text LMA [00000000403c0200,00000000403cb0ef]
/home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/12.2.0/../../../../riscv64-zephyr-elf/bin/ld.bfd: region `iram_seg' overflowed by 5872 bytes
/home/life/Develop/platform/zephyr-project/sdk/zephyr-sdk-0.16.8/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/12.2.0/../../../../riscv64-zephyr-elf/bin/ld.bfd: region `dram_seg' overflowed by 1328 bytes
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
[10/16] No configure step for 'hello-world'
FAILED: _sysbuild/sysbuild/images/bootloader/mcuboot-prefix/src/mcuboot-stamp/mcuboot-build /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/_sysbuild/sysbuild/images/bootloader/mcuboot-prefix/src/mcuboot-stamp/mcuboot-build 
cd /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build/mcuboot && /home/linuxbrew/.linuxbrew/Cellar/cmake/3.30.5/bin/cmake --build .
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /home/linuxbrew/.linuxbrew/bin/cmake --build /home/life/Develop/platform/zephyr-project/bootloader/mcuboot/samples/zephyr/hello-world/build

@zhang-wenchao
Copy link
Contributor Author

zhang-wenchao commented Feb 6, 2025

@sylvioalves Is this an esp32c3 specific issue?

I just saw a similar issue: #76566

I increased it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants