Skip to content

Conversation

bugadani
Copy link
Contributor

Resolves #111

Hoping this is sufficient and correct. This PR changes valid partition table criteria to accept the partition table if any partition exists with the "app" type. I'm not sure if app with subtype test should be rejected here.

@bugadani
Copy link
Contributor Author

bugadani commented Dec 21, 2021

Opened as draft because I haven't tried the built executable yet. Edit: seems to work. This PR also adds .vscode to the gitignore file for my convenience. Let me know if I should remove that.

@bugadani bugadani marked this pull request as ready for review December 21, 2021 17:29
@icewind1991
Copy link
Member

instead of accepting partition tables without factory it might make more sense to add a "target partition" option to determine which app partition to flash to

@bugadani
Copy link
Contributor Author

bugadani commented Dec 21, 2021

That might be an improvement, but I'd like to keep a "just pick one for me" option. esp-idf seems to do this, although it can lead to some weirdness: the active ota firmware might be on the second partition, and then flashing the first partition would be silently ineffective.

There is certainly room for improvement here, I've only implemented what I needed right now.

Also note that, as stated in the issue, in my use case there is no factory partition, so I need espflash to accept such partition tables.

Copy link
Member

@jessebraham jessebraham left a comment

Choose a reason for hiding this comment

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

Thanks for this, I think it is sufficient. We can expand on it in the future if necessary. I was mistaken initially in thinking that the factory partition was required, so this is closer in line with the documentation.

If you could please resolve the one conflict then we can get this merged.

@icewind1991 icewind1991 merged commit 92a266d into esp-rs:master Dec 23, 2021
@bugadani bugadani deleted the ota branch December 23, 2021 10:52
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.

Cannot flash OTA partition

3 participants