-
Notifications
You must be signed in to change notification settings - Fork 3k
Cypress: Add target CY8CKIT_064B0S2_4343W, update psoc6pdl, psoc6cm0p #13122
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
Cypress: Add target CY8CKIT_064B0S2_4343W, update psoc6pdl, psoc6cm0p #13122
Conversation
@romanjoe, thank you for your changes. |
This PR cannot be merged due to conflicts. Please rebase to resolve them. |
d83faec
to
2da3898
Compare
@romanjoe @sreeharshaangara - Can you provide information on how to build? Do you need to add your own policy file in a specific location now? I get the following error related to missing policy file.
|
Hi Mac, Yes you need to have our updated security tools package - cysecuretools. I will try to provide it to you ASAP, as it is not released on PIP yet (will be in couple days). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For what it is worth, I approve this PR, as we would like to get this target into Mbed OS 6.1. We will perform Mbed Enabled validation after that.
@romanjoe Can you resolve conflicts please? If this is targeting the next release, we shall have it all ready by end of today. I'll review now |
This is what I was going to ask, I haven't noticed these in separate PRs. It should be simplify the review in this one. |
@romanjoe There are still conflicts |
@sreeharshaangara @jamesbeyond yes, i see this exactly like that. Only need to provide ARM with latest cysecuretools, as soon as i know we have a plan to push it to PIP next week. But i believe we can provide internal version for now if it makes sense. |
@jamesbeyond let us know which option you prefer. We can send an early drop of tooling(before it is officially available on pypi next week). The other option is that we can just send you a folder structure with dummy keys you can place; although this maybe painful in the longer run as we update tools/policies etc. |
@romanjoe Can you email us the internal version that we could add to CI and test it on this PR? This PR should be green in asap |
CI restarted |
Test run: FAILEDSummary: 2 of 3 test jobs failed Failed test jobs:
|
The latest failures: |
Hi @romanjoe @sreeharshaangara, I am not sure, are we able to wait this PR until next week? @0xc0170 ? |
Hi @romanjoe @sreeharshaangara, In CI, for building CYESKIT_064B0S2_4343W, we are doing the following:
We were wondering if we could use same approach for CY8CKIT_064B0S2_4343W such that there is minimal change needed for CI. -Saheer |
I tried the cysecure tools drop sent to @jamesbeyond and it works in my dev enviornment for CY8CKIT_064B0S2_4343W target. The current mbed-os CI is basically very close to the second approach you mentioned (copy static files needed at the time of build). The difference is, all the files except “sensitive/pem files” are already present in the mbed-os repository: https://github.com/ARMmbed/mbed-os/tree/master/targets/TARGET_Cypress/TARGET_PSOC6/sb-tools Only “pem” files are copied to targets/TARGET_Cypress/TARGET_PSOC6/sb-tools/keys/USERAPP_CM4_KEY_PRIV.pem at the time of build. I was wondering if (most of ) the files in secure_assets.zip can be directly committed to the repository under https://github.com/ARMmbed/mbed-os/tree/master/targets/TARGET_Cypress/TARGET_PSOC6/sb-tools as today? The advantage with this approach is, if you have any new files or change in file format needed to build, you can update the source repo and hence avoiding mbed-os CI environmental updates. |
Let me explain a bit about our new tooling and how i see your CI support with it. Cysecuretools rely on secure policy files as a main source of configuration of secure boot target. Policy files are supplies as defaults for psoc64 families. So by default after installation all files are located in installation folder of cysecuretools. For example /usr/local/lib/python3.7/site-packages/cysecuretools/targets/cyb06xxa/policy for 2M family which CY8CKIT_064B0S2_4343W belongs to. Policy files (policy_single_CM0_CM4.json for example) contain paths to keys as relatives to policy files locations. Considering all these the best approach for CI is:
sb-tools folder is deleted in this PR as deprecated tooling. Only cysecuretools will be supported from now and all Secure Boot targets will rely on it. We will update cysecuretools in future, add new features, etc. So it is best to have it integrated in CI right now to simplify following secure boot targets support in mbed-os. Have secure boot related files committed to repo is not preferable, because default policies may be updated in future, certificates may change, etc. |
@romanjoe thanks Will need to check this. Couple of questions, if we are going with this approach: Where would you specify the dependency on cysecuretools? In requirements.txt? which is not commonplace for all the boards. When is the new cysecuretools for these changes getting released in pypi? |
@saheerb Release of cysecuretools is dependent from PyOCD update. Our other team works on this. Regarding where to place requirement on cysecuretools - i need to sync with our application engineers with plans on this. @sreeharshaangara @ifyall - maybe you can comment here. |
@romanjoe how can we get this in CI and green today? This is the last PR for 6.1 release. |
We agreed to unblock this PR, let's drop in the files required for CI in targets folder as mentioned previously. Please add required files in this PR and we will start CI asap. |
@0xc0170 okay - i can upload security related files to target folder (policies, keys) to enable successful CI run, but CI PC still need to have cysecuretools package installed to enable signing - @sreeharshaangara sent it to you as zip archive. Is it possible for now? Then i will need to delete all that security related files, as they should not go public in mbed-os, and rely on proper CI update. |
wait a minute, I'll send you an email, to clarify few things |
Test run: FAILEDSummary: 2 of 3 test jobs failed Failed test jobs:
|
Test run: FAILEDSummary: 2 of 3 test jobs failed Failed test jobs:
|
Test run: FAILEDSummary: 2 of 3 test jobs failed Failed test jobs:
|
Test run: SUCCESSSummary: 6 of 6 test jobs passed |
Summary of changes
This is final PR to add Cypress new secure boot target CY8CKIT_064B0S2_4343W to mbed-os.
This PR also includes update of psoc6pdl and psoc6cm0p libraries for Cypress targets.
Impact of changes
All existing Cypress targets BSP will switched to new versions assets in next PRs.
Migration actions required
Configuration of mbed-os CI need to be updated per new post build hooks.
New release of mbed-os 6.0 will no longer support targets above, updated PSOC64 targets instead will be added to support new tools.
Documentation
Pull request type
Test results
Logs attached.
ww25.4-mbed-os-6.0-b0s2-pdl4266-cm0237-ARM-TEST_RESULTS.txt
ww25.4-mbed-os-6.0-b0s2-pdl4266-cm0237-IAR_COMPILATION_LOG.txt.txt
ww25.4-mbed-os-6.0-b0s2-pdl4266-cm0237-IAR_TEST_RESULTS.txt
ww25.4-mbed-os-6.0-b0s2-pdl4266-cm0237-gcc.txt
ww25.4-mbed-os-6.0-b0s2-pdl4266-cm0237-NETSOCKET_DNS.txt
ww25.4-mbed-os-6.0-b0s2-pdl4266-cm0237-NETSOCKET_L3IP.txt
ww25.4-mbed-os-6.0-b0s2-pdl4266-cm0237-NETSOCKET_TCP.txt
ww25.4-mbed-os-6.0-b0s2-pdl4266-cm0237-NETSOCKET_TLS.txt
ww25.4-mbed-os-6.0-b0s2-pdl4266-cm0237-NETSOCKET_UDP.txt
ww25.4-mbed-os-6.0-b0s2-pdl4266-cm0237-NETWORK_INTERFACE.txt
ww25.4-mbed-os-6.0-b0s2-pdl4266-cm0237-WIFI_TEST_RESULTS.txt
ww25.4-mbed-os-6.0-b0s2-pdl4266-cm0237-ARM-COMPILATION_LOG.txt.txt
Reviewers