[U-Boot-Users] Accessing mkimage checksum
Wolfgang Denk
wd at denx.de
Thu Apr 27 00:33:05 CEST 2006
In message <444FE313.2090609 at orkun.us> you wrote:
>
> We had the similar need to do this. In our software update program
> (which gets executed via a custom CLI/Web layer etc.) we validate the
> kernel+initrd in uimage format before storing in the flash. If
Yes, of course. Thisi s a perfectly valid request. But you don't need
no special tools for this. A simple "mkimage -l" will do this.
> We do this by calculating the crc of the header comparing with stored
> header crc and if that checks calculating the data payload crc and
> comparing it with the stored payload crc in the image header. libz
> provides the necessary crc32() functionality in Linux.
You just reinvented another wheel.
> If you are not building images on the target mkimage is an overkill to
> validate the image. As a matter of fact, we do not build a cross version
> of this utility.
So how big is "mkimage" on your system? For PowerPC I get:
-> ls -lh mkimage
-rwxr-xr-x 1 wd users 18K Apr 27 00:26 mkimage
18 kB... How big is your custom application, and how much memory did
you save?
> Please also consider that their is not enough space in the writable file
> system so image is kept in ram by the update application until update is
> completed. So, dependency on external utilities is not necessary or not
> required.
If you can keep it in RAM, you could use a tmpfs and operate on files
as well. You probably could have used other standard tools then as
well.
> Wolfgang, now my question is "image.h" file needed by the update
> application and this file is GPL. Would you consider dual licensing this
> file only so it could be included in such a proprietary closed-source
> program?
No. But please read the file header again, more carefully.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Heavier than air flying machines are impossible.
-- Lord Kelvin, President, Royal Society, c. 1895
More information about the U-Boot
mailing list