socfpga: Add a signer that is integrated into mkimage
PATCH 1/1 socfpga: Add a signer that is integrated into mkimage
This tool signs a preloader (built from SPL) when CONFIG_SOCFPGA is set.
Signed-off-by Charles Manning <[email protected]>
--- common/image.c | 1 + include/image.h | 1 + spl/Makefile | 8 ++ tools/Makefile | 2 + tools/mkimage.c | 2 + tools/mkimage.h | 1 + tools/socfpgaimage.c | 343 ++++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 358 insertions(+) create mode 100644 tools/socfpgaimage.c
common/image.c +1 -0
@@ -144,6 +144,7 @@ static const table_entry_t uimage_type[] = { { IH_TYPE_INVALID, NULL, "Invalid Image", }, { IH_TYPE_MULTI, "multi", "Multi-File Image", }, { IH_TYPE_OMAPIMAGE, "omapimage", "TI OMAP SPL With GP CH",}, + { IH_TYPE_SOCFPGAIMAGE, "socfpgaimage", "Altera SOCFPGA preloader",}, { IH_TYPE_PBLIMAGE, "pblimage", "Freescale PBL Boot Image",}, { IH_TYPE_RAMDISK, "ramdisk", "RAMDisk Image", }, { IH_TYPE_SCRIPT, "script", "Script", },
include/image.h +1 -0
@@ -166,6 +166,7 @@#define IH_TYPE_AISIMAGE 13/* TI Davinci AIS Image */ #define IH_TYPE_KERNEL_NOLOAD 14/* OS Kernel Image, can run from any load address */ #define IH_TYPE_PBLIMAGE 15/* Freescale PBL Boot Image */ +#define IH_TYPE_SOCFPGAIMAGE 16/* Altera SOCFPGA Preloader Image */ /* * Compression Types
spl/Makefile +8 -0
@@ -144,8 +144,12 @@ $(OBJTREE)/MLO: $(obj)u-boot-spl.bin $(OBJTREE)/MLO.byteswap: $(obj)u-boot-spl.bin $(OBJTREE)/tools/mkimage -T omapimage -n byteswap \ + -a $(CONFIG_SPL_TEXT_BASE) -d $< $@ +$(OBJTREE)/socfpga-signed-preloader.bin: $(obj)u-boot-spl.bin + $(OBJTREE)/tools/mkimage -T socfpgaimage -d $< $@ + ifneq ($(CONFIG_IMX_CONFIG),) $(OBJTREE)/SPL: $(obj)u-boot-spl.bin $(OBJTREE)/tools/mkimage -n $(SRCTREE)/$(CONFIG_IMX_CONFIG) -T imximage \
@@ -154,6 +158,10 @@ endif ALL-y += $(obj)u-boot-spl.bin +ifdef CONFIG_SOCFPGA +ALL-y += $(OBJTREE)/socfpga-signed-preloader.bin +endif + ifdef CONFIG_SAMSUNG ALL-y += $(obj)$(BOARD)-spl.bin endif
tools/Makefile +2 -0
@@ -95,6 +95,7 @@ NOPED_OBJ_FILES-y += kwbimage.o NOPED_OBJ_FILES-y += pblimage.o NOPED_OBJ_FILES-y += imximage.o NOPED_OBJ_FILES-y += omapimage.o +NOPED_OBJ_FILES-y += socfpgaimage.o NOPED_OBJ_FILES-y += mkenvimage.o NOPED_OBJ_FILES-y += mkimage.o OBJ_FILES-$(CONFIG_SMDK5250) += mkexynosspl.o
@@ -214,6 +215,7 @@ $(obj)mkimage$(SFX): $(obj)aisimage.o \ $(obj)mkimage.o \ $(obj)os_support.o \ $(obj)omapimage.o \ + $(obj)socfpgaimage.o \ $(obj)sha1.o \ $(obj)ublimage.o \ $(LIBFDT_OBJS)
tools/mkimage.c +2 -0
@@ -167,6 +167,8 @@ main (int argc, char **argv)init_ubl_image_type ();/* Init Davinci AIS support */ init_ais_image_type (); +/* Init Altera SOCFPGA image generation/list support */ +init_socfpga_image_type (); params.cmdname = *argv; params.addr = params.ep =0 ;
tools/mkimage.h +1 -0
@@ -157,5 +157,6 @@ void init_default_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 );#endif /* _MKIIMAGE_H_ */
tools/socfpgaimage.c new file +343 -0
343 lines not on this page · raw message
Signature · 1 line
1.7.9.5