-
Notifications
You must be signed in to change notification settings - Fork 76
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
Support for software update to Direct-XIP built applications #115
base: master
Are you sure you want to change the base?
Conversation
@mlaz , @nvlsianpu , @utzig Can you take a look? |
|
||
#define DT_CODE_PARTITION_NODE DT_CHOSEN(zephyr_code_partition) |
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 whether this can be included as a zephyr-rtos header?
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 mean that it should be in separate header taken directly from Zrephyr code base?
I was also thinking about that and that is one of reasons behind zephyrproject-rtos/zephyr#32257
@@ -400,6 +400,7 @@ int img_mgmt_impl_erase_if_needed(uint32_t off, uint32_t len) | |||
int | |||
img_mgmt_impl_swap_type(void) | |||
{ | |||
#if !defined(CONFIG_IMG_MGMT_DIRECT_XIP) |
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.
It is possible to distinguish test-run while app is polling the swap type 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.
Does the direct-xip support test runs?
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.
Not sure if I understand reasoning behind this patch.
If in direct-xip mode one can upload image to pending slot than why bother with pending flag at all in this mode?
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.
@sjanc In this mode application will run from the slot it has been uploaded to. The problem is that you could still set the "opposite" slot in pending mode which means it would not be possible to overwrite and the flag would never be lifted as in XIP mode it will not switch slots, example:
0) let have app_v0.0.0 and app_v0.0.1
- the app_v0.0.0 is running
- set the "opposite" slot to pending
- try to upload app_v0.0.1, will fail
- reboot
- the app_v0.0.0 is running, the "opposite" slot is in pending state, it is not possible to overwrite it at this point anymore.
- reboot and you are at 5 again.
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.
yes, this is what I mean. Isn't the whole point of pending flag is to prevent it?
it == uploading new image before current proces of testing 'previous new image' is done?
The changes IMG_MGMT_BOOT_CURR_SLOT defintion from being hard-coded to 0 to automatically assigned value corresponding to slot occupied by DTS chosen zephyr,code-partition. Signed-off-by: Dominik Ermel <[email protected]>
The commit removes restriction from uploading to slot marked as pending (confirmed or for test) when mcumgr has been compiled into application that has been configured with CONFIG_IMG_MGMT_DIRECT_XIP, which means that it will be accepting Direct-XIP only updates. Signed-off-by: Dominik Ermel <[email protected]>
e0c6f52
to
a2f7c7a
Compare
This is test update of west.yml that tests: apache/mynewt-mcumgr#115 that introduce: 1) compile time selection of slot from which application is running to mcumgr; 2) removal of restrictions on uploading images to slots marked as pending, for Direct-XIP enabled applications. Signed-off-by: Dominik Ermel <[email protected]>
Depends on #114
The PR contains two PRs that