public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Kumar Gala <galak@kernel.crashing.org>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH 6/9] [new uImage] Add autostart flag to bootm_headers structure
Date: Wed, 27 Feb 2008 21:51:48 -0600	[thread overview]
Message-ID: <1204170711-2057-7-git-send-email-galak@kernel.crashing.org> (raw)
In-Reply-To: <1204170711-2057-6-git-send-email-galak@kernel.crashing.org>

The autostart env variable was dropped as part of the initial new uImage
cleanup.  Add it back here so the arch specific code can decide if it
wants to really boot or not.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 common/cmd_bootm.c |    1 +
 common/image.c     |    6 ++++++
 include/image.h    |    2 ++
 3 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 92c18d0..92c2f4e 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -123,6 +123,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
 	memset ((void *)&images, 0, sizeof (images));
 	images.verify = getenv_verify();
+	images.autostart = getenv_autostart();
 	images.lmb = &lmb;
 
 	lmb_init(&lmb);
diff --git a/common/image.c b/common/image.c
index d4acb6b..4f2ff9c 100644
--- a/common/image.c
+++ b/common/image.c
@@ -126,6 +126,12 @@ int getenv_verify (void)
 	return (s && (*s == 'n')) ? 0 : 1;
 }
 
+int getenv_autostart (void)
+{
+	char *s = getenv ("autostart");
+	return (s && (*s == 'n')) ? 0 : 1;
+}
+
 void memmove_wd (void *to, void *from, size_t len, ulong chunksz)
 {
 #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
diff --git a/include/image.h b/include/image.h
index cb4acd8..5ce2ca4 100644
--- a/include/image.h
+++ b/include/image.h
@@ -204,6 +204,7 @@ typedef struct bootm_headers {
 	char		*fit_uname_fdt;	/* FDT blob node unit name */
 #endif
 	int		verify;		/* getenv("verify")[0] != 'n' */
+	int		autostart;	/* getenv("autostart")[0] != 'n' */
 	struct lmb	*lmb;		/* for memory mgmt */
 #endif
 } bootm_headers_t;
@@ -314,6 +315,7 @@ int image_check_dcrc (image_header_t *hdr);
 #ifndef USE_HOSTCC
 int image_check_dcrc_wd (image_header_t *hdr, ulong chunksize);
 int getenv_verify (void);
+int getenv_autostart (void);
 void memmove_wd (void *to, void *from, size_t len, ulong chunksz);
 #endif
 
-- 
1.5.4.1

  reply	other threads:[~2008-02-28  3:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-28  3:51 [U-Boot-Users] [PATCH 0/9] [new uImage] Add support for booting images at non-zero addresses Kumar Gala
2008-02-28  3:51 ` [U-Boot-Users] [PATCH 1/9] [new uImage] Don't pass kdb to ramdisk_high since we may not have one Kumar Gala
2008-02-28  3:51   ` [U-Boot-Users] [PATCH 2/9] [new uImage] ppc: Determine if we are booting an OF style Kumar Gala
2008-02-28  3:51     ` [U-Boot-Users] [PATCH 3/9] [new uImage] ppc: Re-order ramdisk/fdt handling sequence Kumar Gala
2008-02-28  3:51       ` [U-Boot-Users] [PATCH 4/9] [new uImage] rework error handling so common functions don't reset Kumar Gala
2008-02-28  3:51         ` [U-Boot-Users] [PATCH 5/9] [new uImage] Introduce lmb from linux kernel for memory mgmt of boot images Kumar Gala
2008-02-28  3:51           ` Kumar Gala [this message]
2008-02-28  3:51             ` [U-Boot-Users] [PATCH 7/9] [new uImage] Use lmb for bootm allocations Kumar Gala
2008-02-28  3:51               ` [U-Boot-Users] [PATCH 8/9] [new uImage] Provide ability to restrict region used for boot images Kumar Gala
2008-02-28  3:51                 ` [U-Boot-Users] [PATCH 9/9] [new uImage] Respect autostart setting in linux bootm Kumar Gala
2008-02-29 14:35                   ` Marian Balakowicz
2008-02-29 14:34                 ` [U-Boot-Users] [PATCH 8/9] [new uImage] Provide ability to restrict region used for boot images Marian Balakowicz
2008-02-29 14:26             ` [U-Boot-Users] [PATCH 6/9] [new uImage] Add autostart flag to bootm_headers structure Marian Balakowicz
2008-02-29 14:24         ` [U-Boot-Users] [PATCH 4/9] [new uImage] rework error handling so common functions don't reset Marian Balakowicz
2008-02-29 14:22     ` [U-Boot-Users] [PATCH 2/9] [new uImage] ppc: Determine if we are booting an OF style Marian Balakowicz
2008-02-29 14:21   ` [U-Boot-Users] [PATCH 1/9] [new uImage] Don't pass kdb to ramdisk_high since we may not have one Marian Balakowicz
2008-02-29 14:47 ` [U-Boot-Users] [PATCH 0/9] [new uImage] Add support for booting images at non-zero addresses Marian Balakowicz

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=1204170711-2057-7-git-send-email-galak@kernel.crashing.org \
    --to=galak@kernel.crashing.org \
    --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