From 832472a94d1adb4f1f86e491a2387c43c960b4e2 Mon Sep 17 00:00:00 2001 From: Charles Manning Date: Thu, 6 Mar 2014 15:40:50 +1300 Subject: tools: socfpga: Add socfpga preloader signing to mkimage Like many platforms, the Altera socfpga platform requires that the preloader be "signed" in a certain way or the built-in boot ROM will not boot the code. This change automatically creates an appropriately signed preloader from an SPL image. The signed image includes a CRC which must, of course, be generated with a CRC generator that the SoCFPGA boot ROM agrees with otherwise the boot ROM will reject the image. Unfortunately the CRC used in this boot ROM is not the same as the Adler CRC in lib/crc32.c. Indeed the Adler code is not technically a CRC but is more correctly described as a checksum. Thus, the appropriate CRC generator is added to lib/ as crc32_alt.c. Signed-off-by: Charles Manning Signed-off-by: Marek Vasut Cc: Chin Liang See Cc: Dinh Nguyen Cc: Albert Aribaud Cc: Tom Rini Cc: Wolfgang Denk Cc: Pavel Machek Acked-by: Pavel Machek V2: - Zap unused constant - Explicitly print an error message in case of error - Rework the hdr_checksum() function to take the *header directly instead of a plan buffer pointer --- tools/imagetool.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/imagetool.h') diff --git a/tools/imagetool.h b/tools/imagetool.h index c8af0e82f8..8bce059482 100644 --- a/tools/imagetool.h +++ b/tools/imagetool.h @@ -168,6 +168,7 @@ void init_mxs_image_type(void); void init_fit_image_type(void); void init_ubl_image_type(void); void init_omap_image_type(void); +void init_socfpga_image_type(void); void init_gpimage_type(void); void pbl_load_uboot(int fd, struct image_tool_params *mparams); -- cgit v1.2.1