aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openwrt.org>2005-09-10 20:48:40 +0000
committerWaldemar Brodkorb <wbx@openwrt.org>2005-09-10 20:48:40 +0000
commit34d7ff98f2afb5382b68a465940e2904edc01b77 (patch)
treed5abd5e6f2bbf4cc231e3b6ffe4d7c5e6efe1b6a /target/linux
parent7d821c627958b47e224e8b42f1b8ff2a039e7833 (diff)
downloadupstream-34d7ff98f2afb5382b68a465940e2904edc01b77.tar.gz
upstream-34d7ff98f2afb5382b68a465940e2904edc01b77.tar.bz2
upstream-34d7ff98f2afb5382b68a465940e2904edc01b77.zip
fix the remaining map driver issues
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1893 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/linux-2.6/patches/brcm/001-bcm947xx.patch14
1 files changed, 7 insertions, 7 deletions
diff --git a/target/linux/linux-2.6/patches/brcm/001-bcm947xx.patch b/target/linux/linux-2.6/patches/brcm/001-bcm947xx.patch
index 0d69114d39..907f37a27c 100644
--- a/target/linux/linux-2.6/patches/brcm/001-bcm947xx.patch
+++ b/target/linux/linux-2.6/patches/brcm/001-bcm947xx.patch
@@ -13059,7 +13059,7 @@ diff -Nur linux-2.6.12.5/drivers/mtd/maps/Makefile linux-2.6.12.5-brcm/drivers/m
obj-$(CONFIG_MTD_SBC_GXX) += sbc_gxx.o
diff -Nur linux-2.6.12.5/drivers/mtd/maps/bcm47xx-flash.c linux-2.6.12.5-brcm/drivers/mtd/maps/bcm47xx-flash.c
--- linux-2.6.12.5/drivers/mtd/maps/bcm47xx-flash.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.12.5-brcm/drivers/mtd/maps/bcm47xx-flash.c 2005-09-04 04:50:19.246786848 +0200
++++ linux-2.6.12.5-brcm/drivers/mtd/maps/bcm47xx-flash.c 2005-09-10 22:23:03.178338008 +0200
@@ -0,0 +1,249 @@
+/*
+ * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org)
@@ -13220,13 +13220,15 @@ diff -Nur linux-2.6.12.5/drivers/mtd/maps/bcm47xx-flash.c linux-2.6.12.5-brcm/dr
+ bcm947xx_parts[3].size = NVRAM_SIZE;
+
+ /* Size linux (kernel and rootfs) */
-+ bcm947xx_parts[1].offset = bcm947xx_parts[0].size + bcm947xx_parts[3].size;
-+ bcm947xx_parts[1].size = size - NVRAM_SIZE - bcm947xx_parts[0].size - bcm947xx_parts[3].size;
++ /* do not count the elf loader, which is on one sector */
++ bcm947xx_parts[1].offset = bcm947xx_parts[0].size + bcm947xx_parts[3].size + mtd->erasesize;
++ bcm947xx_parts[1].size = size - NVRAM_SIZE - bcm947xx_parts[0].size -
++ bcm947xx_parts[3].size - mtd->erasesize;
+
+ /* Find and size rootfs */
+ if (find_root(mtd,size,&bcm947xx_parts[2])==0) {
+ /* entirely jffs2 */
-+ bcm947xx_parts[2].size = bcm947xx_parts[3].offset - bcm947xx_parts[2].offset;
++ bcm947xx_parts[2].size = size - bcm947xx_parts[2].offset - NVRAM_SIZE;
+ bcm947xx_parts[4].name = NULL;
+ } else {
+ /* legacy setup */
@@ -13235,10 +13237,8 @@ diff -Nur linux-2.6.12.5/drivers/mtd/maps/bcm47xx-flash.c linux-2.6.12.5-brcm/dr
+ if ((bcm947xx_parts[4].offset % mtd->erasesize) > 0) {
+ bcm947xx_parts[4].offset += mtd->erasesize -
+ (bcm947xx_parts[4].offset % mtd->erasesize);
-+ bcm947xx_parts[4].size = size - NVRAM_SIZE - bcm947xx_parts[4].offset;
-+ } else {
-+ bcm947xx_parts[4].size = bcm947xx_parts[3].offset - bcm947xx_parts[4].offset;
+ }
++ bcm947xx_parts[4].size = size - NVRAM_SIZE - bcm947xx_parts[4].offset;
+ }
+
+ return bcm947xx_parts;