[U-Boot] [PATCH 16/17] bootm command: added argument to arch_preboot_os, function may depend on OS type.

Daniel Hellstrom daniel at gaisler.com
Tue May 18 16:49:02 CEST 2010


Signed-off-by: Daniel Hellstrom <daniel at gaisler.com>
---
 arch/powerpc/cpu/mpc85xx/cpu_init.c |    2 +-
 common/cmd_bootm.c                  |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c
index e578b29..61dd7ad 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
@@ -403,7 +403,7 @@ int cpu_init_r(void)
 
 extern void setup_ivors(void);
 
-void arch_preboot_os(void)
+void arch_preboot_os(int os)
 {
 	u32 msr;
 
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index da06009..f5ca5c9 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -154,11 +154,11 @@ ulong load_addr = CONFIG_SYS_LOAD_ADDR;	/* Default Load Address */
 static bootm_headers_t images;		/* pointers to os/initrd/fdt images */
 
 /* Allow for arch specific config before we boot */
-void __arch_preboot_os(void)
+void __arch_preboot_os(int os)
 {
 	/* please define platform specific arch_preboot_os() */
 }
-void arch_preboot_os(void) __attribute__((weak, alias("__arch_preboot_os")));
+void arch_preboot_os(int os) __attribute__((weak, alias("__arch_preboot_os")));
 
 #if defined(__ARM__)
   #define IH_INITRD_ARCH IH_ARCH_ARM
@@ -566,7 +566,7 @@ int do_bootm_subcommand (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 			break;
 		case BOOTM_STATE_OS_GO:
 			disable_interrupts();
-			arch_preboot_os();
+			arch_preboot_os(images.os.os);
 			boot_fn(BOOTM_STATE_OS_GO, argc, argv, &images);
 			break;
 	}
@@ -699,7 +699,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 		return 1;
 	}
 
-	arch_preboot_os();
+	arch_preboot_os(images.os.os);
 
 	boot_fn(0, argc, argv, &images);
 
-- 
1.5.4



More information about the U-Boot mailing list