From patchwork Mon May 23 18:29:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew McClintock X-Patchwork-Id: 97028 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 E5D94B6FA0 for ; Tue, 24 May 2011 04:44:36 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6664C28116; Mon, 23 May 2011 20:44: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 0hx0uU3bEtoh; Mon, 23 May 2011 20:44:33 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 269D928107; Mon, 23 May 2011 20:44:31 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AC7D228107 for ; Mon, 23 May 2011 20:44:28 +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 sGWTdnIns+ZN for ; Mon, 23 May 2011 20:44:27 +0200 (CEST) X-Greylist: delayed 907 seconds by postgrey-1.27 at theia; Mon, 23 May 2011 20:44:25 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 AM1EHSOBE002.bigfish.com (am1ehsobe002.messaging.microsoft.com [213.199.154.205]) by theia.denx.de (Postfix) with ESMTPS id 04C95280FE for ; Mon, 23 May 2011 20:44:25 +0200 (CEST) Received: from mail65-am1-R.bigfish.com (10.3.201.241) by AM1EHSOBE002.bigfish.com (10.3.204.22) with Microsoft SMTP Server id 14.1.225.22; Mon, 23 May 2011 18:29:18 +0000 Received: from mail65-am1 (localhost.localdomain [127.0.0.1]) by mail65-am1-R.bigfish.com (Postfix) with ESMTP id 43F139C82FE for ; Mon, 23 May 2011 18:29:18 +0000 (UTC) X-SpamScore: 3 X-BigFish: VS3(zzzz1202h1082kzz8275bhz2dh2a8h668h839h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail65-am1 (localhost.localdomain [127.0.0.1]) by mail65-am1 (MessageSwitch) id 130617535758338_23190; Mon, 23 May 2011 18:29:17 +0000 (UTC) Received: from AM1EHSMHS018.bigfish.com (unknown [10.3.201.243]) by mail65-am1.bigfish.com (Postfix) with ESMTP id 06A642E004D for ; Mon, 23 May 2011 18:29:17 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by AM1EHSMHS018.bigfish.com (10.3.206.21) with Microsoft SMTP Server (TLS) id 14.1.225.22; Mon, 23 May 2011 18:29:16 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server id 14.1.270.2; Mon, 23 May 2011 13:29:15 -0500 Received: from right.am.freescale.net (right.am.freescale.net [10.82.193.13]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id p4NITD7m026776 for ; Mon, 23 May 2011 13:29:14 -0500 (CDT) Received: from right.am.freescale.net (localhost.localdomain [127.0.0.1]) by right.am.freescale.net (8.14.4/8.14.4) with ESMTP id p4NITDkn003016; Mon, 23 May 2011 13:29:13 -0500 Received: (from mattsm@localhost) by right.am.freescale.net (8.14.4/8.14.4/Submit) id p4NITDMT003015; Mon, 23 May 2011 13:29:13 -0500 From: Matthew McClintock To: Date: Mon, 23 May 2011 13:29:13 -0500 Message-ID: <1306175353-2983-3-git-send-email-msm@freescale.com> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1306175353-2983-2-git-send-email-msm@freescale.com> References: <1306175353-2983-1-git-send-email-msm@freescale.com> <1306175353-2983-2-git-send-email-msm@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.net Cc: Matthew McClintock Subject: [U-Boot] [PATCH 3/3] common/cmd_ximg.c: add ifdef protection for gzip uncompression 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Print a message if we do not have the ability to uncompress a gzip image. Before, u-boot would just assume the routines were available Signed-off-by: Matthew McClintock --- common/cmd_ximg.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/common/cmd_ximg.c b/common/cmd_ximg.c index dceb975..2ec7ba4 100644 --- a/common/cmd_ximg.c +++ b/common/cmd_ximg.c @@ -216,12 +216,18 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) #endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */ break; case IH_COMP_GZIP: +#ifdef CONFIG_GZIP printf (" Uncompressing part %d ... ", part); if (gunzip ((void *) dest, unc_len, (uchar *) data, &len) != 0) { puts ("GUNZIP ERROR - image not loaded\n"); return 1; } +#else + printf(" gzip decompression not supported in this" + " build!\n"); + return 1; +#endif break; #if defined(CONFIG_BZIP2) case IH_COMP_BZIP2: