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

Incremental update support #23

Open
sjanc opened this issue Mar 11, 2019 · 8 comments
Open

Incremental update support #23

sjanc opened this issue Mar 11, 2019 · 8 comments

Comments

@sjanc
Copy link
Contributor

sjanc commented Mar 11, 2019

This should allow to reduce size of uploaded new image to delta image. Tool for generating delta images should be also provided.

@utzig
Copy link
Member

utzig commented Mar 11, 2019

delta against what?

@sjanc
Copy link
Contributor Author

sjanc commented Mar 12, 2019

against running firmware

@utzig
Copy link
Member

utzig commented Mar 12, 2019

sorry to ask, not sure you have implementation already or this is just an idea, but is it supposed to do delta sector by sector or the whole firmware? does the linker already stack symbols in a fixed order?

@sjanc
Copy link
Contributor Author

sjanc commented Mar 13, 2019

I plan to use modified ('stream' friendly) version of bsdiff algorithm [1], which is kinda optimized for elfs. That way while delta is being uploaded (I've already have working stream version of bspatch library), new image in slot1 is reconstructed from delta and image in slot 0.

[1] https://github.com/mendsley/bsdiff

@utzig
Copy link
Member

utzig commented Mar 13, 2019

Nice, I was thinking about how hard would it be to store slot1 in bsdiff form and still enable MCUBoot to updated it; If it is a sector by sector binary diff it might be feasible to swap with a normal image!

@sjanc
Copy link
Contributor Author

sjanc commented Mar 13, 2019

sector by sector binary diff is not useful since adding even 1 byte to binary will result in rest of the image to have all sectors changed (shifted), and this is where bsdiff shines

@sterlinghughes
Copy link

It would be good to refactor mcumgr to allow for streaming firmware updates over BLE as well in this patch. I don't think we'd do patched upgrades for awhile, but it will speed up downloads for everyone if we can avoid having to ACK every chunk. Also, plan to update Android/iOS libraries?

@sjanc
Copy link
Contributor Author

sjanc commented Mar 14, 2019

yeap, I plan to work on streaming too (probably as a separate issue/PR)

As for Android support, maybe, for iOS probably not :)

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

No branches or pull requests

3 participants