Skip to content
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

susbys/dfu/img_util: support ERASE PROGRESSIVELY for non-flash mem #79152

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

nvlsianpu
Copy link
Collaborator

Added support for devices don't require explicit pager erase. For these device flattening of mcuboot image status is relevant.

@zephyrbot zephyrbot added the area: DFU Device Firmware Upgrade label Sep 28, 2024
nvlsianpu added a commit to nvlsianpu/fw-nrfconnect-zephyr that referenced this pull request Sep 28, 2024
…on-flash mem

Added support for devices don't require explicit pager erase.
For these device flattening of mcuboot image status is relevant.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
de-nordic
de-nordic previously approved these changes Sep 28, 2024
@de-nordic de-nordic added this to the v4.0.0 milestone Sep 28, 2024
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 28, 2024
…on-flash mem

Added support for devices don't require explicit pager erase.
For these device flattening of mcuboot image status is relevant.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 30, 2024
…on-flash mem

Added support for devices don't require explicit pager erase.
For these device flattening of mcuboot image status is relevant.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 30, 2024
…on-flash mem

Added support for devices don't require explicit pager erase.
For these device flattening of mcuboot image status is relevant.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 1, 2024
…on-flash mem

Added support for devices don't require explicit pager erase.
For these device flattening of mcuboot image status is relevant.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 1, 2024
…on-flash mem

Added support for devices don't require explicit pager erase.
For these device flattening of mcuboot image status is relevant.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 1, 2024
…on-flash mem

Added support for devices don't require explicit pager erase.
For these device flattening of mcuboot image status is relevant.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 1, 2024
…on-flash mem

Added support for devices don't require explicit pager erase.
For these device flattening of mcuboot image status is relevant.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 4, 2024
…on-flash mem

Added support for devices don't require explicit pager erase.
For these device flattening of mcuboot image status is relevant.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 4, 2024
…on-flash mem

Added support for devices don't require explicit pager erase.
For these device flattening of mcuboot image status is relevant.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 4, 2024
…on-flash mem

Added support for devices don't require explicit pager erase.
For these device flattening of mcuboot image status is relevant.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 4, 2024
…on-flash mem

Added support for devices don't require explicit pager erase.
For these device flattening of mcuboot image status is relevant.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 4, 2024
…on-flash mem

Added support for devices don't require explicit pager erase.
For these device flattening of mcuboot image status is relevant.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 4, 2024
…on-flash mem

Added support for devices don't require explicit pager erase.
For these device flattening of mcuboot image status is relevant.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
@de-nordic de-nordic added the DNM This PR should not be merged (Do Not Merge) label Oct 4, 2024
rado17 pushed a commit to rado17/sdk-zephyr that referenced this pull request Oct 7, 2024
…on-flash mem

Added support for devices don't require explicit pager erase.
For these device flattening of mcuboot image status is relevant.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
nvlsianpu added a commit to nvlsianpu/fw-nrfconnect-zephyr that referenced this pull request Oct 7, 2024
…mentation

Moved MCUboot trailer's status erase ahead any write operation.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
@nvlsianpu nvlsianpu force-pushed the u_flash_img_flatten branch from f21eb74 to 8314f7f Compare October 7, 2024 20:29
*/
offset = (toff + fparams->write_block_size - 1) &
~(fparams->write_block_size - 1);
/* No alignment correction neede here, offset is corrected already */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'and size should be aligned'

@de-nordic
Copy link
Collaborator

Please squash both commits together.

@nvlsianpu nvlsianpu force-pushed the u_flash_img_flatten branch from 8314f7f to cb4cd12 Compare October 8, 2024 17:10
nvlsianpu added a commit to nvlsianpu/fw-nrfconnect-zephyr that referenced this pull request Oct 8, 2024
…mentation

Moved MCUboot trailer's status erase ahead any write operation,
which is step which helps with addition of support for devices
don't require explicit pager erase.
For these kind of devices flattening of mcuboot image status in
the trailer was introduced.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
@nvlsianpu nvlsianpu force-pushed the u_flash_img_flatten branch from cb4cd12 to 1c63254 Compare October 8, 2024 17:44
nvlsianpu added a commit to nvlsianpu/fw-nrfconnect-zephyr that referenced this pull request Oct 8, 2024
…mentation

Moved MCUboot trailer's status erase ahead any write operation,
which is step which helps with addition of support for devices
don't require explicit pager erase.
For these kind of devices flattening of mcuboot image status in
the trailer was introduced.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
nvlsianpu added a commit to nvlsianpu/fw-nrfconnect-zephyr that referenced this pull request Oct 8, 2024
…mentation

