[syslinux] Checking CRC (of bzImage) before loading

H. Peter Anvin hpa at zytor.com
Thu Mar 20 13:14:43 PDT 2014

On 03/20/2014 11:25 AM, Mau Z wrote:
> Thanks all,
> It should be quick, so it will be implemented in C.
> Maybe I should have stated that I am not an expert in syslinux (intelligent
> but no expert).
> I think that I understand the "custom COM32 module" option : I simply have
> to change the code (and begin by looking into the files that were
> suggested).
> As for Peter's suggestion, I am not sure if I understood.
> Is this an option which already exists ? How do I activate it ?

No, it would have to be created.  It would need to be inserted in the
file load_linux.c.

> BTW, The binary file will probably be tar + gzip.

This is something entirely different that testing the CRC of a bzImage,
other than that the CRC32 algorithm happens to be the same.

> Does anybody know if there is a "gzip built in CRC test" ?
> The easiest way would be to let gzip test the file..... It must be better
> than what I can do.
> Is there any code example ?  Or maybe another beginning point ?

Syslinux actually contains most of zlib, so if you genuinely want to do
something involving gzip I suggest using that.

That also contains a CRC32 implementation that could be used to validate
bzImage as well.


More information about the Syslinux mailing list