Browse Source

[new uImage] Respect autostart setting in linux bootm

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Marian Balakowicz <m8@semihalf.com>
Kumar Gala 17 years ago
parent
commit
75fa002c47
10 changed files with 32 additions and 2 deletions
  1. 3 0
      lib_arm/bootm.c
  2. 3 0
      lib_avr32/bootm.c
  3. 3 0
      lib_blackfin/bootm.c
  4. 3 0
      lib_i386/bootm.c
  5. 4 1
      lib_m68k/bootm.c
  6. 3 0
      lib_microblaze/bootm.c
  7. 3 0
      lib_mips/bootm.c
  8. 3 0
      lib_nios2/bootm.c
  9. 4 1
      lib_ppc/bootm.c
  10. 3 0
      lib_sh/bootm.c

+ 3 - 0
lib_arm/bootm.c

@@ -133,6 +133,9 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
 	setup_end_tag (bd);
 	setup_end_tag (bd);
 #endif
 #endif
 
 
+	if (!images->autostart)
+		return ;
+
 	/* we assume that the kernel is in place */
 	/* we assume that the kernel is in place */
 	printf ("\nStarting kernel ...\n\n");
 	printf ("\nStarting kernel ...\n\n");
 
 

+ 3 - 0
lib_avr32/bootm.c

@@ -214,6 +214,9 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
 	params = setup_ethernet_tags(params);
 	params = setup_ethernet_tags(params);
 	setup_end_tag(params);
 	setup_end_tag(params);
 
 
+	if (!images->autostart)
+		return ;
+
 	printf("\nStarting kernel at %p (params at %p)...\n\n",
 	printf("\nStarting kernel at %p (params at %p)...\n\n",
 	       theKernel, params_start);
 	       theKernel, params_start);
 
 

+ 3 - 0
lib_blackfin/bootm.c

@@ -53,6 +53,9 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
 	char	*cmdline;
 	char	*cmdline;
 	ulong	ep = 0;
 	ulong	ep = 0;
 
 
+	if (!images->autostart)
+		return ;
+
 #ifdef SHARED_RESOURCES
 #ifdef SHARED_RESOURCES
 	swap_to(FLASH);
 	swap_to(FLASH);
 #endif
 #endif

+ 3 - 0
lib_i386/bootm.c

@@ -72,6 +72,9 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
 
 
 	}
 	}
 
 
+	if (!images->autostart)
+		return ;
+
 #ifdef DEBUG
 #ifdef DEBUG
 	printf ("## Transferring control to Linux (at address %08x) ...\n",
 	printf ("## Transferring control to Linux (at address %08x) ...\n",
 		(u32)base_ptr);
 		(u32)base_ptr);

+ 4 - 1
lib_m68k/bootm.c

@@ -127,6 +127,8 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag,
 
 
 	show_boot_progress (15);
 	show_boot_progress (15);
 
 
+	if (!images->autostart)
+		return;
 	/*
 	/*
 	 * Linux Kernel Parameters (passing board info data):
 	 * Linux Kernel Parameters (passing board info data):
 	 *   r3: ptr to board info data
 	 *   r3: ptr to board info data
@@ -140,7 +142,8 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag,
 	return ;
 	return ;
 
 
 error:
 error:
-	do_reset (cmdtp, flag, argc, argv);
+	if (images->autostart)
+		do_reset (cmdtp, flag, argc, argv);
 	return ;
 	return ;
 }
 }
 
 

+ 3 - 0
lib_microblaze/bootm.c

@@ -63,5 +63,8 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
 		(ulong) theKernel);
 		(ulong) theKernel);
 #endif
 #endif
 
 
+	if (!images->autostart)
+		return ;
+
 	theKernel (commandline);
 	theKernel (commandline);
 }
 }

+ 3 - 0
lib_mips/bootm.c

@@ -106,6 +106,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));
 	sprintf (env_buf, "0x%X", (uint) (gd->bd->bi_flashsize));
 	linux_env_set ("flash_size", env_buf);
 	linux_env_set ("flash_size", env_buf);
 
 
+	if (!images->autostart)
+		return ;
+
 	/* we assume that the kernel is in place */
 	/* we assume that the kernel is in place */
 	printf ("\nStarting kernel ...\n\n");
 	printf ("\nStarting kernel ...\n\n");
 
 

+ 3 - 0
lib_nios2/bootm.c

@@ -46,6 +46,9 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
 	}
 	}
 	void (*kernel)(void) = (void (*)(void))ep;
 	void (*kernel)(void) = (void (*)(void))ep;
 
 
+	if (!images->autostart)
+		return ;
+
 	/* For now we assume the Microtronix linux ... which only
 	/* For now we assume the Microtronix linux ... which only
 	 * needs to be called ;-)
 	 * needs to be called ;-)
 	 */
 	 */

+ 4 - 1
lib_ppc/bootm.c

@@ -242,6 +242,8 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
 #if defined(CFG_INIT_RAM_LOCK) && !defined(CONFIG_E500)
 #if defined(CFG_INIT_RAM_LOCK) && !defined(CONFIG_E500)
 	unlock_ram_in_cache();
 	unlock_ram_in_cache();
 #endif
 #endif
+	if (!images->autostart)
+		return ;
 
 
 #if defined(CONFIG_OF_LIBFDT)
 #if defined(CONFIG_OF_LIBFDT)
 	if (of_flat_tree) {	/* device tree; boot new style */
 	if (of_flat_tree) {	/* device tree; boot new style */
@@ -270,7 +272,8 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
 	return ;
 	return ;
 
 
 error:
 error:
-	do_reset (cmdtp, flag, argc, argv);
+	if (images->autostart)
+		do_reset (cmdtp, flag, argc, argv);
 	return ;
 	return ;
 }
 }
 
 

+ 3 - 0
lib_sh/bootm.c

@@ -79,6 +79,9 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
 	}
 	}
 	void (*kernel) (void) = (void (*)(void))ep;
 	void (*kernel) (void) = (void (*)(void))ep;
 
 
+	if (!images->autostart)
+		return ;
+
 	/* Setup parameters */
 	/* Setup parameters */
 	memset(PARAM, 0, 0x1000);	/* Clear zero page */
 	memset(PARAM, 0, 0x1000);	/* Clear zero page */
 	strcpy(COMMAND_LINE, bootargs);
 	strcpy(COMMAND_LINE, bootargs);