summaryrefslogtreecommitdiff
path: root/openwrt/target/linux/linux-2.6
diff options
context:
space:
mode:
authorWaldemar Brodkorb <mail@waldemar-brodkorb.de>2005-11-29 12:40:29 +0000
committerWaldemar Brodkorb <mail@waldemar-brodkorb.de>2005-11-29 12:40:29 +0000
commitc06ec10c1995b6666cb2dbf4f3e97d702d47af6a (patch)
tree9967f0e010e4d390d9fe1b1932008ceed04cfa0b /openwrt/target/linux/linux-2.6
parent8c8c0cea003e60091eeca234382cc957821d4b22 (diff)
downloadmtk-20170518-c06ec10c1995b6666cb2dbf4f3e97d702d47af6a.zip
mtk-20170518-c06ec10c1995b6666cb2dbf4f3e97d702d47af6a.tar.gz
mtk-20170518-c06ec10c1995b6666cb2dbf4f3e97d702d47af6a.tar.bz2
fix flash map driver for squashfs images for wrt54gs
SVN-Revision: 2568
Diffstat (limited to 'openwrt/target/linux/linux-2.6')
-rw-r--r--openwrt/target/linux/linux-2.6/config/brcm2
-rw-r--r--openwrt/target/linux/linux-2.6/patches/brcm/002-flash-map.patch10
2 files changed, 8 insertions, 4 deletions
diff --git a/openwrt/target/linux/linux-2.6/config/brcm b/openwrt/target/linux/linux-2.6/config/brcm
index 3e20ee7..5de7986 100644
--- a/openwrt/target/linux/linux-2.6/config/brcm
+++ b/openwrt/target/linux/linux-2.6/config/brcm
@@ -1345,7 +1345,7 @@ CONFIG_NLS_UTF8=m
# CONFIG_DEBUG_KERNEL is not set
CONFIG_LOG_BUF_SHIFT=14
CONFIG_CROSSCOMPILE=y
-CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit noinitrd console=ttyS1,115200"
+CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit noinitrd console=ttyS0,115200"
#
# Security options
diff --git a/openwrt/target/linux/linux-2.6/patches/brcm/002-flash-map.patch b/openwrt/target/linux/linux-2.6/patches/brcm/002-flash-map.patch
index 406255b..d0917ba 100644
--- a/openwrt/target/linux/linux-2.6/patches/brcm/002-flash-map.patch
+++ b/openwrt/target/linux/linux-2.6/patches/brcm/002-flash-map.patch
@@ -1,7 +1,7 @@
diff -Nur linux-2.6.12.5/drivers/mtd/maps/bcm47xx-flash.c linux-2.6.12.5-flash/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-flash/drivers/mtd/maps/bcm47xx-flash.c 2005-11-06 20:36:42.553198500 +0100
-@@ -0,0 +1,329 @@
++++ linux-2.6.12.5-flash/drivers/mtd/maps/bcm47xx-flash.c 2005-11-29 12:50:51.416656000 +0100
+@@ -0,0 +1,333 @@
+/*
+ * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org)
+ * Copyright (C) 2005 Waldemar Brodkorb <wbx@openwrt.org>
@@ -222,7 +222,7 @@ diff -Nur linux-2.6.12.5/drivers/mtd/maps/bcm47xx-flash.c linux-2.6.12.5-flash/d
+ bcm947xx_parts[1].size = bcm947xx_parts[3].offset -
+ bcm947xx_parts[1].offset;
+ } else {
-+ /* do not count the elf loader, which is on one sector */
++ /* do not count the elf loader, which is on one block */
+ bcm947xx_parts[1].offset = bcm947xx_parts[0].size +
+ bcm947xx_parts[3].size + mtd->erasesize;
+ bcm947xx_parts[1].size = size -
@@ -248,6 +248,10 @@ diff -Nur linux-2.6.12.5/drivers/mtd/maps/bcm47xx-flash.c linux-2.6.12.5-flash/d
+ if (cfe_size_flag == 0) {
+ bcm947xx_parts[4].offset = bcm947xx_parts[2].offset +
+ bcm947xx_parts[2].size;
++ if ((bcm947xx_parts[4].offset % mtd->erasesize) > 0) {
++ bcm947xx_parts[4].offset += mtd->erasesize -
++ (bcm947xx_parts[4].offset % mtd->erasesize);
++ }
+ bcm947xx_parts[4].size = bcm947xx_parts[3].offset -
+ bcm947xx_parts[4].offset;
+ } else {