[U-Boot-Users] [PATCH 9/9] [new uImage] Respect autostart setting in linux bootm
Kumar Gala
galak at kernel.crashing.org
Wed Feb 20 05:03:51 CET 2008
Signed-off-by: Kumar Gala <galak at kernel.crashing.org>
---
lib_arm/bootm.c | 3 +++
lib_avr32/bootm.c | 3 +++
lib_blackfin/bootm.c | 3 +++
lib_i386/bootm.c | 3 +++
lib_m68k/bootm.c | 5 ++++-
lib_microblaze/bootm.c | 3 +++
lib_mips/bootm.c | 3 +++
lib_nios2/bootm.c | 3 +++
lib_ppc/bootm.c | 5 ++++-
lib_sh/bootm.c | 3 +++
10 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/lib_arm/bootm.c b/lib_arm/bootm.c
index c850ae3..cc05416 100644
--- a/lib_arm/bootm.c
+++ b/lib_arm/bootm.c
@@ -113,6 +113,9 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
setup_end_tag (bd);
#endif
+ if (!autostart)
+ return ;
+
/* we assume that the kernel is in place */
printf ("\nStarting kernel ...\n\n");
diff --git a/lib_avr32/bootm.c b/lib_avr32/bootm.c
index 8bfd2b5..e64daa3 100644
--- a/lib_avr32/bootm.c
+++ b/lib_avr32/bootm.c
@@ -202,6 +202,9 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
params = setup_ethernet_tags(params);
setup_end_tag(params);
+ if (!autostart)
+ return ;
+
printf("\nStarting kernel at %p (params at %p)...\n\n",
theKernel, params_start);
diff --git a/lib_blackfin/bootm.c b/lib_blackfin/bootm.c
index edb54e4..cc89085 100644
--- a/lib_blackfin/bootm.c
+++ b/lib_blackfin/bootm.c
@@ -54,6 +54,9 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
int (*appl) (char *cmdline);
char *cmdline;
+ if (!autostart)
+ return ;
+
#ifdef SHARED_RESOURCES
swap_to(FLASH);
#endif
diff --git a/lib_i386/bootm.c b/lib_i386/bootm.c
index 60d2658..8d200fb 100644
--- a/lib_i386/bootm.c
+++ b/lib_i386/bootm.c
@@ -61,6 +61,9 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
}
+ if (!autostart)
+ return ;
+
#ifdef DEBUG
printf ("## Transferring control to Linux (at address %08x) ...\n",
(u32)base_ptr);
diff --git a/lib_m68k/bootm.c b/lib_m68k/bootm.c
index 91cf5b1..38a8880 100644
--- a/lib_m68k/bootm.c
+++ b/lib_m68k/bootm.c
@@ -113,6 +113,8 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
show_boot_progress (15);
+ if (!autostart)
+ return;
/*
* Linux Kernel Parameters (passing board info data):
* r3: ptr to board info data
@@ -126,7 +128,8 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
return ;
error:
- do_reset (cmdtp, flag, argc, argv);
+ if (autostart)
+ do_reset (cmdtp, flag, argc, argv);
return ;
}
diff --git a/lib_microblaze/bootm.c b/lib_microblaze/bootm.c
index 957c7c1..cf09636 100644
--- a/lib_microblaze/bootm.c
+++ b/lib_microblaze/bootm.c
@@ -41,6 +41,9 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
void (*theKernel) (char *);
char *commandline = getenv ("bootargs");
+ if (!autostart)
+ return ;
+
theKernel = (void (*)(char *))image_get_ep (hdr);
show_boot_progress (15);
diff --git a/lib_mips/bootm.c b/lib_mips/bootm.c
index c3583f0..d334edf 100644
--- a/lib_mips/bootm.c
+++ b/lib_mips/bootm.c
@@ -96,6 +96,9 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
sprintf (env_buf, "0x%X", (uint) (gd->bd->bi_flashsize));
linux_env_set ("flash_size", env_buf);
+ if (!autostart)
+ return ;
+
/* we assume that the kernel is in place */
printf ("\nStarting kernel ...\n\n");
diff --git a/lib_nios2/bootm.c b/lib_nios2/bootm.c
index 9efbd47..03f9551 100644
--- a/lib_nios2/bootm.c
+++ b/lib_nios2/bootm.c
@@ -32,6 +32,9 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
{
void (*kernel)(void) = (void (*)(void))image_get_ep (hdr);
+ if (!autostart)
+ return ;
+
/* For now we assume the Microtronix linux ... which only
* needs to be called ;-)
*/
diff --git a/lib_ppc/bootm.c b/lib_ppc/bootm.c
index b0a30a0..7133f20 100644
--- a/lib_ppc/bootm.c
+++ b/lib_ppc/bootm.c
@@ -236,6 +236,8 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
#if defined(CFG_INIT_RAM_LOCK) && !defined(CONFIG_E500)
unlock_ram_in_cache();
#endif
+ if (!autostart)
+ return ;
#if defined(CONFIG_OF_LIBFDT)
if (of_flat_tree) { /* device tree; boot new style */
@@ -264,7 +266,8 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
return ;
error:
- do_reset (cmdtp, flag, argc, argv);
+ if (autostart)
+ do_reset (cmdtp, flag, argc, argv);
return ;
}
diff --git a/lib_sh/bootm.c b/lib_sh/bootm.c
index 742ebe2..5a57253 100644
--- a/lib_sh/bootm.c
+++ b/lib_sh/bootm.c
@@ -65,6 +65,9 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
char *bootargs = getenv("bootargs");
void (*kernel) (void) = (void (*)(void))image_get_ep (hdr);
+ if (!autostart)
+ return ;
+
/* Setup parameters */
memset(PARAM, 0, 0x1000); /* Clear zero page */
strcpy(COMMAND_LINE, bootargs);
--
1.5.3.8
More information about the U-Boot
mailing list