Skip to contentSkip to conversation

mkimage: Add Freescale imx Boot Image support (imximage)

PATCH New Stefano Babic 2 participants 2 messages Jan 20, 2010 – Jan 25, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/11 mkimage: Add Freescale imx Boot Image support (imximage)

This patch adds support for "imximage" (MX Boot Image) to the mkimage utility. The imximage is used on the Freescales's MX.25, MX.35 and MX.51 processors.

Further details under doc/README.imximage.

This patch was tested on a Freescale mx51evk board.

---
 Makefile            |    4 +
 common/image.c      |    1 +
 doc/README.imximage |  188 +++++++++++++++++++++++++++++
 include/image.h     |    1 +
 tools/Makefile      |    2 +
 tools/imximage.c    |  324 +++++++++++++++++++++++++++++++++++++++++++++++++++
 tools/imximage.h    |  105 +++++++++++++++++
 tools/mkimage.c     |    2 +
 tools/mkimage.h     |    1 +
 9 files changed, 628 insertions(+), 0 deletions(-)
 create mode 100644 doc/README.imximage
 create mode 100644 tools/imximage.c
 create mode 100644 tools/imximage.h
Makefile +4 -0
index ed6156f..365f87f 100644
@@ -324,6 +324,10 @@ $(obj)u-boot.img:	$(obj)u-boot.bin
 			sed -e 's/"[	 ]*$$/ for $(BOARD) board"/') \
 		-d $< $@
 
+$(obj)u-boot.imx:       $(obj)u-boot.bin
+		$(obj)tools/mkimage -n $(IMX_CONFIG) -T imximage \
+		-e $(TEXT_BASE) -d $< $@
+
 $(obj)u-boot.kwb:       $(obj)u-boot.bin
 		$(obj)tools/mkimage -n $(KWD_CONFIG) -T kwbimage \
 		-a $(TEXT_BASE) -e $(TEXT_BASE) -d $< $@
common/image.c +1 -0
index 82e7aa4..9e49713 100644
@@ -140,6 +140,7 @@ static table_entry_t uimage_type[] = {
 	{	IH_TYPE_STANDALONE, "standalone", "Standalone Program", },
 	{	IH_TYPE_FLATDT,     "flat_dt",    "Flat Device Tree",	},
 	{	IH_TYPE_KWBIMAGE,   "kwbimage",   "Kirkwood Boot Image",},
+	{	IH_TYPE_IMXIMAGE,   "imximage",   "Freescale i.MX Boot Image",},
 	{	-1,		    "",		  "",			},
 };
 
doc/README.imximage new file +188 -0

188 lines not on this page · raw message

include/image.h +1 -0
index d2e78fe..3e959de 100644
@@ -156,6 +156,7 @@
 #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		*/
+#define IH_TYPE_IMXIMAGE	10	/* Freescale IMXBoot Image	*/
 
 /*
  * Compression Types
tools/Makefile +2 -0
index 5b8c3c3..73640e6 100644
@@ -73,6 +73,7 @@ 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
 NOPED_OBJ_FILES-y += kwbimage.o
+NOPED_OBJ_FILES-y += imximage.o
 NOPED_OBJ_FILES-y += mkimage.o
 OBJ_FILES-$(CONFIG_NETCONSOLE) += ncb.o
 NOPED_OBJ_FILES-y += os_support.o
@@ -158,6 +159,7 @@ $(obj)mkimage$(SFX):	$(obj)crc32.o \
 			$(obj)default_image.o \
 			$(obj)fit_image.o \
 			$(obj)image.o \
+			$(obj)imximage.o \
 			$(obj)kwbimage.o \
 			$(obj)md5.o \
 			$(obj)mkimage.o \
tools/imximage.c new file +324 -0

324 lines not on this page · raw message

tools/imximage.h new file +105 -0

105 lines not on this page · raw message

tools/mkimage.c +2 -0
index 1bed933..cf4b754 100644
@@ -150,6 +150,8 @@ main (int argc, char **argv)
 
 	/* Init Kirkwood Boot image generation/list support */
 	init_kwb_image_type ();
+	/* Init Freescale imx Boot image generation/list support */
+	init_imx_image_type ();
 	/* Init FIT image generation/list support */
 	init_fit_image_type ();
 	/* Init Default image generation/list support */
tools/mkimage.h +1 -0
index ec67336..9033a7d 100644
@@ -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_imx_image_type (void);
 void init_default_image_type (void);
 void init_fit_image_type (void);
 
Signature · 1 line
1.6.3.3
#1 lore raw

PATCH v3 1/11 mkimage: Add Freescale imx Boot Image support (imximage)

Dear Stefano Babic,

Quoted 9 lines · In message <[email protected]> you wrote:

This patch adds support for "imximage" (MX Boot Image) to the mkimage utility. The imximage is used on the Freescales's MX.25, MX.35 and MX.51 processors.

Further details under doc/README.imximage.

This patch was tested on a Freescale mx51evk board.

Quoted 14 lines
---
 Makefile            |    4 +
 common/image.c      |    1 +
 doc/README.imximage |  188 +++++++++++++++++++++++++++++
 include/image.h     |    1 +
 tools/Makefile      |    2 +
 tools/imximage.c    |  324 +++++++++++++++++++++++++++++++++++++++++++++++++++
 tools/imximage.h    |  105 +++++++++++++++++
 tools/mkimage.c     |    2 +
 tools/mkimage.h     |    1 +
 9 files changed, 628 insertions(+), 0 deletions(-)
 create mode 100644 doc/README.imximage
 create mode 100644 tools/imximage.c
 create mode 100644 tools/imximage.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
If A equals success, then the formula is A = X + Y + Z. X is work.  Y
is play. Z is keep your mouth shut.                 - Albert Einstein