]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
[new uImage] Add autostart flag to bootm_headers structure
authorKumar Gala <galak@kernel.crashing.org>
Thu, 28 Feb 2008 03:51:48 +0000 (21:51 -0600)
committerMarian Balakowicz <m8@semihalf.com>
Fri, 29 Feb 2008 12:15:56 +0000 (13:15 +0100)
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>
Acked-by: Marian Balakowicz <m8@semihalf.com>
common/cmd_bootm.c
common/image.c
include/image.h

index 92c18d059d72543f5b42d099ae11597d917efd53..92c2f4e83aa02eb47ac039b9856a202114b861b6 100644 (file)
@@ -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);
index d4acb6b5bee0662daf35a99ae6af09fb859afa4c..4f2ff9c97719328b86603fa4c2fa02afedb68a77 100644 (file)
@@ -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)
index cb4acd8a907e39b3f762f997763a027e0f1268f2..5ce2ca406cc2356b5d33fa15d3b167b5b2c38d26 100644 (file)
@@ -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