Moved MCUboot trailer's status erase ahead any write operation,
which is step which helps with addition of support for devices
don't require explicit pager erase.
For these kind of devices flattening of mcuboot image status in
the trailer was introduced.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
de-nordic
de-nordic previously approved these changes Oct 9, 2024
} else
#endif
{

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stray newline

*/
offset = (toff + fparams->write_block_size - 1) &
~(fparams->write_block_size - 1);
/* No alignment correction neede here, offset is corrected already
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/* No alignment correction neede here, offset is corrected already
/* No alignment correction needed here, offset is corrected already

int flash_img_buffered_write(struct flash_img_context *ctx, const uint8_t *data,
size_t len, bool flush)
{
int rc;

rc = stream_flash_buffered_write(&ctx->stream, data, len, flush);
if (!flush) {
/* If there is need to erase trailer, that should happen before any
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/* If there is need to erase trailer, that should happen before any
/* If there is a need to erase the trailer, that should happen before any

nvlsianpu added a commit to nvlsianpu/fw-nrfconnect-zephyr that referenced this pull request Oct 10, 2024
…mentation

Moved MCUboot trailer's status erase ahead any write operation,
which is step which helps with addition of support for devices
don't require explicit pager erase.
For these kind of devices flattening of mcuboot image status in
the trailer was introduced.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
nvlsianpu added a commit to nvlsianpu/fw-nrfconnect-zephyr that referenced this pull request Oct 11, 2024
…mentation

Moved MCUboot trailer's status erase ahead any write operation,
which is step which helps with addition of support for devices
don't require explicit pager erase.
For these kind of devices flattening of mcuboot image status in
the trailer was introduced.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
nvlsianpu added a commit to nvlsianpu/fw-nrfconnect-zephyr that referenced this pull request Oct 14, 2024
…mentation

Moved MCUboot trailer's status erase ahead any write operation,
which is step which helps with addition of support for devices
don't require explicit pager erase.
For these kind of devices flattening of mcuboot image status in
the trailer was introduced.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
@nvlsianpu nvlsianpu force-pushed the u_flash_img_flatten branch from 1c63254 to 95198b1 Compare October 17, 2024 07:40
nvlsianpu added a commit to nvlsianpu/fw-nrfconnect-zephyr that referenced this pull request Oct 17, 2024
…mentation

Moved MCUboot trailer's status erase ahead any write operation,
which is step which helps with addition of support for devices
don't require explicit pager erase.
For these kind of devices flattening of mcuboot image status in
the trailer was introduced.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
nvlsianpu added a commit to nvlsianpu/fw-nrfconnect-zephyr that referenced this pull request Oct 17, 2024
…mentation

Moved MCUboot trailer's status erase ahead any write operation,
which is step which helps with addition of support for devices
don't require explicit pager erase.
For these kind of devices flattening of mcuboot image status in
the trailer was introduced.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
Moved MCUboot trailer's status erase ahead any write operation,
which is step which helps with addition of support for devices
don't require explicit pager erase.
For these kind of devices flattening of mcuboot image status in
the trailer was introduced.

Signed-off-by: Andrzej Puzdrowski <[email protected]>
@nvlsianpu nvlsianpu force-pushed the u_flash_img_flatten branch from 95198b1 to 32eab50 Compare October 17, 2024 08:12
@nvlsianpu nvlsianpu removed the DNM This PR should not be merged (Do Not Merge) label Oct 17, 2024
nvlsianpu added a commit to nvlsianpu/fw-nrfconnect-zephyr that referenced this pull request Oct 17, 2024
…mentation

Moved MCUboot trailer's status erase ahead any write operation,
which is step which helps with addition of support for devices
don't require explicit pager erase.
For these kind of devices flattening of mcuboot image status in
the trailer was introduced.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
nvlsianpu added a commit to nvlsianpu/fw-nrfconnect-zephyr that referenced this pull request Oct 17, 2024
…mentation

Moved MCUboot trailer's status erase ahead any write operation,
which is step which helps with addition of support for devices
don't require explicit pager erase.
For these kind of devices flattening of mcuboot image status in
the trailer was introduced.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
nvlsianpu added a commit to nvlsianpu/fw-nrfconnect-zephyr that referenced this pull request Oct 17, 2024
…mentation

Moved MCUboot trailer's status erase ahead any write operation,
which is step which helps with addition of support for devices
don't require explicit pager erase.
For these kind of devices flattening of mcuboot image status in
the trailer was introduced.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
@nordicjm nordicjm requested a review from de-nordic October 18, 2024 07:43
@nashif nashif merged commit 17c15e3 into zephyrproject-rtos:main Oct 18, 2024
23 of 24 checks passed
nvlsianpu added a commit to nvlsianpu/fw-nrfconnect-zephyr that referenced this pull request Oct 19, 2024
…mentation

Moved MCUboot trailer's status erase ahead any write operation,
which is step which helps with addition of support for devices
don't require explicit pager erase.
For these kind of devices flattening of mcuboot image status in
the trailer was introduced.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
rlubos pushed a commit to rlubos/sdk-zephyr that referenced this pull request Oct 22, 2024
…on-flash mem

Added support for devices don't require explicit pager erase.
For these device flattening of mcuboot image status is relevant.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
(cherry picked from commit 30f066a)
rlubos pushed a commit to rlubos/sdk-zephyr that referenced this pull request Oct 22, 2024
…on-flash mem

Added support for devices don't require explicit pager erase.
For these device flattening of mcuboot image status is relevant.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
(cherry picked from commit 30f066a)
rlubos pushed a commit to rlubos/sdk-zephyr that referenced this pull request Oct 22, 2024
…on-flash mem

Added support for devices don't require explicit pager erase.
For these device flattening of mcuboot image status is relevant.

Upstream PR: zephyrproject-rtos/zephyr#79152

Signed-off-by: Andrzej Puzdrowski <[email protected]>
(cherry picked from commit 30f066a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: DFU Device Firmware Upgrade
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants