[PATCH] images: Add automatic image crc generation for imd
Yunus Bas
y.bas at phytec.de
Tue Dec 8 03:09:40 EST 2020
Hi Sascha,
Am 07.12.20 um 10:28 schrieb Sascha Hauer:
> Hi Yunus,
>
> On Fri, Dec 04, 2020 at 11:04:21AM +0100, Yunus Bas wrote:
>> Since commit 9d12256bfcc6, the barebox IMD-header has an additional
>> register space for CRC32 checksum. This is an important feature, since
>> it allows us to verify the barebox image after flashing to the hardware.
>>
>> This patch adds an optional feature for automatically generating the CRC32
>> checksum and writing it into IMD-section for all generated image-files.
>> Additionally, the file 'barebox-imd-crc', containing the list of IMD
>> outputs including the CRC32-value, will be generated under the images
>> directory.
> It's not that easy unfortunately. Generating CRC IMD tags doesn't work
> for many image types. For example the i.MX28 images are all encrypted,
> so the bareboximd command won't find any valid tags in the binary. The
> signed i.MX6 HAB images could be added a CRC to, but doing that would
> invalidate the signature.
> I'm afraid it's not possible to add a IMD crc to all images, we must
> carefully select the images we can actually do that.
>
> Having said that, generating the crcs automatically would be really
> great and I have also thought about that. See the following series as
> a starting point. It's not complete though, because it generates the
> crcs also in HAB signed images.
>
> Sascha
>
Thank you for the reply and sorry that I have not thought about signed
images, which is obvious.
From your patches I can see, that you have changed the bareboximd
behaviour and also added additional imdcrc files. Personally, I wouldn't
have gone that far, but it looks like your approach is the cleaner
solution. I will consider your patches and search for a solution on top
of them.
Mit freundlichen Grüßen
--
Yunus Bas
- Software Entwicklung -
Tel.: +49 6131 92 21 0
y.bas at phytec.de
<http://www.phytec.de/>
More information about the barebox
mailing list