Re: Ostree and Das U-Boot



Thanks a lot for the reply,
  It seems like a viable way to go forwards, though I'd have to check
how to build an rpm-ostree equivalent/ modify rpm-ostree to build it
from packages for our system, and I'm not sure if that would fit in my
timeframe.

The uboot changes look minimal and similar to what is already there,
so that's at least a load off my neck. Automatic fallback is going to
be "fun" ( how do you know the system booted okay? ) but might be
solvable with a combination of counter, watchdog and so on.

Regards,
  D.S.

( PS. Yes, I'm subscribed, thanks again for the quick answer, and
sorry about my delayed response. )



On Wed, Jun 11, 2014 at 1:42 AM, Javier Martinez Canillas
<javier martinez collabora co uk> wrote:
Hello D.S,

On 06/10/2014 11:16 PM, D.S. 'Spider' Ljungmark wrote:
So,
  I'm right now evaluating various OS update systems for ARM-based systems.

Before I start digging into ostree I wanted to get a quick feel for
what is done / needs to be done to get it to run with uboot.


OStree suports U-Boot by generating a plain text file with environment variables
for the kernel, inird and bootargs.

You need to either adapt your system's U-boot default boot commands to use these
env vars or provide a bootscript that uses them to boot.

For more information you can refer to a blog entry [0] I wrote about a year ago
when U-Boot support landed in OSTree.

The installation target will be headless devices, and we're mainly
looking for atomic upgrades as well as one-time boot targets. ( aka,
try and boot the new system, if that fails, watchdog kicks in and it
automatically boots the old system )



This certainly can be done with OSTree. Is just a matter of passing set the path
of the previous chroot to ostree kernel command line parameter if your watchdog
expired. In that case the root filesystem previously to the upgrade will be used.

/boot/uEnv.txt set ostree parameter to the path of the latest chroot but IIRC
the old files under /boot/loader.${bootversion}/uEnv.txt are preserved so your
U-Boot default commands or bootscript can import the previous variables from there.

This seems to be a quite common use-case so I wonder if it would make sense to
create a /boot/uEnv.txt.bk symlink or something that points to the previous
/boot/loader.${bootversion}/uEnv.txt env var file so U-Boot can look for the
previous configuration on a fixed path in case of a boot failure.

This ought to be doable with ostree from what I can see, though I'm
not sure how much work would be needed to get it working, and if it'd
be worth it compared to other solutions like swsup or something
homebrewed. (yuch)


Regards,
  D.S.
_______________________________________________
ostree-list mailing list
ostree-list gnome org
https://mail.gnome.org/mailman/listinfo/ostree-list


Best regards,
Javier

[0]:
http://martinezjavier.wordpress.com/2013/10/06/u-boot-backend-support-for-ostree/
_______________________________________________
ostree-list mailing list
ostree-list gnome org
https://mail.gnome.org/mailman/listinfo/ostree-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]