mkimage: Fix 'Unknown OMAP image type - 5'
PATCH v2 1/1 mkimage: Fix 'Unknown OMAP image type - 5'
From: Dirk Behme <[email protected]>
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.
---
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:
tools/omapimage.c | 1 - 1 file changed, 1 deletion(-)
tools/omapimage.c +0 -1
@@ -49,7 +49,6 @@ static int omapimage_check_image_types(uif (type ==IH_TYPE_OMAPIMAGE )return EXIT_SUCCESS ;else { -fprintf (stderr,"Unknown OMAP image type - %x" , type);return EXIT_FAILURE ; } }
PATCH v2 1/1 mkimage: Fix 'Unknown OMAP image type - 5'
Hi dirk,
Le 09/08/2011 19:52, Dirk Behme a ?crit :
Quoted 30 lines
From: Dirk Behme<[email protected]>
Using mkimage with e.g.
tools/mkimage-A arm -T firmware -O u-boot -d u-boot.bin foo.imggives 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_typeinimage_type_paramsis 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.
Quoted 6 lines
Signed-off-by Dirk Behme<[email protected]>CC John Rigby<[email protected]>CC Aneesh V<[email protected]>CC Sandeep Paulraj<[email protected]>---
Applied to u-boot-arm/master with Sandeep's agreement, thanks!
Amicalement,
Signature · 1 line
Albert.