From patchwork Tue Jul 9 19:34:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 257860 X-Patchwork-Delegate: trini@ti.com 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 72C9F2C0098 for ; Wed, 10 Jul 2013 05:35:28 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B7A4D4A050; Tue, 9 Jul 2013 21:35:25 +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 n22l1ZyANJSI; Tue, 9 Jul 2013 21:35:25 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6C47C4A046; Tue, 9 Jul 2013 21:35:24 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B92524A039 for ; Tue, 9 Jul 2013 21:35:19 +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 0dTwMAo7V8wK for ; Tue, 9 Jul 2013 21:35:13 +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-gh0-f173.google.com (mail-gh0-f173.google.com [209.85.160.173]) by theia.denx.de (Postfix) with ESMTPS id 894244A025 for ; Tue, 9 Jul 2013 21:35:07 +0200 (CEST) Received: by mail-gh0-f173.google.com with SMTP id g16so2145124ghb.18 for ; Tue, 09 Jul 2013 12:35:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=pYRZimsWOwwByp30dlIDqwD1aHEzHZOtoBR6NRYadQI=; b=Z3WcX4jNsR3kWZTQgWEydxkCAMWoU+WSUc8c/ISFYJDJoCTT1p9IY8E2/vc5bwbkKk LI0dwSmKUQIfgrzvF6Zra8MJjhUQYlKy2EzaUPHXOI63F146EDFqL4tS7U3FarPWIrUk +/QMeS4fBUdFP04Rjtj+wBUmJgEFGpxpkvwtL+hEFznxCCrNi5r+dvUJyByI0zh8Xcsn Th9c1iyjP35Iy6xPsAbpFOWUAVlYREBOs2D8jylq/yEE6KYRErPggr8ms1bpR8mzHISJ pEDImuXzTCs4ddz80hrA4F8YaS2l7ELJz9tL3QeS2xy5EvUnoqaPifj+vCm8Xu8Id0x+ eq/g== X-Received: by 10.236.139.67 with SMTP id b43mr15848150yhj.170.1373398505016; Tue, 09 Jul 2013 12:35:05 -0700 (PDT) Received: from localhost.localdomain (cpe-065-184-250-089.ec.res.rr.com. [65.184.250.89]) by mx.google.com with ESMTPSA id 66sm46822258yhe.20.2013.07.09.12.35.02 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Jul 2013 12:35:04 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Tue, 9 Jul 2013 15:34:56 -0400 Message-Id: <1373398497-4658-1-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.9.5 Subject: [U-Boot] [PATCH 1/2] cmd_bootm.c: Make bootz consume 'bootz' from argv, decrement argc X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 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 Like 'bootm', 'bootz' needs to consume 'bootz' so that the rest of the state functions will work. Signed-off-by: Tom Rini Tested-by: Stephen Warren --- common/cmd_bootm.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index d0ad80f..3a899bc 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -1763,12 +1763,12 @@ static int bootz_start(cmd_tbl_t *cmdtp, int flag, int argc, images, 1); /* Setup Linux kernel zImage entry point */ - if (argc < 2) { + if (!argc) { images->ep = load_addr; debug("* kernel: default image load address = 0x%08lx\n", load_addr); } else { - images->ep = simple_strtoul(argv[1], NULL, 16); + images->ep = simple_strtoul(argv[0], NULL, 16); debug("* kernel: cmdline image address = 0x%08lx\n", images->ep); } @@ -1779,16 +1779,24 @@ static int bootz_start(cmd_tbl_t *cmdtp, int flag, int argc, lmb_reserve(&images->lmb, images->ep, zi_end - zi_start); - ret = do_bootm_states(cmdtp, flag, argc, argv, BOOTM_STATE_FINDOTHER, - images, 1); + if (bootm_find_ramdisk(flag, argc, argv)) + return 1; - return ret; +#if defined(CONFIG_OF_LIBFDT) + if (bootm_find_fdt(flag, argc, argv)) + return 1; +#endif + + return 0; } int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int ret; + /* Consume 'bootz' */ + argc--; argv++; + if (bootz_start(cmdtp, flag, argc, argv, &images)) return 1;