mirror of https://github.com/hak5/openwrt-owl.git
Restore boot loader detection by parsing the command line, fixes issue with Inventel liveboxes
SVN-Revision: 4695owl
parent
b6a32036a8
commit
900afdb448
|
@ -6920,10 +6920,10 @@ diff -urN linux.old/arch/mips/bcm963xx/Makefile linux.dev/arch/mips/bcm963xx/Mak
|
|||
+EXTRA_CFLAGS += -DADSL_ANNEXC
|
||||
+endif
|
||||
+
|
||||
diff -urN linux.old/arch/mips/bcm963xx/prom.c linux.dev/arch/mips/bcm963xx/prom.c
|
||||
--- linux.old/arch/mips/bcm963xx/prom.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/arch/mips/bcm963xx/prom.c 2006-08-27 21:02:04.000000000 +0200
|
||||
@@ -0,0 +1,130 @@
|
||||
diff -urN linux-2.6.17/arch/mips/bcm963xx/prom.c linux-2.6.17-brcm63xx/arch/mips/bcm963xx/prom.c
|
||||
--- linux-2.6.17/arch/mips/bcm963xx/prom.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.17-brcm63xx/arch/mips/bcm963xx/prom.c 2006-08-29 07:10:10.000000000 +0200
|
||||
@@ -0,0 +1,143 @@
|
||||
+/*
|
||||
+<:copyright-gpl
|
||||
+ Copyright 2004 Broadcom Corp. All Rights Reserved.
|
||||
|
@ -6965,6 +6965,8 @@ diff -urN linux.old/arch/mips/bcm963xx/prom.c linux.dev/arch/mips/bcm963xx/prom.
|
|||
+//char arcs_cmdline[CL_SIZE] __initdata = {0};
|
||||
+/* inv_xde */
|
||||
+int boot_loader_type;
|
||||
+int prom_argc;
|
||||
+char **prom_argv, **prom_envp;
|
||||
+
|
||||
+extern int do_syslog(int, char *, int);
|
||||
+extern void serial_init(void);
|
||||
|
@ -7022,9 +7024,20 @@ diff -urN linux.old/arch/mips/bcm963xx/prom.c linux.dev/arch/mips/bcm963xx/prom.
|
|||
+
|
||||
+ serial_init();
|
||||
+
|
||||
+ /* Need to fixup boot loader detection code
|
||||
+ * whithout changing prom_init prototype
|
||||
+ */
|
||||
+ prom_argc = fw_arg0;
|
||||
+ prom_argv = (char **) fw_arg1;
|
||||
+ prom_envp = (char **) fw_arg2;
|
||||
+
|
||||
+ if ((prom_argv > 0x80000000) && (prom_argv < 0x82000000)) {
|
||||
+ strncpy(arcs_cmdline, prom_argv[1], CL_SIZE);
|
||||
+ }
|
||||
+
|
||||
+ if (strncmp(arcs_cmdline, "boot_loader=RedBoot", 19) != 0) {
|
||||
+ boot_loader_type = BOOT_CFE;
|
||||
+ }
|
||||
+ else {
|
||||
+ boot_loader_type = BOOT_REDBOOT;
|
||||
+ }
|
||||
+
|
||||
+ do_syslog(8, NULL, 8);
|
||||
+
|
||||
|
|
Loading…
Reference in New Issue