[U-Boot] [PATCH 0/6] miscellaneous ubispl and ubi improvements

Markus Klotzbuecher mk at mkio.de
Wed Apr 17 06:34:53 UTC 2019


Hello Heiko

On Tue, Apr 16, 2019 at 05:52:15AM +0200, Heiko Schocher wrote:
>
>Am 15.04.2019 um 17:32 schrieb Markus Klotzbuecher:
>> From: Markus Klotzbuecher <markus.klotzbuecher at kistler.com>
>> 
>> Hello Heiko and Kyungmin
>> 
>> This series contains a couple of UBI and UBI SPL improvements, notably
>> a ubispl extension to allow loading volumes by name. The motivation is
>> to use the UBI atomic volume rename functionality to allow double copy
>> software updates of U-Boot on UBI. To do that we configured the SPL to
>> always load the same volume name (e.g. "u-boot"), and the software
>> updater always installs into the secondary volume "u-boot_r". After a
>> successful upgrade, these two volume names are switched.
>
>Ok ... Hmm... if you use the bootcounter in SPL, you may have a chance
>to unbreak he board, if "u-boot" does not boot?
>
>How do you detect a successfull upgrade ?

At this point, if writing to the to-be-updated volume succeeds, we
consider it a successful upgrade. If not, the rename is not carried
out and the old volume will remain the active one.

To further improve reliability, this could be combined with an SPL
bootcounter, however to really be an improvement, that should probably
use an environment on UBI too (or anything more reliable than raw
NAND).

>> This extension is protected by #ifdefs as it will somewhat slow down
>> loading of volumes by id. This is because the code needs to disable
>> the optimization of ignoring all volume ids which are not
>> to-be-loaded, since these can only be resolved after attaching.
>> 
>> We have tested both with and without fastmap enabled and both paths
>> seems to work reliably.
>
>Fine, thanks!
>
>> I also moved the ubispl config to Kconfig. There seem to be two boards
>
>Thanks!
>
>> that use this (Maintainers cc'ed on patch). I have not updated their
>> defconfigs (not being sure if I should) but would be pleased to do so.
>
>I prefer that you do so, but we will see, if the board maintainers
>give some feedback.
>
>Give me some time to look through your patches.

Sure, thank you!

Best regards
Markus

-- 
Markus Klotzbuecher
Freelancer Embedded, Distributed & Real-time
Am See 28, 78465 Konstanz, Germany


More information about the U-Boot mailing list