X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=target%2Flinux%2Fgeneric%2Fpatches-3.12%2F400-mtd-add-rootfs-split-support.patch;h=ce91d7ba5e369063123358f4d62c2f72f336aed0;hp=215aef14deb6d7516eea580c4b6d5240c9b39bc2;hb=79ef040f3b5fc571f203d9e008fbb67f30675769;hpb=5c1a1fd0b4a1be94e6c4693d94652d184a1a98aa diff --git a/target/linux/generic/patches-3.12/400-mtd-add-rootfs-split-support.patch b/target/linux/generic/patches-3.12/400-mtd-add-rootfs-split-support.patch index 215aef14de..ce91d7ba5e 100644 --- a/target/linux/generic/patches-3.12/400-mtd-add-rootfs-split-support.patch +++ b/target/linux/generic/patches-3.12/400-mtd-add-rootfs-split-support.patch @@ -35,16 +35,15 @@ depends on m --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c -@@ -29,6 +29,8 @@ +@@ -29,6 +29,7 @@ #include #include #include -+#include +#include #include #include "mtdcore.h" -@@ -45,13 +47,14 @@ struct mtd_part { +@@ -45,13 +46,14 @@ struct mtd_part { struct list_head list; }; @@ -60,7 +59,7 @@ /* * MTD methods which simply translate the effective address and pass through * to the _real_ device. -@@ -534,8 +537,10 @@ out_register: +@@ -534,8 +536,10 @@ out_register: return slave; } @@ -73,7 +72,7 @@ { struct mtd_partition part; struct mtd_part *p, *new; -@@ -567,21 +572,24 @@ int mtd_add_partition(struct mtd_info *m +@@ -567,21 +571,24 @@ int mtd_add_partition(struct mtd_info *m end = offset + length; mutex_lock(&mtd_partitions_mutex); @@ -108,7 +107,7 @@ return ret; err_inv: -@@ -591,6 +599,12 @@ err_inv: +@@ -591,6 +598,12 @@ err_inv: } EXPORT_SYMBOL_GPL(mtd_add_partition); @@ -121,7 +120,7 @@ int mtd_del_partition(struct mtd_info *master, int partno) { struct mtd_part *slave, *next; -@@ -614,6 +628,151 @@ int mtd_del_partition(struct mtd_info *m +@@ -614,6 +627,144 @@ int mtd_del_partition(struct mtd_info *m } EXPORT_SYMBOL_GPL(mtd_del_partition); @@ -252,13 +251,6 @@ + if (!strcmp(part->mtd.name, "rootfs")) { + rootfs_found = 1; + -+ if (config_enabled(CONFIG_MTD_ROOTFS_ROOT_DEV) && -+ ROOT_DEV == 0) { -+ printk(KERN_NOTICE "mtd: partition \"rootfs\" " -+ "set to be root filesystem\n"); -+ ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, part->mtd.index); -+ } -+ + if (config_enabled(CONFIG_MTD_ROOTFS_SPLIT)) + split_rootfs_data(master, part); + } @@ -273,7 +265,7 @@ /* * 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 -@@ -643,6 +802,7 @@ int add_mtd_partitions(struct mtd_info * +@@ -643,6 +794,7 @@ int add_mtd_partitions(struct mtd_info * mutex_unlock(&mtd_partitions_mutex); add_mtd_device(&slave->mtd);