From: Kumar Gala Date: Thu, 28 Feb 2008 03:51:48 +0000 (-0600) Subject: [new uImage] Add autostart flag to bootm_headers structure X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=f5614e7926863bf0225ec860d9b319741a9c4004;p=u-boot.git [new uImage] Add autostart flag to bootm_headers structure 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 Acked-by: Marian Balakowicz --- diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 92c18d059d..92c2f4e83a 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 d4acb6b5be..4f2ff9c977 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 cb4acd8a90..5ce2ca406c 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