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

PartitionStream requires blockErase, other OTA-related improvements #2729

Merged
merged 10 commits into from
Mar 14, 2024

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Mar 11, 2024

Leaving blockErase parameter at false when constructing a PartitionStream will result in corruption unless partition has already been erased. This is not always immediately apparent so can be difficult to diagnose.

  • Breaking change Replacing blockErase with an enumerated mode parameter enforces read-only behaviour by default (new feature and a good thing), with write access more explicitly defined. It's a simple change to existing code and will ensure it gets manually checked to ensure correct behaviour.

  • Update the Basic_Ota sample to check that an OTA update is not being attempted on the active running partition. This can happen with esp8266, for example, when running in temporary boot mode. (NB. Other checks may include active filing system partitions but that is application-specific.)

  • Update notes on migrating from Sming 4.2 to include updating boot sector. (Learning points froim existing Sming 4.2 based app - OTA to 5.1 #2727.)

  • Remove redundant flashsize calculation from rboot and update version string to Sming v1.5 (from v1.4.2). Note this should have been done in Add rBoot partition support #2258.

  • Fix rboot README regarding use of slot 2, should correspond with subtype ota_2 not ota_1.

@SmingHub SmingHub deleted a comment from what-the-diff bot Mar 11, 2024
@mikee47 mikee47 force-pushed the fix/ota-partition-stream branch from 2c5beb3 to c9412aa Compare March 11, 2024 12:27
@slaff slaff added this to the 5.2.0 milestone Mar 11, 2024
@mikee47 mikee47 force-pushed the fix/ota-partition-stream branch 5 times, most recently from 55ee945 to 73eabea Compare March 13, 2024 19:48
@mikee47 mikee47 changed the title [WIP] Fix Basic_Ota sample, PartitionStream requires blockErase [WIP] PartitionStream requires blockErase, other OTA-related improvements Mar 13, 2024
mikee47 added 5 commits March 13, 2024 20:47
Layout changed with the introduction of partition tables in PR SmingHub#2258,
but reverted back to standard default layout in SmingHub#2332.
Remove redundant `flashsize` calculation (uses partition table)
Update version string
@mikee47 mikee47 force-pushed the fix/ota-partition-stream branch from 73eabea to 2e50adc Compare March 13, 2024 20:49
@mikee47 mikee47 changed the title [WIP] PartitionStream requires blockErase, other OTA-related improvements PartitionStream requires blockErase, other OTA-related improvements Mar 13, 2024
@slaff
Copy link
Contributor

slaff commented Mar 14, 2024

@mikee47 Can you add the braking change to an upgrade document: https://sming.readthedocs.io/en/latest/upgrading/index.html ?

@slaff slaff merged commit ffb1b3a into SmingHub:develop Mar 14, 2024
46 checks passed
@mikee47 mikee47 deleted the fix/ota-partition-stream branch March 14, 2024 16:45
@slaff slaff mentioned this pull request May 8, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants