From patchwork Tue Jan 2 21:27:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Vadot X-Patchwork-Id: 854769 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zB6bc26z8z9s9Y for ; Wed, 3 Jan 2018 08:27:40 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id DE225C21DBA; Tue, 2 Jan 2018 21:27:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4D0E7C21C2B; Tue, 2 Jan 2018 21:27:28 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 626EDC21C2B; Tue, 2 Jan 2018 21:27:26 +0000 (UTC) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by lists.denx.de (Postfix) with ESMTPS id 15343C21C29 for ; Tue, 2 Jan 2018 21:27:26 +0000 (UTC) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id 48ee64a2 for ; Tue, 2 Jan 2018 22:27:25 +0100 (CET) Received: from arcadia.home.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id ac5ade1b TLS version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO for ; Tue, 2 Jan 2018 22:27:25 +0100 (CET) Received: from manu (uid 1001) (envelope-from manu@bidouilliste.org) id 75005 by arcadia.home.blih.net (DragonFly Mail Agent v0.11); Tue, 02 Jan 2018 22:27:24 +0100 From: Emmanuel Vadot To: bmeng.cn@gmail.com, philipp.tomsich@theobroma-systems.com, sjg@chromium.org Date: Tue, 2 Jan 2018 22:27:13 +0100 Message-Id: <20180102212714.58450-1-manu@freebsd.org> X-Mailer: git-send-email 2.15.1 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 1/2] cmd: go: Make do_go available to outside boot.c X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Some commands (like sysboot) might want to call go as they can encounter a raw binary. Make do_go callable for everyone. Signed-off-by: Emmanuel Vadot --- cmd/boot.c | 2 +- include/command.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/boot.c b/cmd/boot.c index 72f2cf362d..5691c5f883 100644 --- a/cmd/boot.c +++ b/cmd/boot.c @@ -22,7 +22,7 @@ unsigned long do_go_exec(ulong (*entry)(int, char * const []), int argc, return entry (argc, argv); } -static int do_go(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_go(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr, rc; int rcode = 0; diff --git a/include/command.h b/include/command.h index 767cabb3df..377e2eadd4 100644 --- a/include/command.h +++ b/include/command.h @@ -105,6 +105,10 @@ extern int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); extern int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); +#ifdef CONFIG_CMD_GO +extern int do_go(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); +#endif + extern int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc, char *const argv[]); From patchwork Tue Jan 2 21:27:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Vadot X-Patchwork-Id: 854773 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zB6cL119Kz9s9Y for ; Wed, 3 Jan 2018 08:28:16 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 6B680C21DE9; Tue, 2 Jan 2018 21:27:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 0636FC21C2B; Tue, 2 Jan 2018 21:27:52 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 91B9CC21DE8; Tue, 2 Jan 2018 21:27:37 +0000 (UTC) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by lists.denx.de (Postfix) with ESMTPS id CB152C21DB5 for ; Tue, 2 Jan 2018 21:27:33 +0000 (UTC) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id 889a2f66 for ; Tue, 2 Jan 2018 22:27:32 +0100 (CET) Received: from arcadia.home.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id a6252f8c TLS version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO for ; Tue, 2 Jan 2018 22:27:30 +0100 (CET) Received: from manu (uid 1001) (envelope-from manu@bidouilliste.org) id 7500b by arcadia.home.blih.net (DragonFly Mail Agent v0.11); Tue, 02 Jan 2018 22:27:30 +0100 From: Emmanuel Vadot To: bmeng.cn@gmail.com, philipp.tomsich@theobroma-systems.com, sjg@chromium.org Date: Tue, 2 Jan 2018 22:27:14 +0100 Message-Id: <20180102212714.58450-2-manu@freebsd.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180102212714.58450-1-manu@freebsd.org> References: <20180102212714.58450-1-manu@freebsd.org> Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 2/2] sysboot: Call bootm booti bootz then go on label_boot X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" As do_bootm/do_booti/do_bootz will not return if the boot succeded, always call them if enable by the config. Also add a fallback to go if the binary is a raw one. Signed-off-by: Emmanuel Vadot --- cmd/pxe.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cmd/pxe.c b/cmd/pxe.c index 7043ad11fd..0ca6a964bc 100644 --- a/cmd/pxe.c +++ b/cmd/pxe.c @@ -796,12 +796,14 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label) do_bootm(cmdtp, 0, bootm_argc, bootm_argv); #ifdef CONFIG_CMD_BOOTI /* Try booting an AArch64 Linux kernel image */ - else - do_booti(cmdtp, 0, bootm_argc, bootm_argv); -#elif defined(CONFIG_CMD_BOOTZ) + do_booti(cmdtp, 0, bootm_argc, bootm_argv); +#endif +#if defined(CONFIG_CMD_BOOTZ) /* Try booting a Image */ - else - do_bootz(cmdtp, 0, bootm_argc, bootm_argv); + do_bootz(cmdtp, 0, bootm_argc, bootm_argv); +#endif +#if defined(CONFIG_CMD_GO) + do_go(cmdtp, 0, bootm_argc, bootm_argv); #endif unmap_sysmem(buf); return 1;