From patchwork Tue Aug 9 17:52:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dirk Behme X-Patchwork-Id: 109264 X-Patchwork-Delegate: albert.aribaud@free.fr Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id B1359B6F00 for ; Wed, 10 Aug 2011 03:53:43 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F3C53281A4; Tue, 9 Aug 2011 19:53:39 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lcBYWh7laOeO; Tue, 9 Aug 2011 19:53:39 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4DB2D28184; Tue, 9 Aug 2011 19:53:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E11D928184 for ; Tue, 9 Aug 2011 19:53:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2o7-hIJUff0Z for ; Tue, 9 Aug 2011 19:53:33 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ew0-f44.google.com (mail-ew0-f44.google.com [209.85.215.44]) by theia.denx.de (Postfix) with ESMTPS id 0EDA02817B for ; Tue, 9 Aug 2011 19:53:31 +0200 (CEST) Received: by ewy19 with SMTP id 19so172372ewy.3 for ; Tue, 09 Aug 2011 10:53:31 -0700 (PDT) Received: by 10.213.25.201 with SMTP id a9mr1253358ebc.70.1312912410905; Tue, 09 Aug 2011 10:53:30 -0700 (PDT) Received: from asterix.localdomain (p5B04BC6E.dip.t-dialin.net [91.4.188.110]) by mx.google.com with ESMTPS id v20sm79317eeh.46.2011.08.09.10.53.29 (version=SSLv3 cipher=OTHER); Tue, 09 Aug 2011 10:53:30 -0700 (PDT) From: Dirk Behme To: u-boot@lists.denx.de Date: Tue, 9 Aug 2011 19:52:57 +0200 Message-Id: <1312912377-12652-1-git-send-email-dirk.behme@gmail.com> X-Mailer: git-send-email 1.7.3.2 Subject: [U-Boot] [PATCH v2] mkimage: Fix 'Unknown OMAP image type - 5' X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Dirk Behme 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 CC: John Rigby CC: Aneesh V CC: Sandeep Paulraj --- 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; } }