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

west sign regression when HEX file not exists #34534

Closed
nandojve opened this issue Apr 24, 2021 · 1 comment
Closed

west sign regression when HEX file not exists #34534

nandojve opened this issue Apr 24, 2021 · 1 comment
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug Regression Something, which was working, does not anymore
Milestone

Comments

@nandojve
Copy link
Member

Describe the bug
west sign, as command says, should sign zephyr output files for MCUboot, for instance. When using minimal parameters west will try sign both hex and bin files. The west sign is failing on current zephyr mainline for projects that create only a bin file. This is the case of frdm-k64f board.

To Reproduce
Steps to reproduce the behavior:

  1. west build -b frdm_k64f -d build/app zephyr/samples/subsys/mgmt/updatehub
  2. west sign -t imgtool -d build/app -- --version 1.0.0 --pad --key bootloader/mcuboot/root-rsa-2048.pem
  3. See error

FATAL ERROR: no unsigned .hex found at /home/gfbudke/zephyros/mainline/build/app/zephyr/zephyr.hex

Expected behavior
west sign should skip to sign when target file not exists. if no targets, a graceful exit is expected.

Impact
annoyance

Environment (please complete the following information):

  • OS: Linux
  • Toolchain Zephyr SDK 0.12.3
  • Commit SHA 3eb05e5

Additional context
west sign --no-hex can be used as workaround.

west sign --no-hex -t imgtool -d build/app -- --version 1.0.0 --pad --key bootloader/mcuboot/root-rsa-2048.pem
=== image configuration:
partition offset: 131072 (0x20000)
partition size: 393216 (0x60000)
rom start offset: 512 (0x200)
=== signing binaries
unsigned bin: /home/gfbudke/zephyros/mainline/build/app/zephyr/zephyr.bin
signed bin:   /home/gfbudke/zephyros/mainline/build/app/zephyr/zephyr.signed.bin

This was discovered at #34442

@nandojve nandojve added the bug The issue is a bug, or the PR is fixing a bug label Apr 24, 2021
@nandojve nandojve added this to the v2.6.0 milestone Apr 24, 2021
@nandojve nandojve changed the title west sign regression when not HEX file west sign regression when HEX file not exists Apr 24, 2021
@ioannisg ioannisg added priority: medium Medium impact/importance bug Regression Something, which was working, does not anymore labels Apr 27, 2021
@mbolivar-nordic
Copy link
Contributor

This was fixed in 250b213, with a follow-up fix for a spurious warning in 2de6bf9.

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 priority: medium Medium impact/importance bug Regression Something, which was working, does not anymore
Projects
None yet
Development

No branches or pull requests

3 participants