[U-Boot] UBI/UBIFS complete integrity check

Liam Beguin lvb at xiphos.com
Tue Oct 31 15:01:21 UTC 2017


Hi everyone,

I'm currently using a UBIFS root file system (stored on SPI-NOR flash)
and would like to perform a full integrity check before booting it.
The rootfs is read-only and until now, I've been computing an md5sum on
the whole mtd device from an initramfs and comparing it to a stored
md5sum. If both md5sums don't match, I need to stop the boot process
completely.

If possible, I was hoping to drop initramfs and do the integrity check
from U-Boot. I know UBI/UBIFS does a CRC-32 of the data it writes to
flash but the intent here is to prevent booting an image where
even a _single bit_ of flash may have been corrupted.

My question is, does UBI/UBIFS have this kind of complete integrity
check built-in? If not, can I take advantage of these CRC-32, to do
something equivalent to my md5sum check from U-Boot.
Thanks,

Liam Beguin
Xiphos Systems Corp.
http://xiphos.com


More information about the U-Boot mailing list