Hi Stefano. Helpful ,comprehensive feedback. Yet ,a couple of clarifications from my side...
Thanks for the quick response...
--Vibin
-----Original Message-----
From: Stefano Babic [mailto:
sba...@denx.de]
Sent: Thursday, July 30, 2015 1:29 PM
To: Viswambharan, Vibin (V.)
Cc:
sba...@denx.de
Subject: Re: swupdate : support for patch based update
Hi Vibin,
On 30/07/2015 08:54, Viswambharan, Vibin (V.) wrote:
> Hi Stefano. I am Vibin ,working in the automotive embedded domain. Last week I was going through the
> implementation of SWUPDATE especially on the support provided by the
> implementation for downloading images from a remote server and perform
> target flashing.
>
>
ok
>
> I have a related query with this ,but not very specific to swupdate.
> Did you came across with any request or suggestion to support the
> "patch based upgrade"?. I have seen your documentation have some
> strong point of caution towards using package managers for software
> updates in embedded targets. Would you be able to share your thoughts
> on extending the swupdate to support a way to upgrade the existing
> images using patch.
> Do you see any issues with this approach or something that you have
> evaluated before.
Have you check my slides ?
http://events.linuxfoundation.org/sites/events/files/slides/SoftwareUpdateForEmbedded.pdf
Or even:
Updating Embedded Linux devices in field by Chris Simmonds
http://de.slideshare.net/chrissimmonds/linux-fieldupdate2015
In the slides, I explain my concerns about an additive upgrade. Of course, customers ask for reducing size of the download image. But the big difference is if the upgrade *should* work in most case or *must* work *always*.
If you upgrade the system modifying the filesystem, as you suggest and as the package managers are doing, you rely on the fact that the filesystem is in a well known state. How do you know that ? Even if the filesystem is read-only, there are cases where flash goes corrupt and something is not anymore as you delivered. For example: a single library is corrupted. You note this only when a program linked with the library is loaded.
[Vibin] : Yes ,I did go through your presentation on SoftwareUpdate ForEmbedded.pdf. Though I anticipate some these issues ,but I was not that clear. Your response *should* work vs *must* work *always* conveys a lot more than what I thought about on things that could go wrong...
> Is solutions like XPatch could be used to
I know xdelta, but xpatch is a new term for me, and searching in internet did not help me. What is this ? Do you have a link ?
[Vibin] : Sorry its a mistake from my editing, I was just putting Xdelta,bspatch etc...so somehow I made Xpatch out of my editing...
> generate the filesystem image diff as a patch, which can be applied to
> the target image by swupdate?.
This is what xdelta provides. swupdate is flexible, and it is possible to write a handler able to install xdelta (xpatch ?) subimage.
I have my doubts, but the final decisions is taken by the customers. If some of them decides to go for a differential upgrade and ask for such a solution, I will implement a suitable handler. But he must have the whole visibility and checks for pros and cons.
As I said, anyone should check for his own project which are the goals:
reliability against speed or comfortability.
[Vibin] : I agree ,neither we can't sacrifice reliability for speed...Soon or later we will have to pay off the penalty for that...
> I see this as an option to reduce the
> image size and optimize bandwidth while swupdate is supporting
> scenarios like flashing software over the air usecase.
But you have to rely on a working filesystem. Can you explain what happens when an upgrade with xpatch failed, and the filesystem remains in a unknown state ?
> But I am not sure
> whether there are reliable and secure implementations that can work
> for the generation and application of patched suited to the embedded
> targets image upgrades?. Please share if you have some insight on this.
You have to define the scenarios and check with the projects. There is no general solutions.
Of course, if you use swupdate in a double-copy scenario (see documentation), and there are two copies of the software on the target, even a package manager or xdelta/xpatch solution can be safe enough.
In this case, a differential upgrade can make sense.
[Vibin] : I wrote about this , after seeing that swupdate provides the double-copy scenario. Though I am not yet there to confirm whether we can deploy the double copy strategy for all the images, as it is going to cost us more in terms of storage memory and update logic to manage them. We must to the minimum afford to keep bootloader, kernel recovery copies to guarantee and ensure there is always a means to get access to the system for upgrade .But I think it may not be viable to reserve storage for rootfs image which is relatively huge in resource demands.
With a rescue/single copy, the risk to brick the target remains IMHO too high.
[Vibin] : This is a good thought provoking question. This again brings me back to the question of how can we do the incremental updates always in an atomic, fail safe way?.
>
>
>
> Thanks in advance. I didn't use the mailing list as the information I
> am looking is bit out of the core topic.
I have not CCed to ML, but this is also a topic for a general discussion. Do not feel afraid and post your question to the ML. Maybe someone else as me can add some valuable informations.
[Vibin] : Also one more question , I appreciate the fact that a lot of thought has been put it into while shaping up this framework and infact it is structured fairly well to adapt various use cases related to flashing. Again respecting the decisions on this as I see today ,my questions,
1. Has this been discussed/shared to automotive IVI alliances like Genivi,AGL ?.
2. The some constraints we will run into while using this under GPL terms, as in our domain there are cases we have to consider the devices/nodes external to our system and some of them have to follow proprietary communication /device commands protocols for device updates. This may constrain us in creating "device specific update" handlers as part of the swupdate core process . I see some extension ,yet to go in details ,about the proposal to use "ipc" mechanism to interact with the daemon. Is this approach can be used to "blackbox" the update handlers as separate process and get them registered with the daemon for update purpose? .Is there a way to solve this?.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone:
+49-8142-66989-53 Fax:
+49-8142-66989-80 Email:
sba...@denx.de =====================================================================