[U-Boot-Users] [PATCH] Fill fw_arg3
Florian Fainelli
florian.fainelli at telecomint.eu
Wed Jun 6 13:06:55 CEST 2007
Hello,
This patch allows MIPS based Linux kernels to do runtime bootloader detection
by reading Linux's fw_arg3 in the PROM code (for instance) filled with the
magic number "UBOO". This may not be really useful for other boards than MIPS
and in particular those that use several different bootloaders (like
ADM5120).
Signed-off-by: Florian Fainelli <florian.fainelli at telecomint.eu>
--
-------------- next part --------------
diff --git a/lib_mips/mips_linux.c b/lib_mips/mips_linux.c
index 952d5a9..0823bc0 100644
--- a/lib_mips/mips_linux.c
+++ b/lib_mips/mips_linux.c
@@ -33,6 +33,8 @@ DECLARE_GLOBAL_DATA_PTR;
#define LINUX_MAX_ENVS 256
#define LINUX_MAX_ARGS 256
+#define UBOOT_MAGIC_NUMBER 0x55424F4F /* UBOO */
+
#ifdef CONFIG_SHOW_BOOT_PROGRESS
# include <status_led.h>
# define SHOW_BOOT_PROGRESS(arg) show_boot_progress(arg)
@@ -213,7 +215,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
/* we assume that the kernel is in place */
printf ("\nStarting kernel ...\n\n");
- theKernel (linux_argc, linux_argv, linux_env, 0);
+ theKernel (linux_argc, linux_argv, linux_env, UBOOT_MAGIC_NUMBER);
}
static void linux_params_init (ulong start, char *line)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20070606/1127143a/attachment.pgp
More information about the U-Boot
mailing list