secimage: Use libz's crc32 function

This is to trick libreboot into not deleting misc.c when checking
out coreboot.

Change-Id: I8f0bb5cb3eb5681f99c616ae03de126efab852a9
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/11134
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Stefan Reinauer
2015-08-06 16:57:48 -07:00
committed by Patrick Georgi
parent 9dd8f88841
commit 03597d0f01
5 changed files with 4 additions and 60 deletions

View File

@ -17,6 +17,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <zlib.h>
#include "secimage.h"
#define MIN_SIZE (1024*120)
@ -150,7 +151,7 @@ int CreateSecureBootImage(int ac, char **av)
if (!status) {
((HEADER *)buf)->Length = sbiLen;
((HEADER *)buf)->crc = calc_crc32(0xFFFFFFFF,
((HEADER *)buf)->crc = crc32(0xFFFFFFFF,
(uint8_t *)buf, 12);
printf("Generating Image file %s: %d bytes\n",