[U-Boot] [RFC] Safe Linux Updater

Stefano Babic sbabic at denx.de
Mon Jun 17 15:53:42 CEST 2013


Hi Mats,

On 17/06/2013 15:25, Mats Kärrman wrote:
> Dear Wolfgang,
> 
> I havn't seen the scripts of Alexandre but it sounds something like what
> we have already implemented.
> 
> Wolfgang Denk wrote:
>>   Please note that this is a feature standardized for example in the
>>   Open Source Development Labs Carrier Grade Linux Requirements
>>   Definition, which says something like: "CGL shall provide support
>>   for detecting a repeating reboot cycle due to recurring failures
>>   and will go to an offline state if this occurs."
> 
> As I read Alexandre, the aim is to revert to a previous functional image,
> not to go to an offline state.

This is already done in u-boot checking the value of the boot counter
(in not persistency storage) and calling a script that switch back to
the previous copy, if any.

I find that the proposal does not scale well. Having partitions on a
disk / SDCARd is a case, but we have several different way to boot.
Think about kernel / rootfs into UBI or UBIFS, or saved as raw data in
other kind of storages (NOR, SPI,..). Because we are talking about the
feature "updating", this should be abstracted from the specific case to
be generalized in U-Boot.

> 
>>  Normally you want to avoid all erase / write operations to
>>   the boot loader and it's private data structures in the process of
>>   a normal reboot / reset.
> 
> But a failing boot is not a normal boot. This should only occur when an
> update fails.

There are runtime conditions that can cause the boot to fail, due for
example to power-supply. Or a degrading of the resources (flash gets
wrong), and so on.

Even if a failure due to a wrong update is a common case to have a
failing boot, this is not the only use case.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================


More information about the U-Boot mailing list