tools: mkimage: Add: Kirkwood Boot Image support (kwbimage)
PATCH v4 5/5 tools: mkimage: Add: Kirkwood Boot Image support (kwbimage)
This patch adds type kwbimage support for new mkimage core For more details refer docs/README.kwbimage
This patch is tested with Sheevaplug board
---
v2: updated as per review comments for v1
added len checks in checksum functions
added printable strings for each valid table entry
use of sccanf not changed since it offers return value for failure
v3: resolved merge issues on mkimage branch
v4: added warning fix on amd64
Use an intermediate type as large as the pointers we do simple arithmetic with. Use a format string type that suits the sizeof type from KWBIMAGE_MAX_CONFIG. The compiler warns about both of these on amd64.
included kwbimage.o in the build dependency calculations_GNU_SOURCE defined to obtain getline prototype from stdio.h
most of these changes suggested by Ron Lee (in cc list)
v4 repost: typos corrected in commit message
Makefile | 5 + common/image.c | 1 + doc/README.kwbimage | 93 ++++++++++++ include/image.h | 1 + tools/Makefile | 5 + tools/kwbimage.c | 405 +++++++++++++++++++++++++++++++++++++++++++++++++++ tools/kwbimage.h | 106 +++++++++++++ tools/mkimage.c | 2 + tools/mkimage.h | 1 + 9 files changed, 619 insertions(+), 0 deletions(-) create mode 100644 doc/README.kwbimage create mode 100644 tools/kwbimage.c create mode 100644 tools/kwbimage.h
Makefile +5 -0
@@ -314,6 +314,10 @@ $(obj)u-boot.img: $(obj)u-boot.bin sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \ -d $< $@ +$(obj)u-boot.kwb: $(obj)u-boot.bin + $(obj)tools/mkimage -n $(KWD_CONFIG) -T kwbimage \ + -a $(TEXT_BASE) -e $(TEXT_BASE) -d $< $@ + $(obj)u-boot.sha1: $(obj)u-boot.bin $(obj)tools/ubsha1 $(obj)u-boot.bin
@@ -3671,6 +3675,7 @@ clobber: clean @rm -f $(OBJS) $(obj)*.bak $(obj)ctags $(obj)etags $(obj)TAGS \ $(obj)cscope.* $(obj)*.*~ @rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL) + @rm -f $(obj)u-boot.kwb @rm -f $(obj)tools/{env/crc32.c,inca-swap-bytes} @rm -f $(obj)cpu/mpc824x/bedbug_603e.c @rm -f $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
common/image.c +1 -0
@@ -139,6 +139,7 @@ static table_entry_t uimage_type[] = { { IH_TYPE_SCRIPT, "script", "Script", }, { IH_TYPE_STANDALONE, "standalone", "Standalone Program", }, { IH_TYPE_FLATDT, "flat_dt", "Flat Device Tree", }, + { IH_TYPE_KWBIMAGE, "kwbimage", "Kirkwood Boot Image",}, { -1, "", "", }, };
doc/README.kwbimage new file +93 -0
93 lines not on this page · raw message
include/image.h +1 -0
@@ -155,6 +155,7 @@#define IH_TYPE_SCRIPT 6/* Script file */ #define IH_TYPE_FILESYSTEM 7/* Filesystem Image (any type) */ #define IH_TYPE_FLATDT 8/* Binary Flat Device Tree Blob */ +#define IH_TYPE_KWBIMAGE 9/* Kirkwood Boot Image */ /* * Compression Types
tools/Makefile +5 -0
@@ -99,6 +99,7 @@ OBJ_FILES-y += fit_image.o OBJ_FILES-$(CONFIG_CMD_NET) += gen_eth_addr.o OBJ_FILES-$(CONFIG_CMD_LOADS) += img2srec.o OBJ_FILES-$(CONFIG_INCA_IP) += inca-swap-bytes.o +OBJ_FILES-y += kwbimage.o OBJ_FILES-y += mkimage.o OBJ_FILES-$(CONFIG_NETCONSOLE) += ncb.o OBJ_FILES-y += os_support.o
@@ -189,6 +190,7 @@ $(obj)mkimage$(SFX): $(obj)crc32.o \ $(obj)default_image.o \ $(obj)fit_image.o \ $(obj)image.o \ + $(obj)kwbimage.o \ $(obj)md5.o \ $(obj)mkimage.o \ $(obj)os_support.o \
@@ -218,6 +220,9 @@ $(obj)fit_image.o: $(SRCTREE)/tools/fit_image.c $(obj)image.o: $(SRCTREE)/common/image.c $(CC) -g $(FIT_CFLAGS) -c -o $@ $< +$(obj)kwbimage.o: $(SRCTREE)/tools/kwbimage.c + $(CC) -g $(FIT_CFLAGS) -c -o $@ $< + $(obj)mkimage.o: $(SRCTREE)/tools/mkimage.c $(CC) -g $(FIT_CFLAGS) -c -o $@ $<
tools/kwbimage.c new file +405 -0
405 lines not on this page · raw message
tools/kwbimage.h new file +106 -0
106 lines not on this page · raw message
tools/mkimage.c +2 -0
@@ -148,6 +148,8 @@ main (int argc, char **argv)int retval =0 ;struct image_type_params *tparams =NULL ; +/* Init Kirkwood Boot image generation/list support */ +init_kwb_image_type ();/* Init FIT image generation/list support */ init_fit_image_type ();/* Init Default image generation/list support */
tools/mkimage.h +1 -0
@@ -140,6 +140,7 @@ void mkimage_register (struct image_type_params *tparams);* * Supported image types init functions */ +void init_kwb_image_type (void );void init_default_image_type (void );void init_fit_image_type (void );
Signature · 1 line
1.5.3.3
Wolfgang Denk
AppliedPATCH v4 5/5 tools: mkimage: Add: Kirkwood Boot Image support (kwbimage)
Dear Prafulla Wadaskar,
Quoted 28 lines · In message <[email protected]> you wrote:
This patch adds type kwbimage support for new mkimage core For more details refer docs/README.kwbimage
This patch is tested with Sheevaplug board
Signed-off-by Prafulla Wadaskar <[email protected]>Acked-by Ron Lee <[email protected]>Signed-off-by Prafulla Wadaskar <[email protected]>---
v2: updated as per review comments for v1
added len checks in checksum functions
added printable strings for each valid table entry
use of sccanf not changed since it offers return value for failurev3: resolved merge issues on mkimage branch
v4: added warning fix on amd64
Use an intermediate type as large as the pointers we do simple arithmetic with. Use a format string type that suits the sizeof type fromKWBIMAGE_MAX_CONFIG. The compiler warns about both of these on amd64.
included kwbimage.o in the build dependency calculations_GNU_SOURCEdefined to obtain getline prototype fromstdio.h
most of these changes suggested by Ron Lee (in cc list)v4 repost: typos corrected in commit message
Quoted 13 lines
Makefile | 5 + common/image.c | 1 + doc/README.kwbimage | 93 ++++++++++++ include/image.h | 1 + tools/Makefile | 5 + tools/kwbimage.c | 405 +++++++++++++++++++++++++++++++++++++++++++++++++++ tools/kwbimage.h | 106 +++++++++++++ tools/mkimage.c | 2 + tools/mkimage.h | 1 + 9 files changed, 619 insertions(+), 0 deletions(-) create mode 100644 doc/README.kwbimage create mode 100644 tools/kwbimage.c create mode 100644 tools/kwbimage.h
Applied to "mkimage" branch, thanks.
Now this patch series has completely been added to the "mkimage" branch, I would like to ask you to re-test everything. If it's working for you and everybody else (or if nobody raises any concerns) I will merge this branch into mainline in a few days.
Thanks.
Best regards,
Wolfgang Denk
Signature · 6 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
"...this does not mean that some of us should not want, in a rather
dispassionate sort of way, to put a bullet through csh's head."
- Larry Wall in <[email protected]>PATCH v4 5/5 tools: mkimage: Add: Kirkwood Boot Image support (kwbimage)
Quoted 59 lines
-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Thursday, September 10, 2009 4:09 PM
To: Prafulla Wadaskar
Cc: u-boot at lists.denx.de; Ron Lee; Ashish Karkare; Prabhanjan Sarnaik
Subject: Re: [U-Boot] [PATCH v4 5/5][repost] tools: mkimage:
Add: Kirkwood Boot Image support (kwbimage)Dear Prafulla Wadaskar,
In message
Quoted 15 lines · <[email protected]> you wrote:
This patch adds type kwbimage support for new mkimage core For more details refer docs/README.kwbimage
This patch is tested with Sheevaplug board
Signed-off-by Prafulla Wadaskar <[email protected]>Acked-by Ron Lee <[email protected]>Signed-off-by Prafulla Wadaskar <[email protected]>---
v2: updated as per review comments for v1
added len checks in checksum functions
added printable strings for each valid table entry
use of sccanf not changed since it offers return value for failureQuoted 4 lines
v3: resolved merge issues on mkimage branch
v4: added warning fix on amd64
Use an intermediate type as large as the pointers we dosimple arithmetic with.
Quoted 1 line
Use a format string type that suits the sizeof type
from
KWBIMAGE_MAX_CONFIG.Quoted 8 lines
The compiler warns about both of these on amd64.
included kwbimage.o in the build dependency calculations_GNU_SOURCEdefined to obtain getline prototype fromstdio.hmost of these changes suggested by Ron Lee (in cc list)v4 repost: typos corrected in commit message
Quoted 6 lines
Makefile | 5 + common/image.c | 1 + doc/README.kwbimage | 93 ++++++++++++ include/image.h | 1 + tools/Makefile | 5 + tools/kwbimage.c | 405+++++++++++++++++++++++++++++++++++++++++++++++++++
Quoted 7 lines
tools/kwbimage.h | 106 +++++++++++++ tools/mkimage.c | 2 + tools/mkimage.h | 1 + 9 files changed, 619 insertions(+), 0 deletions(-) create mode 100644 doc/README.kwbimage create mode 100644 tools/kwbimage.c create mode 100644 tools/kwbimage.h
Quoted 7 lines
Applied to "mkimage" branch, thanks.
Now this patch series has completely been added to the "mkimage" branch, I would like to ask you to re-test everything. If it's working for you and everybody else (or if nobody raises any concerns) I will merge this branch into mainline in a few days.
Hi Wolfgang
One single thanks for entire patch series :-)
YES,
mkimage and kwbimage support which is working perfectly for Sheevaplug on mkimage branch There is one concern, NAND is broken on Kirkwood platform, I had to apply this additional patch by Simon
http://lists.denx.de/pipermail/u-boot/2009-September/059896.html
Any way mkimage/kwbimage patches are okay
Regards..
Prafulla . .
Quoted 15 lines
Thanks.
Best regards,
Wolfgang Denk
Signature · 6 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 "...this does not mean that some of us should not want, in a rather dispassionate sort of way, to put a bullet through csh's head." - Larry Wall in <[email protected]>
PATCH v4 5/5 tools: mkimage: Add: Kirkwood Boot Image support (kwbimage)
Dear Prafulla Wadaskar,
Quoted 2 lines · In message <[email protected]>…
One single thanks for entire patch series :-)
Thanks for all your effort.
Quoted 3 lines
mkimage and kwbimage support which is working perfectly for Sheevaplug on mkimage branch There is one concern, NAND is broken on Kirkwood platform, I had to apply this additional patch by Simon
http://lists.denx.de/pipermail/u-boot/2009-September/059896.html
Yes, I know, but this is something the ARM custodian should pick up.
Tom: ping...
Quoted 1 line
Any way mkimage/kwbimage patches are okay
Thanks for the confirmation.
Best regards,
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 No one can guarantee the actions of another. -- Spock, "Day of the Dove", stardate unknown