From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] cmd_bootm.c: Make bootz consume 'bootz' from argv, decrement argc
Date: Tue, 9 Jul 2013 15:34:56 -0400 [thread overview]
Message-ID: <1373398497-4658-1-git-send-email-trini@ti.com> (raw)
Like 'bootm', 'bootz' needs to consume 'bootz' so that the rest of the
state functions will work.
Signed-off-by: Tom Rini <trini@ti.com>
---
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;
--
1.7.9.5
next reply other threads:[~2013-07-09 19:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-09 19:34 Tom Rini [this message]
2013-07-09 19:34 ` [U-Boot] [PATCH 2/2] cmd_bootm.c: Make bootz handle BOOTM_STATE_FINDOTHER itself Tom Rini
2013-07-10 4:59 ` [U-Boot] [PATCH 1/2] cmd_bootm.c: Make bootz consume 'bootz' from argv, decrement argc Stephen Warren
2013-07-10 9:53 ` Simon Glass
2013-07-10 15:38 ` Stephen Warren
2013-07-10 13:19 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1373398497-4658-1-git-send-email-trini@ti.com \
--to=trini@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox