How to verify what was written using

9 views
Skip to first unread message

Jonas Mark (BT-FIR/ENG1-Grb)

unread,
Dec 16, 2019, 8:50:56 AM12/16/19
to swupdate, ZHANG Kevin (BT-FIR/ENG1-Zhu), Streidl Hubert (BT-FIR/ENG1-Grb), Jonas Mark (BT-FIR/ENG1-Grb)
Hi,

We are sometimes (roughly 1 out of 50) experiencing problems when writing a raw filesystem image to eMMC on i.MX6. swupdate does not give an error but on the target a few KiB out of 180 MiB are corrupted. When writing the image a second time so far everything was fine.

Is there a way of detecting corruption on the destination with swupdate? E.g., is it possible to validate what has been written using a hash?

This is a snippet from our sw-description:

[..]
images: (
{
filename = "rootfs.ext4.gz";
device = "/dev/mmcblk2p1";
compressed = true;
installed-directly = true;
sha256 = "b897e454e5dac59345d6b879207383d6e196d01df9d09cb711671f7680a8b8c9";
}
);
[..]

We are aware that the sha256 is for validating the integrity of the compressed rootfs.ext4.gz file within the swu stream.

Greetings,
Mark



Building Technologies, Panel Software Fire (BT-FIR/ENG1)
Bosch Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY | www.boschsecurity.com

Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Christian Fischer; Geschäftsführung: Tanja Rückert, Andreas Bartz, Thomas Quante, Bernhard Schuster

Stefano Babic

unread,
Dec 16, 2019, 9:03:14 AM12/16/19
to Jonas Mark (BT-FIR/ENG1-Grb), swupdate, ZHANG Kevin (BT-FIR/ENG1-Zhu), Streidl Hubert (BT-FIR/ENG1-Grb)
Hi Mark,

On 16/12/19 14:50, 'Jonas Mark (BT-FIR/ENG1-Grb)' via swupdate wrote:
> Hi,
>
> We are sometimes (roughly 1 out of 50) experiencing problems when writing a raw filesystem image to eMMC on i.MX6. swupdate does not give an error but on the target a few KiB out of 180 MiB are corrupted.

If SWUpdate does not report any error, the kernel returns write() to
eMMC with success.

> When writing the image a second time so far everything was fine.

Simply because the probability that the second times is corrupted, too,
is much lower.

>
> Is there a way of detecting corruption on the destination with swupdate? E.g., is it possible to validate what has been written using a hash?

Not yet - this could be possible with a new handler that works as
"post-install" and read back the flash. Currently, this is not possible.

>
> This is a snippet from our sw-description:
>
> [..]
> images: (
> {
> filename = "rootfs.ext4.gz";
> device = "/dev/mmcblk2p1";
> compressed = true;
> installed-directly = true;
> sha256 = "b897e454e5dac59345d6b879207383d6e196d01df9d09cb711671f7680a8b8c9";
> }
> );
> [..]
>
> We are aware that the sha256 is for validating the integrity of the compressed rootfs.ext4.gz file within the swu stream.

Right.

Regards,
Stefano


--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=====================================================================
Reply all
Reply to author
Forward
0 new messages