summaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-08-29 07:21:20 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-08-29 07:21:20 +0000
commit05f06c4c28e13ab49ef842ca31e073942784b5be (patch)
tree543b09d75c5c1fccff1e7c101b5935169f4c1b2e /target/linux
parent4dd54d3132dce7fa7c870d9215237e3bf471cd74 (diff)
Restore boot loader detection by parsing the command line, fixes issue with Inventel liveboxes
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4695 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch65
1 files changed, 39 insertions, 26 deletions
diff --git a/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch b/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch
index 23d0d6964..6505225ce 100644
--- a/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch
+++ b/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch
@@ -6920,26 +6920,26 @@ 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.
-+
-+ This program is free software; you can distribute it and/or modify it
-+ under the terms of the GNU General Public License (Version 2) as
-+ published by the Free Software Foundation.
-+
-+ This program is distributed in the hope it will be useful, but WITHOUT
-+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-+ for more details.
-+
-+ You should have received a copy of the GNU General Public License along
-+ with this program; if not, write to the Free Software Foundation, Inc.,
-+ 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
++<:copyright-gpl
++ Copyright 2004 Broadcom Corp. All Rights Reserved.
++
++ This program is free software; you can distribute it and/or modify it
++ under the terms of the GNU General Public License (Version 2) as
++ published by the Free Software Foundation.
++
++ This program is distributed in the hope it will be useful, but WITHOUT
++ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ for more details.
++
++ You should have received a copy of the GNU General Public License along
++ with this program; if not, write to the Free Software Foundation, Inc.,
++ 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+:>
+*/
+/*
@@ -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);
+
@@ -7034,20 +7047,20 @@ diff -urN linux.old/arch/mips/bcm963xx/prom.c linux.dev/arch/mips/bcm963xx/prom.
+
+ arcs_cmdline[0] = '\0';
+
-+ if (boot_loader_type == BOOT_CFE)
++ if (boot_loader_type == BOOT_CFE)
+ add_memory_region(0, (getMemorySize() - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM);
+ else
-+ add_memory_region(0, (0x01000000 - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM);
++ add_memory_region(0, (0x01000000 - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM);
+
+ mips_machgroup = MACH_GROUP_BRCM;
+ mips_machtype = MACH_BCM;
+
-+ BpSetBoardId("96348GW-10");
++ BpSetBoardId("96348GW-10");
+}
+
+/* --------------------------------------------------------------------------
+ Name: prom_free_prom_memory
-+Abstract:
++Abstract:
+ -------------------------------------------------------------------------- */
+void __init prom_free_prom_memory(void)
+{