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

Fix imgtool import for CYTFM_064B0S2_4343W signing #14362

Merged
merged 1 commit into from
Mar 11, 2021

Conversation

LDong-Arm
Copy link
Contributor

@LDong-Arm LDong-Arm commented Mar 1, 2021

Summary of changes

Fixes: #14153

The target CYTFM_064B0S2_4343W is signed using cysecuretools which depends on imgtool managed by pip. However, Arm Musca targets requires a modified/wrapped version of the image tool copied from trusted-firmware-m + MCUboot.

To avoid conflicts in the version of imgtool used, we should only add the copied version of imgtool to python's system path for Musca targets instead of doing it globally for all targets.

Impact of changes

Building and signing of CYTFM_064B0S2_4343W complete successfully.

Migration actions required

None.

Documentation

None.


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers

@ARMmbed/team-cypress @romanjoe @hugueskamba @0xc0170


@ciarmcom
Copy link
Member

ciarmcom commented Mar 1, 2021

@LDong-Arm, thank you for your changes.
@hugueskamba @0xc0170 @ARMmbed/mbed-os-maintainers please review.

@ciarmcom
Copy link
Member

ciarmcom commented Mar 1, 2021

@LDong-Arm, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

@hugueskamba
Copy link
Collaborator

The scripts have been frozen you may want to add @Patater and @rwalton-arm as reviewers.

Copy link
Contributor

@Patater Patater left a comment

Choose a reason for hiding this comment

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

We can make an exception for this change, as it won't affect the online IDE or compiler.

tools/targets/__init__.py Show resolved Hide resolved
@LDong-Arm
Copy link
Contributor Author

@hugueskamba @Patater Thanks for the review, we're waiting for #14354 to get in to rebase this PR

Fixes: ARMmbed#14153

The target CYTFM_064B0S2_4343W is signed using `cysecuretools` which
depends on `imgtool` managed by `pip`. However, Arm Musca targets
requires a modified/wrapped version of the image tool copied from
trusted-firmware-m + MCUboot.

To avoid conflicts in the version of `imgtool` used, we should only
add the copied version of `imgtool` to python's system path for
Musca targets instead of doing it globally for all targets.
@LDong-Arm LDong-Arm changed the base branch from feature-tf-m-1.2-integration to master March 3, 2021 11:14
@LDong-Arm
Copy link
Contributor Author

Rebased and retargeted to the master branch.

@adbridge
Copy link
Contributor

CI restarted

@mbed-ci
Copy link

mbed-ci commented Mar 10, 2021

Jenkins CI Test : ❌ FAILED

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM
jenkins-ci/mbed-os-ci_unittests
jenkins-ci/mbed-os-ci_cmake-example-ARM

@mergify mergify bot added needs: work and removed needs: CI labels Mar 10, 2021
@adbridge
Copy link
Contributor

@LDong-Arm looks like we may have some genuine failures

@mbed-ci
Copy link

mbed-ci commented Mar 10, 2021

Jenkins CI Test : ❌ FAILED

Build Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM
jenkins-ci/mbed-os-ci_cmake-example-ARM
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️

@LDong-Arm
Copy link
Contributor Author

LDong-Arm commented Mar 10, 2021

@adbridge It's still a CI issue. From the log:

CMake Error at mbed-os/CMakeLists.txt:8 (include):
  include could not find load file:

    /builds/workspace/mbed-os-ci_cmake-example-ARM/examples/mbed-os-example-blinky/cmake_build/mbed_config.cmake

This path to mbed_config.cmake is still the old one which has been changed a few weeks ago. I might be worth checking if the CI is fetching the correct version of all the examples - we should use the development branch. Also Mbed CLI 2 (the mbed-tools python package) should be the latest version.

@mbed-ci
Copy link

mbed-ci commented Mar 10, 2021

Jenkins CI Test : ✔️ SUCCESS

Build Number: 3 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-test ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️
jenkins-ci/mbed-os-ci_tfm-integration ✔️

@LDong-Arm
Copy link
Contributor Author

This is ready for merge, as we are making an exception for the Travis frozen tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

imgtool.py file in mbed-os interferes with imgtool python package installed in system
8 participants