mkimage: ublimage must return if the header is not verified
PATCH 1/3 mkimage: ublimage must return if the header is not verified
Each image handler must return a not-zero velue if the header is not recognized to allow the main program to iterate to the next handler.
--- tools/ublimage.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
tools/ublimage.c +5 -0
@@ -214,6 +214,11 @@ static int ublimage_check_image_types(uint8_t type)static int ublimage_verify_header (unsigned char *ptr,int image_size,struct mkimage_params *params) { +struct ubl_header *ubl_hdr = (struct ubl_header *)ptr; + +if ((ubl_hdr->magic &0xFFFFFF00 ) !=UBL_MAGIC_BASE ) +return -1 ; +return 0 ; }
Signature · 1 line
1.7.1
PATCH 2/3 mkimage: Add variable lenght header support
Some images have not a header of fix lenght. The patch will be used for the generation of AIS images, because this header has a variable lenght. The patch adds also the parameter "-s" (skip) to not copy automatically the passed image file.
--- tools/mkimage.c | 19 ++++++++++++++----- tools/mkimage.h | 8 ++++++++ 2 files changed, 22 insertions(+), 5 deletions(-)
tools/mkimage.c +14 -5
@@ -248,6 +248,9 @@ main (int argc, char **argv)usage (); params.imagename = *++argv; goto NXTARG; +case 's' : + params.skipcpy =1 ; +break ;case 'v' : params.vflag++;break ;
@@ -361,11 +364,15 @@ NXTARG: ; }/* -* Must be -w then: -* -* write dummy header, to be fixed later +* In case there an header with a variable +* length will be added, the corresponding +* function is called. This is responsible to +* allocate memory for the header itself. */ -memset (tparams->hdr,0 , tparams->header_size); +if (tparams->vrec_header) + tparams->vrec_header (¶ms, tparams); +else +memset (tparams->hdr,0 , tparams->header_size);if (write (ifd, tparams->hdr, tparams->header_size) != tparams->header_size) {
@@ -374,7 +381,9 @@ NXTARG: ;exit (EXIT_FAILURE ); } -if (params.type ==IH_TYPE_MULTI || params.type ==IH_TYPE_SCRIPT ) { +if (!params.skipcpy && + (params.type ==IH_TYPE_MULTI || + params.type ==IH_TYPE_SCRIPT )) {char *file = params.datafile;uint32_t size;
tools/mkimage.h +8 -0
@@ -60,6 +60,7 @@ struct mkimage_params {int lflag;int vflag;int xflag; +int skipcpy;int os;int arch;int type;
@@ -122,6 +123,13 @@ struct image_type_params {int (*check_image_type) (uint8_t );/* This callback function will be executed if fflag is defined */ int (*fflag_handle) (struct mkimage_params *); +/* +* This callback function will be executed for variable size record +* It is expected to build this header in memory and return its length +* and a pointer to it +*/ +int (*vrec_header) (struct mkimage_params *, +struct image_type_params *);/* pointer to the next registered entry in linked list */ struct image_type_params *next; };
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH 2/3 mkimage: Add variable lenght header support
Dear Stefano Babic,
Quoted 10 lines · In message <[email protected]> you wrote:
Some images have not a header of fix lenght. The patch will be used for the generation of AIS images, because this header has a variable lenght. The patch adds also the parameter "-s" (skip) to not copy automatically the passed image file.
Signed-off-by Stefano Babic <[email protected]>--- tools/mkimage.c | 19 ++++++++++++++----- tools/mkimage.h | 8 ++++++++ 2 files changed, 22 insertions(+), 5 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 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 It's not an optical illusion, it just looks like one. -- Phil White
PATCH 3/3 mkimage: adding support for Davinci AIS image
In reply to Stefano BabicSome Davinci processors supports the Application Image Script (AIS) boot process. The patch adds the generation of the AIS image inside the mkimage tool to make possible to generate a bootable U-boot without external tools (TI Davinci AIS Generator).
--- common/image.c | 1 + include/image.h | 1 + tools/Makefile | 4 +- tools/aisimage.c | 453 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/aisimage.h | 97 ++++++++++++ tools/mkimage.c | 2 + tools/mkimage.h | 1 + 7 files changed, 558 insertions(+), 1 deletions(-) create mode 100644 tools/aisimage.c create mode 100644 tools/aisimage.h
common/image.c +1 -0
@@ -146,6 +146,7 @@ static const table_entry_t uimage_type[] = { { IH_TYPE_KWBIMAGE, "kwbimage", "Kirkwood Boot Image",}, { IH_TYPE_IMXIMAGE, "imximage", "Freescale i.MX Boot Image",}, { IH_TYPE_UBLIMAGE, "ublimage", "Davinci UBL image",}, + { IH_TYPE_AISIMAGE, "aisimage", "Davinci AIS image",}, { -1, "", "", }, };
include/image.h +1 -0
@@ -159,6 +159,7 @@#define IH_TYPE_IMXIMAGE 10/* Freescale IMXBoot Image */ #define IH_TYPE_UBLIMAGE 11/* Davinci UBL Image */ #define IH_TYPE_OMAPIMAGE 12/* TI OMAP Config Header Image */ +#define IH_TYPE_AISIMAGE 13/* TI Davinci AIS Image */ /* * Compression Types
tools/Makefile +3 -1
@@ -86,6 +86,7 @@ NOPED_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_XWAY_SWAP_BYTES) += xway-swap-bytes.o +NOPED_OBJ_FILES-y += aisimage.o NOPED_OBJ_FILES-y += kwbimage.o NOPED_OBJ_FILES-y += imximage.o NOPED_OBJ_FILES-y += omapimage.o
@@ -184,7 +185,8 @@ $(obj)xway-swap-bytes$(SFX): $(obj)xway-swap-bytes.o $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^ $(HOSTSTRIP) $@ -$(obj)mkimage$(SFX): $(obj)crc32.o \ +$(obj)mkimage$(SFX): $(obj)aisimage.o \ + $(obj)crc32.o \ $(obj)default_image.o \ $(obj)fit_image.o \ $(obj)image.o \
tools/aisimage.c new file +453 -0
453 lines not on this page · raw message
tools/aisimage.h new file +97 -0
97 lines not on this page · raw message
tools/mkimage.c +2 -0
@@ -162,6 +162,8 @@ main (int argc, char **argv)init_default_image_type ();/* Init Davinci UBL support */ init_ubl_image_type (); +/* Init Davinci AIS support */ +init_ais_image_type (); params.cmdname = *argv; params.addr = params.ep =0 ;
tools/mkimage.h +1 -0
@@ -147,6 +147,7 @@ void mkimage_register (struct image_type_params *tparams);* * Supported image types init functions */ +void init_ais_image_type (void );void init_kwb_image_type (void );void init_imx_image_type (void );void init_default_image_type (void );
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH 3/3 mkimage: adding support for Davinci AIS image
Dear Stefano Babic,
Quoted 7 lines · In message <[email protected]> you wrote:
Some Davinci processors supports the Application Image Script (AIS) boot process. The patch adds the generation of the AIS image inside the mkimage tool to make possible to generate a bootable U-boot without external tools (TI Davinci AIS Generator).
Signed-off-by Stefano Babic <[email protected]>
Quoted 11 lines
--- common/image.c | 1 + include/image.h | 1 + tools/Makefile | 4 +- tools/aisimage.c | 453 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/aisimage.h | 97 ++++++++++++ tools/mkimage.c | 2 + tools/mkimage.h | 1 + 7 files changed, 558 insertions(+), 1 deletions(-) create mode 100644 tools/aisimage.c create mode 100644 tools/aisimage.h
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 9 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 The Empire didn't encourage its subjects to go far away, in case they saw things that might disturb them. For the same reason it had built a wall around the entire country, patrolled by the Heavenly Guard whose main function was to tread heavily on the fingers of any inha- bitants who felt they might like to step outside for five minutes for a breath of fresh air. - Terry Pratchett, _Mort_
PATCH 3/3 mkimage: adding support for Davinci AIS image
Dear Stefano,
Quoted 8 lines · In message <[email protected]> I wrote:
Quoted 6 lines · In message <[email protected]> you wrote:
Some Davinci processors supports the Application Image Script (AIS) boot process. The patch adds the generation of the AIS image inside the mkimage tool to make possible to generate a bootable U-boot without external tools (TI Davinci AIS Generator).
Quoted 12 lines
Quoted 12 lines
Signed-off-by Stefano Babic <[email protected]>--- common/image.c | 1 + include/image.h | 1 + tools/Makefile | 4 +- tools/aisimage.c | 453 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/aisimage.h | 97 ++++++++++++ tools/mkimage.c | 2 + tools/mkimage.h | 1 + 7 files changed, 558 insertions(+), 1 deletions(-) create mode 100644 tools/aisimage.c create mode 100644 tools/aisimage.h
This commit causes compile warnings, for example:
-> MAKEALL TQM860L
Configuring for TQM860L board...aisimage.c: In function 'ais_insert_cmd_header':
aisimage.c:183:11: warning: variable 'len_cmd' set but not used [-Wunused-but-set-variable]
1929755f08be8d9779846a69fe2a9daf9eebb5db is the first bad commit commit 1929755f08be8d9779846a69fe2a9daf9eebb5db
Author: Stefano Babic <[email protected]> Date: Thu Sep 15 23:50:17 2011 +0000
mkimage: adding support for Davinci AIS image
I'm dropping this commit for now. Please fix and resubmit.
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 I think animal testing is a terrible idea; they get all nervous and give the wrong answers.
PATCH 1/3 mkimage: ublimage must return if the header is not verified
In reply to Stefano BabicHello Stefano,
Quoted 1 line · Stefano Babic
Each image handler must return a not-zero velue if the
^
valueQuoted 8 lines
header is not recognized to allow the main program to iterate to the next handler.
Signed-off-by Stefano Babic <[email protected]>CC Heiko Schocher <[email protected]>--- tools/ublimage.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
Beside of that:
Thanks for detecting!
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH v2 1/3 mkimage: ublimage must return if the header is not verified
In reply to Stefano BabicEach image handler must return a not-zero value if the header is not recognized to allow the main program to iterate to the next handler.
---
Changes since V1:
- correct commit message (Heiko Schocher)
tools/ublimage.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
tools/ublimage.c +5 -0
@@ -214,6 +214,11 @@ static int ublimage_check_image_types(uint8_t type)static int ublimage_verify_header (unsigned char *ptr,int image_size,struct mkimage_params *params) { +struct ubl_header *ubl_hdr = (struct ubl_header *)ptr; + +if ((ubl_hdr->magic &0xFFFFFF00 ) !=UBL_MAGIC_BASE ) +return -1 ; +return 0 ; }
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH v2 1/3 mkimage: ublimage must return if the header is not verified
Dear Stefano Babic,
Quoted 6 lines · In message <[email protected]> you wrote:
Each image handler must return a not-zero value if the header is not recognized to allow the main program to iterate to the next handler.
Signed-off-by Stefano Babic <[email protected]>CC Heiko Schocher <[email protected]>
Quoted 7 lines
---
Changes since V1:
- correct commit message (Heiko Schocher)tools/ublimage.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
Applied, thanks.
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 "Confound these ancestors.... They've stolen our best ideas!" - Ben Jonson
PATCH v2 3/3 mkimage: adding support for Davinci AIS image
In reply to Stefano BabicSome Davinci processors supports the Application Image Script (AIS) boot process. The patch adds the generation of the AIS image inside the mkimage tool to make possible to generate a bootable U-boot without external tools (TI Davinci AIS Generator).
---
Changes:
- removed warning in gcc 4.6 iwhen -Wunused-but-set-variable is set
- drop remained warnings raised by checkpatch
common/image.c | 1 + include/image.h | 1 + tools/Makefile | 4 +- tools/aisimage.c | 451 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/aisimage.h | 97 ++++++++++++ tools/mkimage.c | 2 + tools/mkimage.h | 1 + 7 files changed, 556 insertions(+), 1 deletions(-) create mode 100644 tools/aisimage.c create mode 100644 tools/aisimage.h
common/image.c +1 -0
@@ -146,6 +146,7 @@ static const table_entry_t uimage_type[] = { { IH_TYPE_KWBIMAGE, "kwbimage", "Kirkwood Boot Image",}, { IH_TYPE_IMXIMAGE, "imximage", "Freescale i.MX Boot Image",}, { IH_TYPE_UBLIMAGE, "ublimage", "Davinci UBL image",}, + { IH_TYPE_AISIMAGE, "aisimage", "Davinci AIS image",}, { -1, "", "", }, };
include/image.h +1 -0
@@ -159,6 +159,7 @@#define IH_TYPE_IMXIMAGE 10/* Freescale IMXBoot Image */ #define IH_TYPE_UBLIMAGE 11/* Davinci UBL Image */ #define IH_TYPE_OMAPIMAGE 12/* TI OMAP Config Header Image */ +#define IH_TYPE_AISIMAGE 13/* TI Davinci AIS Image */ /* * Compression Types
tools/Makefile +3 -1
@@ -86,6 +86,7 @@ NOPED_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_XWAY_SWAP_BYTES) += xway-swap-bytes.o +NOPED_OBJ_FILES-y += aisimage.o NOPED_OBJ_FILES-y += kwbimage.o NOPED_OBJ_FILES-y += imximage.o NOPED_OBJ_FILES-y += omapimage.o
@@ -184,7 +185,8 @@ $(obj)xway-swap-bytes$(SFX): $(obj)xway-swap-bytes.o $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^ $(HOSTSTRIP) $@ -$(obj)mkimage$(SFX): $(obj)crc32.o \ +$(obj)mkimage$(SFX): $(obj)aisimage.o \ + $(obj)crc32.o \ $(obj)default_image.o \ $(obj)fit_image.o \ $(obj)image.o \
tools/aisimage.c new file +451 -0
451 lines not on this page · raw message
tools/aisimage.h new file +97 -0
97 lines not on this page · raw message
tools/mkimage.c +2 -0
@@ -162,6 +162,8 @@ main (int argc, char **argv)init_default_image_type ();/* Init Davinci UBL support */ init_ubl_image_type (); +/* Init Davinci AIS support */ +init_ais_image_type (); params.cmdname = *argv; params.addr = params.ep =0 ;
tools/mkimage.h +1 -0
@@ -147,6 +147,7 @@ void mkimage_register (struct image_type_params *tparams);* * Supported image types init functions */ +void init_ais_image_type (void );void init_kwb_image_type (void );void init_imx_image_type (void );void init_default_image_type (void );
Signature · 1 line
1.7.1
PATCH v2 3/3 mkimage: adding support for Davinci AIS image
Dear Stefano Babic,
Quoted 15 lines · In message <[email protected]> you wrote:
Some Davinci processors supports the Application Image Script (AIS) boot process. The patch adds the generation of the AIS image inside the mkimage tool to make possible to generate a bootable U-boot without external tools (TI Davinci AIS Generator).
Signed-off-by Stefano Babic <[email protected]>CC Wolfgang Denk <[email protected]>---
Changes:
- removed warning in gcc 4.6 iwhen -Wunused-but-set-variable is set
- drop remained warnings raised by checkpatch
Quoted 10 lines
common/image.c | 1 + include/image.h | 1 + tools/Makefile | 4 +- tools/aisimage.c | 451 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/aisimage.h | 97 ++++++++++++ tools/mkimage.c | 2 + tools/mkimage.h | 1 + 7 files changed, 556 insertions(+), 1 deletions(-) create mode 100644 tools/aisimage.c create mode 100644 tools/aisimage.h
This doesn't apply any more - please rebase, and keep list sorted.
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 Felson's Law: To steal ideas from one person is plagiarism; to steal from many is research.
PATCH v2 3/3 mkimage: adding support for Davinci AIS image
Quoted 9 lines · Wolfgang Denk
Dear Stefano Babic,
Quoted 6 lines · In message <[email protected]> you wrote:
Some Davinci processors supports the Application Image Script (AIS) boot process. The patch adds the generation of the AIS image inside the mkimage tool to make possible to generate a bootable U-boot without external tools (TI Davinci AIS Generator).
Quoted 6 lines
Quoted 3 lines
Signed-off-by Stefano Babic <[email protected]>CC Wolfgang Denk <[email protected]>This doesn't apply any more - please rebase, and keep list sorted.
Sure - I think the list you mean is uimage_type[], right ?
Stefano
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-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================
PATCH v2 3/3 mkimage: adding support for Davinci AIS image
Dear Stefano Babic,
Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 2 lines
This doesn't apply any more - please rebase, and keep list sorted.
Sure - I think the list you mean is uimage_type[], right ?
Yes.
Best regards,
Wolfgang Denk
Signature · 4 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 If all you have is a hammer, everything looks like a nail.
PATCH v3 3/3 mkimage: adding support for Davinci AIS image
In reply to Stefano BabicSome Davinci processors supports the Application Image Script (AIS) boot process. The patch adds the generation of the AIS image inside the mkimage tool to make possible to generate a bootable U-boot without external tools (TI Davinci AIS Generator).
---
Changes since V2:
- rebased on mainline and sort uimage_type list (Wolfgang Denk)
Changes since V1:
- removed warning in gcc 4.6 iwhen -Wunused-but-set-variable is set
- drop remained warnings raised by checkpatch
common/image.c | 9 +- include/image.h | 1 + tools/Makefile | 4 +- tools/aisimage.c | 451 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/aisimage.h | 97 ++++++++++++ tools/mkimage.c | 2 + tools/mkimage.h | 1 + 7 files changed, 560 insertions(+), 5 deletions(-) create mode 100644 tools/aisimage.c create mode 100644 tools/aisimage.h
common/image.c +5 -4
@@ -130,19 +130,20 @@ static const table_entry_t uimage_os[] = { };static const table_entry_t uimage_type[] = { + {IH_TYPE_AISIMAGE ,"aisimage" ,"Davinci AIS image" ,}, {IH_TYPE_FILESYSTEM ,"filesystem" ,"Filesystem Image" , }, {IH_TYPE_FIRMWARE ,"firmware" ,"Firmware" , }, {IH_TYPE_FLATDT ,"flat_dt" ,"Flat Device Tree" , }, {IH_TYPE_KERNEL ,"kernel" ,"Kernel Image" , }, + {IH_TYPE_KWBIMAGE ,"kwbimage" ,"Kirkwood Boot Image" ,}, + {IH_TYPE_IMXIMAGE ,"imximage" ,"Freescale i.MX Boot Image" ,}, + {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_RAMDISK ,"ramdisk" ,"RAMDisk Image" , }, {IH_TYPE_SCRIPT ,"script" ,"Script" , }, {IH_TYPE_STANDALONE ,"standalone" ,"Standalone Program" , }, - {IH_TYPE_IMXIMAGE ,"imximage" ,"Freescale i.MX Boot Image" ,}, - {IH_TYPE_KWBIMAGE ,"kwbimage" ,"Kirkwood Boot Image" ,}, - {IH_TYPE_OMAPIMAGE ,"omapimage" ,"TI OMAP SPL With GP CH" ,}, {IH_TYPE_UBLIMAGE ,"ublimage" ,"Davinci UBL image" ,}, - {IH_TYPE_INVALID ,NULL ,"Invalid Image" , }, {-1 ,"" ,"" , }, };
include/image.h +1 -0
@@ -159,6 +159,7 @@#define IH_TYPE_IMXIMAGE 10/* Freescale IMXBoot Image */ #define IH_TYPE_UBLIMAGE 11/* Davinci UBL Image */ #define IH_TYPE_OMAPIMAGE 12/* TI OMAP Config Header Image */ +#define IH_TYPE_AISIMAGE 13/* TI Davinci AIS Image */ /* * Compression Types
tools/Makefile +3 -1
@@ -86,6 +86,7 @@ NOPED_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_XWAY_SWAP_BYTES) += xway-swap-bytes.o +NOPED_OBJ_FILES-y += aisimage.o NOPED_OBJ_FILES-y += kwbimage.o NOPED_OBJ_FILES-y += imximage.o NOPED_OBJ_FILES-y += omapimage.o
@@ -184,7 +185,8 @@ $(obj)xway-swap-bytes$(SFX): $(obj)xway-swap-bytes.o $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^ $(HOSTSTRIP) $@ -$(obj)mkimage$(SFX): $(obj)crc32.o \ +$(obj)mkimage$(SFX): $(obj)aisimage.o \ + $(obj)crc32.o \ $(obj)default_image.o \ $(obj)fit_image.o \ $(obj)image.o \
tools/aisimage.c new file +451 -0
451 lines not on this page · raw message
tools/aisimage.h new file +97 -0
97 lines not on this page · raw message
tools/mkimage.c +2 -0
@@ -162,6 +162,8 @@ main (int argc, char **argv)init_default_image_type ();/* Init Davinci UBL support */ init_ubl_image_type (); +/* Init Davinci AIS support */ +init_ais_image_type (); params.cmdname = *argv; params.addr = params.ep =0 ;
tools/mkimage.h +1 -0
@@ -147,6 +147,7 @@ void mkimage_register (struct image_type_params *tparams);* * Supported image types init functions */ +void init_ais_image_type (void );void init_kwb_image_type (void );void init_imx_image_type (void );void init_default_image_type (void );
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH v3 3/3 mkimage: adding support for Davinci AIS image
Dear Stefano Babic,
Quoted 18 lines · In message <[email protected]> you wrote:
Some Davinci processors supports the Application Image Script (AIS) boot process. The patch adds the generation of the AIS image inside the mkimage tool to make possible to generate a bootable U-boot without external tools (TI Davinci AIS Generator).
Signed-off-by Stefano Babic <[email protected]>CC Wolfgang Denk <[email protected]>---
Changes since V2:
- rebased on mainline and sortuimage_typelist (Wolfgang Denk)Changes since V1:
- removed warning in gcc 4.6 iwhen -Wunused-but-set-variable is set
- drop remained warnings raised by checkpatch
Quoted 10 lines
common/image.c | 9 +- include/image.h | 1 + tools/Makefile | 4 +- tools/aisimage.c | 451 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/aisimage.h | 97 ++++++++++++ tools/mkimage.c | 2 + tools/mkimage.h | 1 + 7 files changed, 560 insertions(+), 5 deletions(-) create mode 100644 tools/aisimage.c create mode 100644 tools/aisimage.h
Applied, thanks.
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
"Plan to throw one away. You will anyway."
- Fred Brooks, "The Mythical Man Month"PATCH v3 3/3 mkimage: adding support for Davinci AIS image
Quoted 25 lines · Wolfgang Denk
Dear Stefano Babic,
Quoted 22 lines · In message<[email protected]> you wrote:
Some Davinci processors supports the Application Image Script (AIS) boot process. The patch adds the generation of the AIS image inside the mkimage tool to make possible to generate a bootable U-boot without external tools (TI Davinci AIS Generator).
Signed-off-by Stefano Babic<[email protected]>CC Wolfgang Denk<[email protected]>---
Changes since V2:
- rebased on mainline and sortuimage_typelist (Wolfgang Denk)Changes since V1:
- removed warning in gcc 4.6 iwhen -Wunused-but-set-variable is set
- drop remained warnings raised by checkpatchcommon/image.c | 9 +- include/image.h | 1 + tools/Makefile | 4 +- tools/aisimage.c | 451 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
Hmm, using recent git head this results in
aisimage.c: In function ?aisimage_generate?:
aisimage.c:365: warning: ?tsize? may be used uninitialized in this function
for each board I build :(
E.g.
Configuring for omap3_evm board...aisimage.c: In function ?aisimage_generate?:
aisimage.c:365: warning: ?tsize? may be used uninitialized in this function
text data bss dec hex filename
256063 7512 259120 522695 7f9c7 ./u-boot
Dirk
PATCH v3 3/3 mkimage: adding support for Davinci AIS image
Am 29/10/2011 18:51, schrieb Dirk Behme:
Quoted 2 lines
Hmm, using recent git head this results in
Hi Remy,
Quoted 6 lines
aisimage.c: In function ?aisimage_generate?:
aisimage.c:365: warning: ?tsize? may be used uninitialized in this functionfor each board I build :(
Quoted 7 lines
E.g.
Configuring for
omap3_evmboard...aisimage.c: In function ?aisimage_generate?:
aisimage.c:365: warning: ?tsize? may be used uninitialized in this function
text data bss dec hex filename
256063 7512 259120 522695 7f9c7 ./u-boot
Apart from the fact that the tsize parameter is not needed anymore and I will fix it, can I ask you which toolchain and which gcc have you used ? I have tried with a very old gcc 4.2.2 (ELDK-4.2) and gcc 4.6.1 (ELDK-5.1). With the last one I get a warning, but for another reason:
./MAKEALL omap3_evm
Configuring for omap3_evm board...musb_hcd.c: In function 'submit_control_msg':
musb_hcd.c:851:6: warning: variable 'csr' set but not used [-Wunused-but-set-variable]
text data bss dec hex filename
250892 7472 259120 517484 7e56c ./u-boot
No warning with older gcc.
Stefano
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-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================
PATCH v3 3/3 mkimage: adding support for Davinci AIS image
Quoted 15 lines · stefano babic
Am 29/10/2011 18:51, schrieb Dirk Behme:
Quoted 2 lines
Hmm, using recent git head this results in
Hi Remy,
Quoted 8 lines
aisimage.c: In function ?aisimage_generate?:
aisimage.c:365: warning: ?tsize? may be used uninitialized in this functionfor each board I build :(
E.g.
Quoted 8 lines
Quoted 5 lines
Configuring for
omap3_evmboard...aisimage.c: In function ?aisimage_generate?:
aisimage.c:365: warning: ?tsize? may be used uninitialized in this function
text data bss dec hex filename
256063 7512 259120 522695 7f9c7 ./u-bootApart from the fact that the tsize parameter is not needed anymore and I will fix it, can I ask you which toolchain and which gcc have you used ?
Seems I still have the good old
gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203)
in my path.
Best regards
Dirk
Quoted 15 lines
I have tried with a very old gcc 4.2.2 (ELDK-4.2) and gcc 4.6.1 (ELDK-5.1). With the last one I get a warning, but for another reason:
./MAKEALL
omap3_evm
Configuring foromap3_evmboard...musb_hcd.c: In function 'submit_control_msg':
musb_hcd.c:851:6: warning: variable 'csr' set but not used [-Wunused-but-set-variable]
text data bss dec hex filename
250892 7472 259120 517484 7e56c ./u-bootNo warning with older gcc.
Stefano
PATCH v3 3/3 mkimage: adding support for Davinci AIS image
Dear Dirk Behme,
Quoted 6 lines · In message <[email protected]> you wrote:
Seems I still have the good old
gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203)
in my path.
IIRC, gcc 4.3.x has never been "good" in any way, especially not on ARM.
Best regards,
Wolfgang Denk
Signature · 4 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 If it has syntax, it isn't user friendly.