From patchwork Thu Nov 28 09:51:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: miao.yan@windriver.com X-Patchwork-Id: 294837 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 54B972C00A7 for ; Thu, 28 Nov 2013 20:52:13 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DBA9B4BE43; Thu, 28 Nov 2013 10:52:09 +0100 (CET) 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 eY7ps27lDerA; Thu, 28 Nov 2013 10:52:09 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3EDA34BE57; Thu, 28 Nov 2013 10:52:04 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0C5174BE44 for ; Thu, 28 Nov 2013 10:51:56 +0100 (CET) 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 TFtSWB0l4CBF for ; Thu, 28 Nov 2013 10:51:51 +0100 (CET) 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.windriver.com (mail.windriver.com [147.11.1.11]) by theia.denx.de (Postfix) with ESMTPS id 627EE4BE3F for ; Thu, 28 Nov 2013 10:51:45 +0100 (CET) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail.windriver.com (8.14.5/8.14.5) with ESMTP id rAS9phuo029083 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Thu, 28 Nov 2013 01:51:43 -0800 (PST) Received: from myan-OptiPlex-9010.corp.ad.wrs.com (128.224.162.147) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.2.347.0; Thu, 28 Nov 2013 01:51:43 -0800 From: myan To: Date: Thu, 28 Nov 2013 17:51:36 +0800 Message-ID: <1385632300-23206-1-git-send-email-miao.yan@windriver.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1379417643-6106-2-git-send-email-miao.yan@windriver.com> References: <1379417643-6106-2-git-send-email-miao.yan@windriver.com> MIME-Version: 1.0 X-Originating-IP: [128.224.162.147] Subject: [U-Boot] [PATCH v3 1/5] common/cmd_bootm.c: seperate do_bootm_vxworks related code from CONFIG_CMD_ELF. 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Miao Yan do_bootm_vxworks now is available under the configuration option CONFIG_BOOTM_VXWORKS, thus aligned with other operating systems that supported by bootm command. The bootvx command still depneds on CONFIG_CMD_ELF. Signed-off-by: Miao Yan --- Changes: v2->v3: rebase to master: d19ad726bcd5d9106f7ba9c750462fcc369f1020 v1->v2: none common/cmd_bootm.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index ba73f57..881370d 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -120,8 +120,10 @@ static boot_os_fn do_bootm_ose; #if defined(CONFIG_BOOTM_PLAN9) static boot_os_fn do_bootm_plan9; #endif -#if defined(CONFIG_CMD_ELF) +#if defined(CONFIG_BOOTM_VXWORKS) static boot_os_fn do_bootm_vxworks; +#endif +#if defined(CONFIG_CMD_ELF) static boot_os_fn do_bootm_qnxelf; int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); int do_bootelf(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); @@ -149,8 +151,10 @@ static boot_os_fn *boot_os[] = { #if defined(CONFIG_BOOTM_PLAN9) [IH_OS_PLAN9] = do_bootm_plan9, #endif -#if defined(CONFIG_CMD_ELF) +#if defined(CONFIG_BOOTM_VXWORKS) [IH_OS_VXWORKS] = do_bootm_vxworks, +#endif +#if defined(CONFIG_CMD_ELF) [IH_OS_QNX] = do_bootm_qnxelf, #endif #ifdef CONFIG_INTEGRITY @@ -1678,7 +1682,7 @@ static int do_bootm_plan9(int flag, int argc, char * const argv[], } #endif /* CONFIG_BOOTM_PLAN9 */ -#if defined(CONFIG_CMD_ELF) +#if defined(CONFIG_BOOTM_VXWORKS) static int do_bootm_vxworks(int flag, int argc, char * const argv[], bootm_headers_t *images) { @@ -1696,11 +1700,16 @@ static int do_bootm_vxworks(int flag, int argc, char * const argv[], sprintf(str, "%lx", images->ep); /* write entry-point into string */ setenv("loadaddr", str); + +#if defined(CONFIG_CMD_ELF) do_bootvx(NULL, 0, 0, NULL); +#endif return 1; } +#endif +#if defined(CONFIG_CMD_ELF) static int do_bootm_qnxelf(int flag, int argc, char * const argv[], bootm_headers_t *images) {