summaryrefslogtreecommitdiff
path: root/target/linux/generic-2.6/patches/060-rootfs_split.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/generic-2.6/patches/060-rootfs_split.patch')
-rw-r--r--target/linux/generic-2.6/patches/060-rootfs_split.patch30
1 files changed, 14 insertions, 16 deletions
diff --git a/target/linux/generic-2.6/patches/060-rootfs_split.patch b/target/linux/generic-2.6/patches/060-rootfs_split.patch
index b4a5525..c3f674a 100644
--- a/target/linux/generic-2.6/patches/060-rootfs_split.patch
+++ b/target/linux/generic-2.6/patches/060-rootfs_split.patch
@@ -1,6 +1,6 @@
-diff -ur linux.old/drivers/mtd/Kconfig linux.dev/drivers/mtd/Kconfig
---- linux.old/drivers/mtd/Kconfig 2007-01-10 20:10:37.000000000 +0100
-+++ linux.dev/drivers/mtd/Kconfig 2007-02-19 23:00:53.739457000 +0100
+diff -Nur linux-2.6.21.1/drivers/mtd/Kconfig linux-2.6.21.1-owrt/drivers/mtd/Kconfig
+--- linux-2.6.21.1/drivers/mtd/Kconfig 2007-04-27 23:49:26.000000000 +0200
++++ linux-2.6.21.1-owrt/drivers/mtd/Kconfig 2007-05-14 10:59:59.000000000 +0200
@@ -49,6 +49,11 @@
devices. Partitioning on NFTL 'devices' is a different - that's the
'normal' form of partitioning used on a block device.
@@ -13,9 +13,9 @@ diff -ur linux.old/drivers/mtd/Kconfig linux.dev/drivers/mtd/Kconfig
config MTD_REDBOOT_PARTS
tristate "RedBoot partition table parsing"
depends on MTD_PARTITIONS
-diff -ur linux.old/drivers/mtd/mtdpart.c linux.dev/drivers/mtd/mtdpart.c
---- linux.old/drivers/mtd/mtdpart.c 2007-01-10 20:10:37.000000000 +0100
-+++ linux.dev/drivers/mtd/mtdpart.c 2007-02-20 00:01:38.587355896 +0100
+diff -Nur linux-2.6.21.1/drivers/mtd/mtdpart.c linux-2.6.21.1-owrt/drivers/mtd/mtdpart.c
+--- linux-2.6.21.1/drivers/mtd/mtdpart.c 2007-04-27 23:49:26.000000000 +0200
++++ linux-2.6.21.1-owrt/drivers/mtd/mtdpart.c 2007-05-14 11:18:56.000000000 +0200
@@ -20,6 +20,8 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
@@ -25,7 +25,7 @@ diff -ur linux.old/drivers/mtd/mtdpart.c linux.dev/drivers/mtd/mtdpart.c
/* Our partition linked list */
static LIST_HEAD(mtd_partitions);
-@@ -303,6 +305,173 @@
+@@ -308,6 +310,172 @@
return 0;
}
@@ -35,14 +35,13 @@ diff -ur linux.old/drivers/mtd/mtdpart.c linux.dev/drivers/mtd/mtdpart.c
+ struct mtd_part *slave;
+
+ /* allocate the partition structure */
-+ slave = kmalloc (sizeof(*slave), GFP_KERNEL);
++ slave = kzalloc (sizeof(*slave), GFP_KERNEL);
+ if (!slave) {
+ printk ("memory allocation error while creating partitions for \"%s\"\n",
+ master->name);
+ del_mtd_partitions(master);
+ return -ENOMEM;
+ }
-+ memset(slave, 0, sizeof(*slave));
+ list_add(&slave->list, &mtd_partitions);
+
+ /* set up the MTD object for this partition */
@@ -51,8 +50,8 @@ diff -ur linux.old/drivers/mtd/mtdpart.c linux.dev/drivers/mtd/mtdpart.c
+ slave->mtd.size = part->size;
+ slave->mtd.writesize = master->writesize;
+ slave->mtd.oobsize = master->oobsize;
-+ slave->mtd.ecctype = master->ecctype;
-+ slave->mtd.eccsize = master->eccsize;
++ slave->mtd.oobavail = master->oobavail;
++ slave->mtd.subpage_sft = master->subpage_sft;
+
+ slave->mtd.name = part->name;
+ slave->mtd.bank_size = master->bank_size;
@@ -199,7 +198,7 @@ diff -ur linux.old/drivers/mtd/mtdpart.c linux.dev/drivers/mtd/mtdpart.c
/*
* This function, given a master MTD object and a partition table, creates
* and registers slave MTD objects which are bound to the master according to
-@@ -314,171 +483,53 @@
+@@ -319,170 +487,53 @@
const struct mtd_partition *parts,
int nbparts)
{
@@ -250,14 +249,13 @@ diff -ur linux.old/drivers/mtd/mtdpart.c linux.dev/drivers/mtd/mtdpart.c
+ return ret;
- /* allocate the partition structure */
-- slave = kmalloc (sizeof(*slave), GFP_KERNEL);
+- slave = kzalloc (sizeof(*slave), GFP_KERNEL);
- if (!slave) {
- printk ("memory allocation error while creating partitions for \"%s\"\n",
- master->name);
- del_mtd_partitions(master);
- return -ENOMEM;
- }
-- memset(slave, 0, sizeof(*slave));
- list_add(&slave->list, &mtd_partitions);
-
- /* set up the MTD object for this partition */
@@ -266,8 +264,8 @@ diff -ur linux.old/drivers/mtd/mtdpart.c linux.dev/drivers/mtd/mtdpart.c
- slave->mtd.size = parts[i].size;
- slave->mtd.writesize = master->writesize;
- slave->mtd.oobsize = master->oobsize;
-- slave->mtd.ecctype = master->ecctype;
-- slave->mtd.eccsize = master->eccsize;
+- slave->mtd.oobavail = master->oobavail;
+- slave->mtd.subpage_sft = master->subpage_sft;
-
- slave->mtd.name = parts[i].name;
- slave->mtd.bank_size = master->bank_size;