deployment fallback and u-boot



Hi all,

I am working with OSTree in the context of embedded device updates,
utilizing the meta-updater Yocto layer.
I want to add support for fallback in case of unbootable deployment.

Looks like most of the needed logic is already in place:
OSTree stores the last bootable deployment. On bootloaders other than
u-boot, both the new deployment and the last booted one available on the
boot loader menu.  U-boot itself has mechanism for counting failed boots
and running an alternative boot commands in case the count exceeds a
limit. [1]

However, the u-boot integration code writes only the default deployment
to the 'uEnv.txt' file, ignoring the others. [2]

I would like OSTree to write a second deployment information in a u-boot
accessible format. Then u-boot will be able to read it in case of
unbootable deployment.

The options I see are:
1) Write a second file, "uEnv2.txt", to "/boot/loader/".
2) Add kernel_image2/ramdisk_image2/ostree2 lines to "uEnv.txt"

Do you have reason to prefer one of these options? Other options I
haven't thought about?
Does this approach sounds reasonable at all?

Thanks,
Guy
---

[1] http://www.denx.de/wiki/view/DULG/UBootBootCountLimit
[2] https://github.com/ostreedev/ostree/blob/master/src/libostree/ostree-bootloader-uboot.c#L80



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