Skip to content

musca: Improve missing python dependencies error #14643

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

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions targets/TARGET_ARM_SSG/TARGET_MUSCA_B1/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
if("TFM" IN_LIST MBED_TARGET_LABELS)
include(mbed_set_post_build_tfm)

# Check deps for image signing
if(NOT(Python3_FOUND AND HAVE_PYTHON_INTELHEX AND HAVE_PYTHON_CBOR AND
HAVE_PYTHON_CLICK AND HAVE_PYTHON_CRYPTOGRAPHY))
message(FATAL_ERROR "Missing Python dependencies (python3, cbor, "
"click, intelhex) so the binary cannot be signed. Please install "
"requirements with:\n"
"\tpython3 -m pip install -r mbed-os/tools/cmake/requirements.txt")
endif()

mbed_post_build_tfm_sign_image(
ARM_MUSCA_B1
musca_b1
Expand Down
9 changes: 9 additions & 0 deletions targets/TARGET_ARM_SSG/TARGET_MUSCA_S1/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
if("TFM" IN_LIST MBED_TARGET_LABELS)
include(mbed_set_post_build_tfm)

# Check deps for image signing
if(NOT(Python3_FOUND AND HAVE_PYTHON_INTELHEX AND HAVE_PYTHON_CBOR AND
HAVE_PYTHON_CLICK AND HAVE_PYTHON_CRYPTOGRAPHY))
message(FATAL_ERROR "Missing Python dependencies (python3, cbor, "
"click, intelhex) so the binary cannot be signed. Please install "
"requirements with:\n"
"\tpython3 -m pip install -r mbed-os/tools/cmake/requirements.txt")
endif()

mbed_post_build_tfm_sign_image(
ARM_MUSCA_S1
musca_s1
Expand Down
2 changes: 2 additions & 0 deletions tools/cmake/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ prettytable==0.7.2
future==0.16.0
Jinja2>=2.10.1,<2.11
intelhex>=2.3.0,<3.0.0
cbor>=1.0.0
Click>=7.0,<7.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we add also cryptography>=2.5,<3 as it is required by tfm (it is in the old tools requirements

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be the same as in #14780: Click>=7.0,<8