[PATCH 0/1] ubifs: support authentication without hmac
Richard Weinberger
richard at nod.at
Mon Jun 29 03:04:47 EDT 2020
Alex,
----- Ursprüngliche Mail -----
> Von: "Alexander Dahl" <ada at thorsis.com>
> An: "linux-mtd" <linux-mtd at lists.infradead.org>, "Sascha Hauer" <s.hauer at pengutronix.de>
> CC: "richard" <richard at nod.at>, "Torben Hohn" <torben.hohn at linutronix.de>
> Gesendet: Montag, 29. Juni 2020 08:46:10
> Betreff: Re: [PATCH 0/1] ubifs: support authentication without hmac
> Hello Richard,
>
> Am Freitag, 26. Juni 2020, 10:09:14 CEST schrieb Richard Weinberger:
>> That said, I'm not really a fan of reading files from UBIFS in u-boot.
>> We have UBI static volumes for that...
>> Maybe you can give this a try and void some complexity in the bootloader.
>
> Surprised to hear that. I saw some boards lately doing exactly that. Things
> like kernel image are copied in Linux to e.g. /boot and U-Boot just picks it
> up from there.
Well, not everyone is using U-Boot. ;-)
> I tried to find out more about using UBI static volumes in general and for
> that usecase, but neither http://linux-mtd.infradead.org/doc/ubi.html nor
> http://linux-mtd.infradead.org/faq/ubi.html point me in a direction where to
> find real world examples to look at. Are there any boards in the wild using
> this? Maybe with defconfigs in U-Boot already?
U-Boot choose the UBIFS way AFAICT.
But if you have your own minimal loader you can read from an UBI static volume with
a few lines of C (~200 LoC). This is what I see/use most of the time.
Using static volumes in U-Boot is also possible, IIRC just use "ubi read".
>From http://www.linux-mtd.infradead.org/doc/ubi.html#L_overview:
"""
There are 2 types of UBI volumes: dynamic volumes and static volumes. Static volumes are read-only and their contents are protected by CRC-32 checksums, while dynamic volumes are read-write and the upper layers (e.g., a file-system) are responsible for ensuring data integrity.
Static volumes are typically used for the kernel, initramfs, and dtb. Larger static volumes may incur a significant penalty when opening, as the CRC-32 needs to be calculated at this time. If you are looking to use static volumes for anything besides the kernel, initramfs, or dtb you are likely doing something wrong and would be better off using a dynamic volume instead.
"""
Thanks,
//richard
More information about the linux-mtd
mailing list