-
Notifications
You must be signed in to change notification settings - Fork 63
mcuboot: Commit v1.7.0-rc1 #19
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
Conversation
8993857 to
211e9e7
Compare
|
This now has a PR upstream again: https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/7023 |
211e9e7 to
9ac6264
Compare
|
FYI @agansari |
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.
Looks pretty straight forward to me.
|
@oyvindronningstad would we need to manually upmerge the mcuboot in order to move forward from v1.7.0-RC1? |
|
@galak @microbuilder could you please add feedback? |
Yes |
|
This should stay in sync with the upstream TF-M repo in my opinion, but it looks like you're already working towards that: https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/7023 Edit: I +1'ed the upstream change request. |
Note that this PR is now different from the ustream one. This one does not change the trusted-firmware-m directory precisely because we might not get the upstream change in for 1.2. |
CMakeLists.txt
Outdated
| ${TFM_REGRESSION_ARG} | ||
| ${TFM_PROFILE_ARG} | ||
| -DTFM_TEST_REPO_PATH=${ZEPHYR_TFM_MODULE_DIR}/tf-m-tests | ||
| -DMCUBOOT_PATH=${ZEPHYR_TFM_MODULE_DIR}/mcuboot |
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.
Why is it not possible to use:
| -DMCUBOOT_PATH=${ZEPHYR_TFM_MODULE_DIR}/mcuboot | |
| -DMCUBOOT_PATH=${ZEPHYR_MCUBOOT_MODULE_DIR} |
and thus use the same mcuboot as Zephyr ?
And then completely remove mcuboot from this repository.
Are they not compatible ?
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.
They are, and when I tried it it works, they just aren't identical I think. So I think to keep TFM exactly as released, we don't want to do that yet. Though I'm not entirely convinced myself why we can't.
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.
I understand that reason, but in that case, why not use west ?
That would remove the need to upmerge mcuboot in two places:
Just add this to west.yml: https://github.com/zephyrproject-rtos/zephyr/blob/master/west.yml
- name: tfm_mcuboot
repo-path: mcuboot
path: modules/tee/tfm/mcuboot
revision: 69344636bee1f18a6703dc5a8e7a0edfd8128d45
# revision: 1.7.0-rc1
Note, the 69344636bee1f18a6703dc5a8e7a0edfd8128d45 SHA is part of this PR: zephyrproject-rtos/mcuboot#39
zephyrproject-rtos/mcuboot@6934463
But if you ask @nvlsianpu, then maybe he can include the mcuboot tags in the upmerge, and you will be able to use 1.7.0-rc1 instead of the SHA.
That way we remove the need to upmerge mcuboot inside this repo, but still use a different version for TFM, than what Zephyr is using.
And there is only one place to keep mcuboot in sync with upstream.
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.
But if you ask @nvlsianpu, then maybe he can include the mcuboot tags in the upmerge, and you will be able to use 1.7.0-rc1 instead of the SHA
I can send 1.7.0-rc1 tag to zephyr's mcuboot fork If needed.
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.
Changed to use west now. See if you like it better
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.
Changed to use west now. See if you like it better
You need a commit with:
git rm -r mcuboot
for this to work.
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.
@microbuilder that would be the optimal, and if this guide is followed:
Just verified, zephyrproject-rtos/mcuboot#39, does have all the upstream SHAs.
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.
Should I change the west entry to a sha, or should we bring in the tag?
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.
You need a commit with:
git rm -r mcubootfor this to work.
Done
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.
But if you ask @nvlsianpu, then maybe he can include the mcuboot tags in the upmerge, and you will be able to use 1.7.0-rc1 instead of the SHA
I can send 1.7.0-rc1 tag to zephyr's mcuboot fork If needed.
@nvlsianpu that would be highly appreciated 😄
056fe85 to
f4da9e7
Compare
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.
Much nicer.
Thanks @microbuilder, but now this change is entirely outside of the upstream repo. Can you take another look with this in mind? |
|
@microbuilder @galak Please review |
|
@d3zd3z Care to give your feedback on this as well? |
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.
I don't think it makes sense to assume that the mcuboot from zephyr west will be in sync with TFM.
I sort of dislike the assumption here as well, and the additional maintenance burden to keep Zephyr's MCUBoot requirements in sync with TF-M's. |
@galak @microbuilder This solution was agreed on a while ago in this thread: #19 (comment) It seems there's no optimal way to do this, so I suggest that we merge this. We can always redo it later. I really want to stop wasting a whole minute every time I build TFM. |
I suggest looking for other solutions to the issue. I don't agree with this approach of coupling the mcuboot. @d3zd3z do you mind commenting as well. |
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.
I'm a bit uncomfortable having TFM use the mcuboot out of the Zephyr repository rather than the upstream. The fork that is in Zephyr has the purpose of holding onto Zephyr-specific support before it can be upstreamed. There is no testing for whether that repo works in any non-zephyr configuration, including TF-M. In fact, it is likely to lag behind the upstream, where TF-M-specific fixes will end up.
Upstream TF-M will be removing the mcuboot code from the repo, and referencing upstream. I think we should mirror that. If we have timing issues with builds, maybe that can be addressed another way. Pointing at the wrong repo is not the right answer, though.
Mcuboot is being downloaded, with all its submodules. This is approx 200MB, taking around 1 min on my connection. |
Glad we cleared it up 👍 |
If I understand tfm's cmake is downloading mcuboot in the case you are describing for every new build you do. Is that correct? We just need a solution to point to a "pre-cloned" version of mcuboot, so that every tfm build doesn't checkout a new version of mcuboot. We could do this by just updating the files in |
Exactly, and that was my 1st rewrite. It was rejected in #19 (comment). I suggest we merge this. The MCUboot situation is not figured out yet, so we will have plenty of opportunity to change things later. |
|
@oyvindronningstad can we tweak this to introduce a so |
|
Also, I think if we are going down this path, we should do it for mbed-crypto as well. I can setup the zephyrproject mirror if you are in agreement. |
That sounds like a good plan. I'll add it.
Sounds good as well. Note (in case you are not aware) that even though they call it mbedcrypto they are using mbedtls. Also: they modify the repo with a number of patches. These modifications should be committed to the repo mirror. Thanks! |
|
Also, I pushed the 'v1.7.0', |
I was not aware. Looking at the tfm buildsystem, I think we need to tweak things so that tfm does the patch'ing. We can deal with mbedtls/mbed-crypto after we get mcuboot working. |
a6dfc53 to
14850a7
Compare
It will be added to Zephyr's west.yml Signed-off-by: Øyvind Rønningstad <[email protected]>
14850a7 to
fe10881
Compare
|
@galak could you please take a final look? |
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.
In general looks good:
Just the 2 questions:
- the .gitignore with /mcuboot seems weird, and maybe wrong or not needed
- can we tweak the path of where mcuboot gets put by west.
fe10881 to
a2ff742
Compare
| commit: 3d986e72d9e084bb45763849699718f474fb10ba | ||
| license: Apache 2.0 | ||
|
|
||
| See also west.yml for more dependencies. |
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.
I wonder if you could add a more detailed comment here, to explain what happens with MCUboot, but it is not a must-do for this PR.
Pointing to Zephyr's mcuboot fork. Signed-off-by: Øyvind Rønningstad <[email protected]>
This improves build times by skipping the download. Signed-off-by: Øyvind Rønningstad <[email protected]>
Remove mcuboot from init-git.sh and README.rst. Signed-off-by: Øyvind Rønningstad <[email protected]>
a2ff742 to
a247c0e
Compare
|
Guess we need a zephyr side PR now. |
Retrieve mcuboot via west. See zephyrproject-rtos/zephyr#30050.
This PR removes the existing committed mcuboot which is outdated.
Commit MCUboot to avoid long download times on each build.CMP0097 doesn't work on 3.16 and 3.17.https://gitlab.kitware.com/cmake/cmake/-/issues/20579
Add a workaround (request non-existant submodule).This prevents fetching almost 200 MB of data, improving
pristine build times.
This change was added upstream, but reverted because of unspecified build problems.Add it here unless it gives problems, since it improves build times 40 seconds.