-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[RFC] Mcuboot XIP Support for Zephyr #29974
Conversation
This comment has been minimized.
This comment has been minimized.
890eca4
to
03b7c61
Compare
@de-nordic, I don't think it is required to do this change, correct usage of chosen partition allows to generate the correct image. The chosen partition info also has the required data to be passed to imgtool and to dfu-util/nrfjprog/... Easier support for "downloading" using dfu-util could be achieved by adding the location where the binary should be placed in flash to the header info, in that case the dfu "server" could read in the header and decide where to place it or to reject it. This is much more flexible that selecting alt-0 or alt-1 (BTW, selecting alt-0 to "upload" from flash should be disallowed). When using a "hex"-loader this is maybe less required, but still usefull for the bootloader to distinguish between execute or move. |
Yes, but you are talking abut hi-end solution, I am still trying to build things for two slots. You may add that comment to the original issue reported here: #27673. But yes, it would be nice to add header that would identify the slot of binary and allow dfu client to reject it citing the problem, or even pack two binaries together (one for each slot) and allow dft to negotiate which one will go in. I will try with |
@de-nordic, maybe I am missing something, I was thinking you are trying to create a image to be executed from slot1. This could be done by setting the chosen partition to slot1 (or image1) nothing more. But then again, maybe you are trying to achieve something else. |
03b7c61
to
0dda7ab
Compare
45ad6ec
to
59e7873
Compare
Hi folks, I noted this improvement and have couple questions:
I mean, there are work on Zephyr to enable NS and SE images (non secure and secure images). These are two independent partitions + at least another one as temporary storage (scenario 1). So, how MCUboot + Zephyr will handle this ? I imagine XIP is essential for lots of platforms and there is a special case, i.MX-RT that only have external memory. Having two images on a single bin (scenario 2) is an alternative but can be impractical with LWPAN. My firsts tests with BLE IPSP (PC <-> nRF) needs around 30min to download and update 1 image with minimal resources to run the example without mesh and only 2 nodes.
Sorry if this is not the right place to add both questions but it seemed opportune to raise them. CC: @otavio |
59e7873
to
69e7312
Compare
The |
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.
Did you consider to keep working usb dfu class when it is part of mcuboot in single application-slot-mode?
subsys/usb/class/usb_dfu.c
Outdated
@@ -344,7 +353,7 @@ static void dfu_reset_counters(void) | |||
{ | |||
dfu_data.bytes_sent = 0U; | |||
dfu_data.block_nr = 0U; | |||
if (flash_img_init(&dfu_data.ctx)) { | |||
if (flash_img_init_id(&dfu_data.ctx, UPDATEABLE_FLASH_IMG_ID)) { |
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 this is not applied in dfu_data declaration
?
9646814
to
f73ba93
Compare
f73ba93
to
fcbf4ab
Compare
5426cad
to
f2d788a
Compare
The script is intended to be run on already, successfully, compleated build to generate build for alternative slot. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
f2d788a
to
ed09c90
Compare
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
@de-nordic please take a look here: #40555 I believe the approach in that RFC will be very suitable for this kind of work you need to do here. |
Thanks, I will take a look. |
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
Provided script will automatically build alternative slot application.
Invocation:
python3 zephyr/scripts/direct_xip.py <original_build>
TODO: