-
Notifications
You must be signed in to change notification settings - Fork 190
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
Add per-slot option for casync seed device #1420
base: master
Are you sure you want to change the base?
Conversation
As mentioned in rauc#1200, using casync in blob mode with UBI volumes is kind of pointless at the moment, because casync cannot be effective without a seed. The solution proposed in the comment in casync_extract_image sounds good and would make this use case effortless from a user perspective, but it would require some development effort to implement said logic. This solution instead leaves the mapping logic to the user, which is likely pretty simple or even nothing at all (e.g. in the case of a squashfs root filesystem, which by necessity already has a ubiblock). A typical configuration would look like this: [slot.rootfs.0] device=/dev/ubi0_0 casync-seed-device=/dev/ubiblock0_0 type=ubivol Of course it is still possible for someone to implement the ubiblock mapping logic in RAUC in the future if they see a need for it. But with this change at least the use case is viable with minimal integration work. Signed-off-by: Tim van der Staaij <[email protected]>
As far as I can see, the Expanding a bit on #1200 (comment): due to the complexity of casync (and the inactive upstream), we would suggest moving to adaptive updates, at least for new projects. Is there a specific reason you chose casync? Which casync implementation do you use? The patched original version, https://github.com/florolf/casync-nano or desync? |
That approach did also come to mind. I went for the config approach for two reasons: it was the most straightforward to implement, and considering that it's the user's responsibility to make sure that the device exists, I thought it appropriate that it is also explicitly configured by the user instead of "magicallly". But I suppose the path rewrite approach would also be fine if this detail is mentioned in the manual. If you prefer this approach I'll try to find time for a rewrite (should it be a new PR?).
Back when I made the choice to go with casync I wasn't aware of the complexity/upstream issue. It might be worth clarifying this in the manual, it states "both are supported for now" which didn't really suggest to me that adaptive updates are preferred. Anyhow, there were a couple of reasons to go with casync:
The patched original version for now. The casync-nano readme mentions it only supports block devices, so no UBI. I haven't looked into desync. |
Never mind that, I suppose it would probably work with the same trick that is being used by RAUC to make UBI work with original casync. But I don't see a reason to try casync-nano currently since I don't (yet) have a need to optimize for root filesystem size as long as incremental download size is small. |
As mentioned in #1200, using casync in blob mode with UBI volumes is kind of pointless at the moment, because casync cannot be effective without a seed.
The solution proposed in the comment in casync_extract_image sounds good and would make this use case effortless from a user perspective, but it would require some development effort to implement said logic.
This solution instead leaves the mapping logic to the user, which is likely pretty simple or even nothing at all (e.g. in the case of a squashfs root filesystem, which by necessity already has a ubiblock).
A typical configuration would look like this:
Of course it is still possible for someone to implement the ubiblock mapping logic in RAUC in the future if they see a need for it. But with this change at least the use case is viable with minimal integration work.
Additional details
This patch was tested using the following configuration on an i.MX6 target:
And the following bundle:
Note that for testing this feature it is also necessary to apply #1419, because that bug is a dealbreaker for casync blob updates on UBI volumes.