aboutsummaryrefslogtreecommitdiff
path: root/openwrt/target
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-08-22 20:19:42 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-08-22 20:19:42 +0000
commitffae714eac3edf22021454dd677df69600045204 (patch)
tree44340ab766c08a57870e8ae7427e503c26bfbff0 /openwrt/target
parente0d3bc1c95f3ac4b89be73ccc1d50acf51570344 (diff)
don't try to create mtd partitions on bcm947xx when the trx header is not found - should fix #318
SVN-Revision: 4634
Diffstat (limited to 'openwrt/target')
-rw-r--r--openwrt/target/linux/brcm-2.4/patches/004-flash.patch5
-rw-r--r--openwrt/target/linux/brcm-2.6/patches/002-flash-map.patch5
2 files changed, 6 insertions, 4 deletions
diff --git a/openwrt/target/linux/brcm-2.4/patches/004-flash.patch b/openwrt/target/linux/brcm-2.4/patches/004-flash.patch
index 14ba3b15f4..de2d5b170f 100644
--- a/openwrt/target/linux/brcm-2.4/patches/004-flash.patch
+++ b/openwrt/target/linux/brcm-2.4/patches/004-flash.patch
@@ -334,7 +334,7 @@ diff -urN linux.old/drivers/mtd/devices/sflash.c linux.dev/drivers/mtd/devices/s
diff -urN linux.old/drivers/mtd/maps/bcm947xx-flash.c linux.dev/drivers/mtd/maps/bcm947xx-flash.c
--- linux.old/drivers/mtd/maps/bcm947xx-flash.c 1970-01-01 01:00:00.000000000 +0100
+++ linux.dev/drivers/mtd/maps/bcm947xx-flash.c 2006-06-23 18:08:46.000000000 +0200
-@@ -0,0 +1,547 @@
+@@ -0,0 +1,548 @@
+/*
+ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
+ * Copyright (C) 2005 Waldemar Brodkorb <wbx@openwrt.org>
@@ -720,7 +720,8 @@ diff -urN linux.old/drivers/mtd/maps/bcm947xx-flash.c linux.dev/drivers/mtd/maps
+{
+ int cfe_size;
+
-+ cfe_size = find_cfe_size(mtd,size);
++ if ((cfe_size = find_cfe_size(mtd,size)) < 0)
++ return NULL;
+
+ /* boot loader */
+ bcm947xx_parts[0].offset = 0;
diff --git a/openwrt/target/linux/brcm-2.6/patches/002-flash-map.patch b/openwrt/target/linux/brcm-2.6/patches/002-flash-map.patch
index a8ed9092c0..9d568930d2 100644
--- a/openwrt/target/linux/brcm-2.6/patches/002-flash-map.patch
+++ b/openwrt/target/linux/brcm-2.6/patches/002-flash-map.patch
@@ -1,7 +1,7 @@
diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/bcm47xx-flash.c
--- linux.old/drivers/mtd/maps/bcm47xx-flash.c 1970-01-01 01:00:00.000000000 +0100
+++ linux.dev/drivers/mtd/maps/bcm47xx-flash.c 2006-06-23 19:54:06.000000000 +0200
-@@ -0,0 +1,451 @@
+@@ -0,0 +1,452 @@
+/*
+ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
+ * Copyright (C) 2005 Waldemar Brodkorb <wbx@openwrt.org>
@@ -326,7 +326,8 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
+{
+ int cfe_size;
+
-+ cfe_size = find_cfe_size(mtd,size);
++ if ((cfe_size = find_cfe_size(mtd,size)) < 0)
++ return NULL;
+
+ /* boot loader */
+ bcm947xx_parts[0].offset = 0;