public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] mkimage: Fix 'Unknown OMAP image type - 5'
@ 2011-08-09 17:52 Dirk Behme
  2011-08-20 15:32 ` Albert ARIBAUD
  0 siblings, 1 reply; 2+ messages in thread
From: Dirk Behme @ 2011-08-09 17:52 UTC (permalink / raw)
  To: u-boot

From: Dirk Behme <dirk.behme@googlemail.com>

Using mkimage with e.g.

tools/mkimage -A arm -T firmware -O u-boot -d u-boot.bin foo.img

gives a warning

"Unknown OMAP image type - 5"

while it seems that the image itself is created successfully.

This does come from the patch "mkimage: Add OMAP boot image support".

The method check_image_type in image_type_params is supposed to just
return success or failure.  However, for omap it also calls fprintf:

static int omapimage_check_image_types(uint8_t type)
{
	if (type == IH_TYPE_OMAPIMAGE)
		return EXIT_SUCCESS;
	else {
		fprintf(stderr, "Unknown OMAP image type - %x", type);
		return EXIT_FAILURE;
	}
}

All the other image checkers and no others have this, so the fix is to
simply remove the fprintf.

Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
CC: John Rigby <john.rigby@linaro.org>
CC: Aneesh V <aneesh@ti.com>
CC: Sandeep Paulraj <s-paulraj@ti.com>

---

Changes in v2: Instead of reordering the init sequence, remove
the fprintf().

This is reproducable with the recent mainline mkimage where the
patch "mkimage: Add OMAP boot image support" is applied:

http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=commit;h=3decb14abe76d244ba98fd158ef95f89e7e37d70

 tools/omapimage.c |    1 -
 1 file changed, 1 deletion(-)

Index: u-boot.git/tools/omapimage.c
===================================================================
--- u-boot.git.orig/tools/omapimage.c
+++ u-boot.git/tools/omapimage.c
@@ -49,7 +49,6 @@ static int omapimage_check_image_types(u
 	if (type == IH_TYPE_OMAPIMAGE)
 		return EXIT_SUCCESS;
 	else {
-		fprintf(stderr, "Unknown OMAP image type - %x", type);
 		return EXIT_FAILURE;
 	}
 }

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH v2] mkimage: Fix 'Unknown OMAP image type - 5'
  2011-08-09 17:52 [U-Boot] [PATCH v2] mkimage: Fix 'Unknown OMAP image type - 5' Dirk Behme
@ 2011-08-20 15:32 ` Albert ARIBAUD
  0 siblings, 0 replies; 2+ messages in thread
From: Albert ARIBAUD @ 2011-08-20 15:32 UTC (permalink / raw)
  To: u-boot

Hi dirk,

Le 09/08/2011 19:52, Dirk Behme a ?crit :
> From: Dirk Behme<dirk.behme@googlemail.com>
>
> Using mkimage with e.g.
>
> tools/mkimage -A arm -T firmware -O u-boot -d u-boot.bin foo.img
>
> gives a warning
>
> "Unknown OMAP image type - 5"
>
> while it seems that the image itself is created successfully.
>
> This does come from the patch "mkimage: Add OMAP boot image support".
>
> The method check_image_type in image_type_params is supposed to just
> return success or failure.  However, for omap it also calls fprintf:
>
> static int omapimage_check_image_types(uint8_t type)
> {
> 	if (type == IH_TYPE_OMAPIMAGE)
> 		return EXIT_SUCCESS;
> 	else {
> 		fprintf(stderr, "Unknown OMAP image type - %x", type);
> 		return EXIT_FAILURE;
> 	}
> }
>
> All the other image checkers and no others have this, so the fix is to
> simply remove the fprintf.
>
> Signed-off-by: Dirk Behme<dirk.behme@googlemail.com>
> CC: John Rigby<john.rigby@linaro.org>
> CC: Aneesh V<aneesh@ti.com>
> CC: Sandeep Paulraj<s-paulraj@ti.com>
>
> ---

Applied to u-boot-arm/master with Sandeep's agreement, thanks!

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-20 15:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-09 17:52 [U-Boot] [PATCH v2] mkimage: Fix 'Unknown OMAP image type - 5' Dirk Behme
2011-08-20 15:32 ` Albert ARIBAUD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox