socfpga: Add a signer that is integrated into mkimage
PATCH v3 1/1 socfpga: Add a signer that is integrated into mkimage
This adds a signer for the socfpga preloader built from SPL.
Instead of using the arcane Altera signing tool, this automatically creates a signed version of the SPL in the u-boot root directory.
Changes since previous submissions:
* This version is integrated into mkimage, with image type socfpgaimage.
* This version passes checkpatch too :-)
--- 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 | 348 ++++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 363 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 +348 -0
348 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Wolfgang Denk
NAKPATCH v3 1/1 socfpga: Add a signer that is integrated into mkimage
Dear Charles,
would you please start following the established rules? Especially after having been asked before to to so?
In http://article.gmane.org/gmane.comp.boot-loaders.u-boot/180904
I asked you:
| Would you please read [1] and especially [2], the section about | posting modified versions of patches ? | | You are posting multiple patches with the same subject but different | content. Do you think we have time to figure out what might be the | difference? Please make sure to include a version tagin the Subject: | line, and to add a history oof changes in the comment section. | | And - do you think that "This one passes checkpatch too :-)" is a | helpful and descriptive commit message? [No, it is not.] | | [1] http://www.denx.de/wiki/U-Boot/Patches | [2] http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions
Quoted 8 lines · In message <[email protected]> you wrote:
This adds a signer for the socfpga preloader built from SPL.
Instead of using the arcane Altera signing tool, this automatically creates a signed version of the SPL in the u-boot root directory.
Changes since previous submissions:
* This version is integrated into mkimage, with image type socfpgaimage.
* This version passes checkpatch too :-)
This belongs into the comment section, i. e. below the "---" line.
Quoted 2 lines
Signed-off-by Charles Manning <[email protected]>---
This is the place where comments go.
common/image.c static const table_entry_t uimage_type[] = { · line 150
Quoted 10 lines
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", },
I asked before:
| Please always keep such lists sorted.
Why do you ignore review comments?
common/image.c $(OBJTREE)/MLO: $(obj)u-boot-spl.bin · line 148
Quoted 7 lines
+++ b/spl/Makefile
common/image.c +1
-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 $< $@
Me and Gerhard have asked you about this. Is this eve working? I doubt that. But you ignore all such comments.
common/image.c $(OBJTREE)/MLO: $(obj)u-boot-spl.bin · line 151
Quoted 3 lines
common/image.c +3
-0+ifdef CONFIG_SOCFPGA +ALL -y +=$ (OBJTREE )/socfpga-signed-preloader.bin +endif
I commented on this - you ignored it.
common/image.c NOPED_OBJ_FILES-y += kwbimage.o · line 101
Quoted 8 lines
common/image.c +1
-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.oOBJ_FILES -$ (CONFIG_SMDK5250 ) += mkexynosspl.o
I commented on this - you ignored it.
common/image.c $(obj)mkimage$(SFX): $(obj)aisimage.o \ · line 221
Quoted 8 lines
common/image.c +1
-0@@ -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)
I commented on this - you ignored it.
...
Quoted 2 lines
+ * Reference doc http://www.altera.com.cn/literature/hb/cyclone-v/cv_5400A.pdf
+ * Note this doc is not entirely accurate.
I asked for more information which parts of the doc are not correct. You ignored this.
Quoted 5 lines
+ * This uses the CRC32 calc out of the well known Apple
+ *crc32.ccode. Copyright for the CRC code:
+ *
+ * COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or
+ * code or tables extracted from it, as desired without restriction.
Many more ignored review comments folow.
Sorry, but this is not the way how code reviews are supposed to work.
NAK!!!
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de As in certain cults it is possible to kill a process if you know its true name. -- Ken Thompson and Dennis M. Ritchie
PATCH v3 1/1 socfpga: Add a signer that is integrated into mkimage
Hello All, but mainly a message to Wolfgang and Gerhard.
I would like to apologise for my recent flurry of postings causing some confusion and gnashing of teeth.
I only read some of the comments (relating to adding a version number on the patch). I had read that far then assumed the patch had already been NAKed at that point and did not read further.
I shall now read all the comments from Wolfgang and Gerhard again and resubmit another version which I hope is closer to the mark.
Thank you for my ongoing education.
Regards
Charles