-
Notifications
You must be signed in to change notification settings - Fork 678
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
WIP: RFC: Preliminary work on flash_area open once. #1569
base: main
Are you sure you want to change the base?
Conversation
The function has not been in use and some ports have not been implementing it anyway. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Variant of flash_area_get_sectors that takes flash_area object pointer instead of flash area identifier. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Variant of flash_area_get_sectors that takes flash_area object pointer instead of flash area identifier. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Variant of flash_area_get_sectors that takes flash_area object pointer instead of flash area identifier. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Variant of flash_area_get_sectors that takes flash_area object pointer instead of flash area identifier. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Variant of flash_area_get_sectors that takes flash_area object pointer instead of flash area identifier. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Variant of flash_area_get_sectors that takes flash_area object pointer instead of flash area identifier. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The code has been modified to have single place where flash_area area opened, at the beginning of execution. Currently only Zephyr compiles properly and works. close is missing. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
b102149
to
9dfeac3
Compare
* of sectors filled in. | ||
* @param ret array of sectors. | ||
* | ||
* Returns 0 on success, -ERANGE when there is not enough space in |
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.
ERANGE looks wrong
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.
ERANGE seems appropriate here.
off_t fa_off = fa->fa_off; | ||
off_t offset = 0; | ||
size_t fa_size = fa->fa_size; |
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.
fa_off and fa_size only seem to be used for reading, can't the fa structure be used directly instead?
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 it can.
fap = flash_area_from_multi_image_slot(BOOT_CURR_IMG(state), slot); | ||
|
||
off = BOOT_TLV_OFF(boot_img_hdr(state, slot)); | ||
|
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.
Would need to check if there is any way that this function (from any call) could be passed a different value, e.g. by fault injection, because if so then the bootloader operation becomes undefined
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. |
Work in progress, although Zephyr seems to already work and flash usage has been reduced.