]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
kernel: move mtdsplit files to drivers/mtd/mtdsplit/ to simplify maintenance, unify...
authorFelix Fietkau <nbd@openwrt.org>
Fri, 2 Jan 2015 21:52:35 +0000 (21:52 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 2 Jan 2015 21:52:35 +0000 (21:52 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 43805

53 files changed:
target/linux/generic/files/drivers/mtd/mtdsplit/Kconfig
target/linux/generic/files/drivers/mtd/mtdsplit/Makefile [new file with mode: 0644]
target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit.c [moved from target/linux/generic/files/drivers/mtd/mtdsplit.c with 100% similarity]
target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit.h [moved from target/linux/generic/files/drivers/mtd/mtdsplit.h with 100% similarity]
target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_lzma.c [moved from target/linux/generic/files/drivers/mtd/mtdsplit_lzma.c with 100% similarity]
target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seama.c [moved from target/linux/generic/files/drivers/mtd/mtdsplit_seama.c with 100% similarity]
target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_squashfs.c [moved from target/linux/generic/files/drivers/mtd/mtdsplit_squashfs.c with 100% similarity]
target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c [moved from target/linux/generic/files/drivers/mtd/mtdsplit_uimage.c with 100% similarity]
target/linux/generic/patches-3.10/400-mtd-add-rootfs-split-support.patch
target/linux/generic/patches-3.10/401-mtd-add-support-for-different-partition-parser-types.patch
target/linux/generic/patches-3.10/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
target/linux/generic/patches-3.10/403-mtd-hook-mtdsplit-to-Kbuild.patch
target/linux/generic/patches-3.10/404-mtd-use-mtd_get_squashfs_len-in-split_squasfh.patch
target/linux/generic/patches-3.10/406-mtd-add-squashfs-parser.patch [deleted file]
target/linux/generic/patches-3.10/407-mtd-hook-mtdsplit_uimage-into-Kbuild.patch [deleted file]
target/linux/generic/patches-3.10/408-mtd-hook-mtdsplit_seama-into-Kbuild.patch [deleted file]
target/linux/generic/patches-3.10/409-mtd-hook-mtdsplit_lzma-into-Kbuild.patch [deleted file]
target/linux/generic/patches-3.10/411-mtd-partial_eraseblock_write.patch
target/linux/generic/patches-3.10/430-mtd-add-myloader-partition-parser.patch
target/linux/generic/patches-3.10/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
target/linux/generic/patches-3.13/400-mtd-add-rootfs-split-support.patch
target/linux/generic/patches-3.13/401-mtd-add-support-for-different-partition-parser-types.patch
target/linux/generic/patches-3.13/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
target/linux/generic/patches-3.13/403-mtd-hook-mtdsplit-to-Kbuild.patch
target/linux/generic/patches-3.13/404-mtd-use-mtd_get_squashfs_len-in-split_squasfh.patch
target/linux/generic/patches-3.13/406-mtd-add-squashfs-parser.patch [deleted file]
target/linux/generic/patches-3.13/407-mtd-hook-mtdsplit_uimage-into-Kbuild.patch [deleted file]
target/linux/generic/patches-3.13/408-mtd-hook-mtdsplit_seama-into-Kbuild.patch [deleted file]
target/linux/generic/patches-3.13/409-mtd-hook-mtdsplit_lzma-into-Kbuild.patch [deleted file]
target/linux/generic/patches-3.13/411-mtd-partial_eraseblock_write.patch
target/linux/generic/patches-3.13/430-mtd-add-myloader-partition-parser.patch
target/linux/generic/patches-3.13/471-mtd-m25p80-allow-to-disable-small-sector-erase.patch
target/linux/generic/patches-3.13/502-yaffs-3.10-disable-proc-entry.patch
target/linux/generic/patches-3.14/400-mtd-add-rootfs-split-support.patch
target/linux/generic/patches-3.14/403-mtd-hook-mtdsplit-to-Kbuild.patch
target/linux/generic/patches-3.14/404-mtd-add-more-helper-functions.patch [moved from target/linux/generic/patches-3.14/405-mtd-add-more-helper-functions.patch with 100% similarity]
target/linux/generic/patches-3.14/405-mtd-old-firmware-uimage-splitter.patch [moved from target/linux/generic/patches-3.14/407-mtd-old-firmware-uimage-splitter.patch with 92% similarity]
target/linux/generic/patches-3.14/406-mtd-hook-mtdsplit-into-Kbuild.patch [deleted file]
target/linux/generic/patches-3.14/406-mtd-old-rootfs-squashfs-splitter.patch [moved from target/linux/generic/patches-3.14/408-mtd-old-rootfs-squashfs-splitter.patch with 97% similarity]
target/linux/generic/patches-3.14/411-mtd-partial_eraseblock_write.patch
target/linux/generic/patches-3.14/430-mtd-add-myloader-partition-parser.patch
target/linux/generic/patches-3.14/431-mtd-bcm47xxpart-support-TRX-data-partition-being-UBI.patch
target/linux/generic/patches-3.14/471-mtd-m25p80-allow-to-disable-small-sector-erase.patch
target/linux/generic/patches-3.18/400-mtd-add-rootfs-split-support.patch
target/linux/generic/patches-3.18/403-mtd-hook-mtdsplit-to-Kbuild.patch
target/linux/generic/patches-3.18/404-mtd-add-more-helper-functions.patch [moved from target/linux/generic/patches-3.18/405-mtd-add-more-helper-functions.patch with 100% similarity]
target/linux/generic/patches-3.18/405-mtd-old-firmware-uimage-splitter.patch [moved from target/linux/generic/patches-3.18/407-mtd-old-firmware-uimage-splitter.patch with 92% similarity]
target/linux/generic/patches-3.18/406-mtd-hook-mtdsplit-into-Kbuild.patch [deleted file]
target/linux/generic/patches-3.18/406-mtd-old-rootfs-squashfs-splitter.patch [moved from target/linux/generic/patches-3.18/408-mtd-old-rootfs-squashfs-splitter.patch with 97% similarity]
target/linux/generic/patches-3.18/411-mtd-partial_eraseblock_write.patch
target/linux/generic/patches-3.18/430-mtd-add-myloader-partition-parser.patch
target/linux/generic/patches-3.18/431-mtd-bcm47xxpart-support-TRX-data-partition-being-UBI.patch
target/linux/generic/patches-3.18/502-yaffs-3.10-disable-proc-entry.patch

index 09794f4f844e5cca9e0800974e872a5e0ad613bc..9a32daadc850f41012e60ddce336a5fdac614d02 100644 (file)
@@ -1,7 +1,16 @@
+config MTD_SPLIT
+       def_bool n
+       help
+         Generic MTD split support.
+
+config MTD_SPLIT_SUPPORT
+       def_bool MTD = y
+
 comment "Rootfs partition parsers"
 
 config MTD_SPLIT_SQUASHFS_ROOT
        bool "Squashfs based root partition parser"
+       depends on MTD_SPLIT_SUPPORT
        select MTD_SPLIT
        default n
        help
@@ -13,12 +22,15 @@ comment "Firmware partition parsers"
 
 config MTD_SPLIT_SEAMA_FW
        bool "Seama firmware parser"
+       depends on MTD_SPLIT_SUPPORT
        select MTD_SPLIT
 
 config MTD_SPLIT_UIMAGE_FW
        bool "uImage based firmware partition parser"
+       depends on MTD_SPLIT_SUPPORT
        select MTD_SPLIT
 
 config MTD_SPLIT_LZMA_FW
        bool "LZMA compressed kernel based firmware partition parser"
+       depends on MTD_SPLIT_SUPPORT
        select MTD_SPLIT
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile b/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile
new file mode 100644 (file)
index 0000000..41bc1de
--- /dev/null
@@ -0,0 +1,5 @@
+obj-$(CONFIG_MTD_SPLIT)                += mtdsplit.o
+obj-$(CONFIG_MTD_SPLIT_SEAMA_FW) += mtdsplit_seama.o
+obj-$(CONFIG_MTD_SPLIT_SQUASHFS_ROOT) += mtdsplit_squashfs.o
+obj-$(CONFIG_MTD_SPLIT_UIMAGE_FW) += mtdsplit_uimage.o
+obj-$(CONFIG_MTD_SPLIT_LZMA_FW) += mtdsplit_lzma.o
index 6c17b01e53e71754cfd02a7a1a7a703bff5e752c..e14e7c094b5cfd3a4320958c44b7813a59aa4585 100644 (file)
@@ -35,7 +35,7 @@
        depends on m
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -29,6 +29,7 @@
+@@ -29,9 +29,11 @@
  #include <linux/kmod.h>
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/partitions.h>
  #include <linux/err.h>
  
  #include "mtdcore.h"
-@@ -45,13 +46,14 @@ struct mtd_part {
++#include "mtdsplit/mtdsplit.h"
+ /* Our partition linked list */
+ static LIST_HEAD(mtd_partitions);
+@@ -45,13 +47,14 @@ struct mtd_part {
        struct list_head list;
  };
  
@@ -59,7 +63,7 @@
  /*
   * MTD methods which simply translate the effective address and pass through
   * to the _real_ device.
-@@ -533,8 +535,10 @@ out_register:
+@@ -533,8 +536,10 @@ out_register:
        return slave;
  }
  
@@ -72,7 +76,7 @@
  {
        struct mtd_partition part;
        struct mtd_part *p, *new;
-@@ -566,21 +570,24 @@ int mtd_add_partition(struct mtd_info *m
+@@ -566,21 +571,24 @@ int mtd_add_partition(struct mtd_info *m
        end = offset + length;
  
        mutex_lock(&mtd_partitions_mutex);
  
        return ret;
  err_inv:
-@@ -590,6 +597,12 @@ err_inv:
+@@ -590,6 +598,12 @@ err_inv:
  }
  EXPORT_SYMBOL_GPL(mtd_add_partition);
  
  int mtd_del_partition(struct mtd_info *master, int partno)
  {
        struct mtd_part *slave, *next;
-@@ -613,6 +626,144 @@ int mtd_del_partition(struct mtd_info *m
+@@ -613,6 +627,144 @@ int mtd_del_partition(struct mtd_info *m
  }
  EXPORT_SYMBOL_GPL(mtd_del_partition);
  
  /*
   * 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
-@@ -642,6 +793,7 @@ int add_mtd_partitions(struct mtd_info *
+@@ -642,6 +794,7 @@ int add_mtd_partitions(struct mtd_info *
                mutex_unlock(&mtd_partitions_mutex);
  
                add_mtd_device(&slave->mtd);
index bd35aa7d35388e96178fc1e4ab3b49a9756e7f53..52b87f56cc903cc84490f0de3dc4ec5744b5bb7f 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -823,6 +823,30 @@ static struct mtd_part_parser *get_parti
+@@ -824,6 +824,30 @@ static struct mtd_part_parser *get_parti
  
  #define put_partition_parser(p) do { module_put((p)->owner); } while (0)
  
@@ -42,7 +42,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  int register_mtd_parser(struct mtd_part_parser *p)
  {
        spin_lock(&part_parser_lock);
-@@ -899,6 +923,38 @@ int parse_mtd_partitions(struct mtd_info
+@@ -900,6 +924,38 @@ int parse_mtd_partitions(struct mtd_info
        return ret;
  }
  
index 649693ff22c2c6c7ac8f7800f9d37c22ec7d6dd7..a614094851c8db0a23be3225724cd28a7d2f1798 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -626,6 +626,37 @@ int mtd_del_partition(struct mtd_info *m
+@@ -627,6 +627,37 @@ int mtd_del_partition(struct mtd_info *m
  }
  EXPORT_SYMBOL_GPL(mtd_del_partition);
  
@@ -38,7 +38,7 @@
  static inline unsigned long
  mtd_pad_erasesize(struct mtd_info *mtd, int offset, int len)
  {
-@@ -685,6 +716,10 @@ static void split_rootfs_data(struct mtd
+@@ -686,6 +717,10 @@ static void split_rootfs_data(struct mtd
        unsigned int split_size;
        int ret;
  
@@ -49,7 +49,7 @@
        ret = split_squashfs(master, part->offset, &split_offset);
        if (ret)
                return;
-@@ -734,6 +769,12 @@ static void split_uimage(struct mtd_info
+@@ -735,6 +770,12 @@ static void split_uimage(struct mtd_info
  
  static void split_firmware(struct mtd_info *master, struct mtd_part *part)
  {
index c24f34c5cc3a336c74a843d36457d4386d962e39..23cbd6243c6cbfdb6431780ab036039cb5d228a3 100644 (file)
@@ -1,13 +1,10 @@
 --- a/drivers/mtd/Kconfig
 +++ b/drivers/mtd/Kconfig
-@@ -36,6 +36,11 @@ config MTD_UIMAGE_SPLIT
+@@ -36,6 +36,8 @@ config MTD_UIMAGE_SPLIT
        depends on MTD_SPLIT_FIRMWARE
        default y
  
-+config MTD_SPLIT
-+      def_bool n
-+      help 
-+        Generic MTD split support.
++source "drivers/mtd/mtdsplit/Kconfig"
 +
  endmenu
  
@@ -18,7 +15,7 @@
  obj-$(CONFIG_MTD)             += mtd.o
  mtd-y                         := mtdcore.o mtdsuper.o mtdconcat.o mtdpart.o mtdchar.o
  
-+mtd-$(CONFIG_MTD_SPLIT)               += mtdsplit.o
++obj-$(CONFIG_MTD_SPLIT)               += mtdsplit/
 +
  obj-$(CONFIG_MTD_OF_PARTS)    += ofpart.o
  obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
index 02e4e038c2c875d7d1c92655aad6b8b317e07cb3..e4dd1e4852deeb2ce39635bc97cd6f156310c4bd 100644 (file)
@@ -1,14 +1,6 @@
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -33,6 +33,7 @@
- #include <linux/err.h>
- #include "mtdcore.h"
-+#include "mtdsplit.h"
- /* Our partition linked list */
- static LIST_HEAD(mtd_partitions);
-@@ -668,43 +669,16 @@ mtd_pad_erasesize(struct mtd_info *mtd, 
+@@ -669,43 +669,16 @@ mtd_pad_erasesize(struct mtd_info *mtd, 
        return len;
  }
  
diff --git a/target/linux/generic/patches-3.10/406-mtd-add-squashfs-parser.patch b/target/linux/generic/patches-3.10/406-mtd-add-squashfs-parser.patch
deleted file mode 100644 (file)
index b3ff9d9..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/drivers/mtd/Kconfig
-+++ b/drivers/mtd/Kconfig
-@@ -37,6 +37,17 @@ config MTD_UIMAGE_SPLIT
-       depends on MTD_SPLIT_FIRMWARE
-       default y
-+comment "Rootfs partition parsers"
-+
-+config MTD_SPLIT_SQUASHFS_ROOT
-+      bool "Squashfs based root partition parser"
-+      select MTD_SPLIT
-+      default n
-+      help
-+        This provides a parsing function which allows to detect the
-+        offset and size of the unused portion of a rootfs partition
-+        containing a squashfs.
-+
- config MTD_SPLIT
-       def_bool n
-       help 
---- a/drivers/mtd/Makefile
-+++ b/drivers/mtd/Makefile
-@@ -7,6 +7,7 @@ obj-$(CONFIG_MTD)              += mtd.o
- mtd-y                         := mtdcore.o mtdsuper.o mtdconcat.o mtdpart.o mtdchar.o
- mtd-$(CONFIG_MTD_SPLIT)               += mtdsplit.o
-+mtd-$(CONFIG_MTD_SPLIT_SQUASHFS_ROOT) += mtdsplit_squashfs.o
- obj-$(CONFIG_MTD_OF_PARTS)    += ofpart.o
- obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
diff --git a/target/linux/generic/patches-3.10/407-mtd-hook-mtdsplit_uimage-into-Kbuild.patch b/target/linux/generic/patches-3.10/407-mtd-hook-mtdsplit_uimage-into-Kbuild.patch
deleted file mode 100644 (file)
index 02697f6..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/drivers/mtd/Kconfig
-+++ b/drivers/mtd/Kconfig
-@@ -48,6 +48,12 @@ config MTD_SPLIT_SQUASHFS_ROOT
-         offset and size of the unused portion of a rootfs partition
-         containing a squashfs.
-+comment "Firmware partition parsers"
-+
-+config MTD_SPLIT_UIMAGE_FW
-+      bool "uImage based firmware partition parser"
-+      select MTD_SPLIT
-+
- config MTD_SPLIT
-       def_bool n
-       help 
---- a/drivers/mtd/Makefile
-+++ b/drivers/mtd/Makefile
-@@ -8,6 +8,7 @@ mtd-y                          := mtdcore.o mtdsuper.o mtdconc
- mtd-$(CONFIG_MTD_SPLIT)               += mtdsplit.o
- mtd-$(CONFIG_MTD_SPLIT_SQUASHFS_ROOT) += mtdsplit_squashfs.o
-+mtd-$(CONFIG_MTD_SPLIT_UIMAGE_FW) += mtdsplit_uimage.o
- obj-$(CONFIG_MTD_OF_PARTS)    += ofpart.o
- obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
diff --git a/target/linux/generic/patches-3.10/408-mtd-hook-mtdsplit_seama-into-Kbuild.patch b/target/linux/generic/patches-3.10/408-mtd-hook-mtdsplit_seama-into-Kbuild.patch
deleted file mode 100644 (file)
index 016a9b6..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/drivers/mtd/Kconfig
-+++ b/drivers/mtd/Kconfig
-@@ -50,6 +50,10 @@ config MTD_SPLIT_SQUASHFS_ROOT
- comment "Firmware partition parsers"
-+config MTD_SPLIT_SEAMA_FW
-+      bool "Seama firmware parser"
-+      select MTD_SPLIT
-+
- config MTD_SPLIT_UIMAGE_FW
-       bool "uImage based firmware partition parser"
-       select MTD_SPLIT
---- a/drivers/mtd/Makefile
-+++ b/drivers/mtd/Makefile
-@@ -7,6 +7,7 @@ obj-$(CONFIG_MTD)              += mtd.o
- mtd-y                         := mtdcore.o mtdsuper.o mtdconcat.o mtdpart.o mtdchar.o
- mtd-$(CONFIG_MTD_SPLIT)               += mtdsplit.o
-+mtd-$(CONFIG_MTD_SPLIT_SEAMA_FW) += mtdsplit_seama.o
- mtd-$(CONFIG_MTD_SPLIT_SQUASHFS_ROOT) += mtdsplit_squashfs.o
- mtd-$(CONFIG_MTD_SPLIT_UIMAGE_FW) += mtdsplit_uimage.o
diff --git a/target/linux/generic/patches-3.10/409-mtd-hook-mtdsplit_lzma-into-Kbuild.patch b/target/linux/generic/patches-3.10/409-mtd-hook-mtdsplit_lzma-into-Kbuild.patch
deleted file mode 100644 (file)
index cc9a971..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/drivers/mtd/Kconfig
-+++ b/drivers/mtd/Kconfig
-@@ -58,6 +58,10 @@ config MTD_SPLIT_UIMAGE_FW
-       bool "uImage based firmware partition parser"
-       select MTD_SPLIT
-+config MTD_SPLIT_LZMA_FW
-+      bool "LZMA compressed kernel based firmware partition parser"
-+      select MTD_SPLIT
-+
- config MTD_SPLIT
-       def_bool n
-       help 
---- a/drivers/mtd/Makefile
-+++ b/drivers/mtd/Makefile
-@@ -10,6 +10,7 @@ mtd-$(CONFIG_MTD_SPLIT)              += mtdsplit.o
- mtd-$(CONFIG_MTD_SPLIT_SEAMA_FW) += mtdsplit_seama.o
- mtd-$(CONFIG_MTD_SPLIT_SQUASHFS_ROOT) += mtdsplit_squashfs.o
- mtd-$(CONFIG_MTD_SPLIT_UIMAGE_FW) += mtdsplit_uimage.o
-+mtd-$(CONFIG_MTD_SPLIT_LZMA_FW) += mtdsplit_lzma.o
- obj-$(CONFIG_MTD_OF_PARTS)    += ofpart.o
- obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
index 940741120703954a9c44457602b5ab9bc9316c53..31d126c0a69976e4eb11cbb7b2bddf60d7a7358c 100644 (file)
@@ -2,7 +2,7 @@
 +++ b/drivers/mtd/mtdpart.c
 @@ -35,6 +35,8 @@
  #include "mtdcore.h"
- #include "mtdsplit.h"
+ #include "mtdsplit/mtdsplit.h"
  
 +#define MTD_ERASE_PARTIAL     0x8000 /* partition only covers parts of an erase block */
 +
index fc352d2779f00bd3a083270a91b405f054d8f6b0..b6a6b6e57caa8aad4b5d66dc4db338dfe874a5e0 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/Kconfig
 +++ b/drivers/mtd/Kconfig
-@@ -212,6 +212,22 @@ config MTD_BCM47XX_PARTS
+@@ -184,6 +184,22 @@ config MTD_BCM47XX_PARTS
          This provides partitions parser for devices based on BCM47xx
          boards.
  
@@ -25,7 +25,7 @@
  config MTD_BLKDEVS
 --- a/drivers/mtd/Makefile
 +++ b/drivers/mtd/Makefile
-@@ -19,6 +19,7 @@ obj-$(CONFIG_MTD_AFS_PARTS)  += afs.o
+@@ -15,6 +15,7 @@ obj-$(CONFIG_MTD_AFS_PARTS)  += afs.o
  obj-$(CONFIG_MTD_AR7_PARTS)   += ar7part.o
  obj-$(CONFIG_MTD_BCM63XX_PARTS)       += bcm63xxpart.o
  obj-$(CONFIG_MTD_BCM47XX_PARTS)       += bcm47xxpart.o
index f97a442cb13f880365243e89948143e343024c90..002a79ab73d12628329c35c9bc072772a7a3f170 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 
 --- a/drivers/mtd/ubi/build.c
 +++ b/drivers/mtd/ubi/build.c
-@@ -1209,6 +1209,48 @@
+@@ -1207,6 +1207,48 @@ static struct mtd_info * __init open_mtd
        return mtd;
  }
  
@@ -60,7 +60,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  static int __init ubi_init(void)
  {
        int err, i, k;
-@@ -1298,6 +1340,12 @@
+@@ -1290,6 +1332,12 @@ static int __init ubi_init(void)
                }
        }
  
index ce91d7ba5e369063123358f4d62c2f72f336aed0..ae8c45fa9943c2d166c41c564487ba8fd650bd09 100644 (file)
@@ -35,7 +35,7 @@
        depends on m
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -29,6 +29,7 @@
+@@ -29,9 +29,11 @@
  #include <linux/kmod.h>
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/partitions.h>
  #include <linux/err.h>
  
  #include "mtdcore.h"
-@@ -45,13 +46,14 @@ struct mtd_part {
++#include "mtdsplit/mtdsplit.h"
+ /* Our partition linked list */
+ static LIST_HEAD(mtd_partitions);
+@@ -45,13 +47,14 @@ struct mtd_part {
        struct list_head list;
  };
  
@@ -59,7 +63,7 @@
  /*
   * MTD methods which simply translate the effective address and pass through
   * to the _real_ device.
-@@ -534,8 +536,10 @@ out_register:
+@@ -534,8 +537,10 @@ out_register:
        return slave;
  }
  
@@ -72,7 +76,7 @@
  {
        struct mtd_partition part;
        struct mtd_part *p, *new;
-@@ -567,21 +571,24 @@ int mtd_add_partition(struct mtd_info *m
+@@ -567,21 +572,24 @@ int mtd_add_partition(struct mtd_info *m
        end = offset + length;
  
        mutex_lock(&mtd_partitions_mutex);
  
        return ret;
  err_inv:
-@@ -591,6 +598,12 @@ err_inv:
+@@ -591,6 +599,12 @@ err_inv:
  }
  EXPORT_SYMBOL_GPL(mtd_add_partition);
  
  int mtd_del_partition(struct mtd_info *master, int partno)
  {
        struct mtd_part *slave, *next;
-@@ -614,6 +627,144 @@ int mtd_del_partition(struct mtd_info *m
+@@ -614,6 +628,144 @@ int mtd_del_partition(struct mtd_info *m
  }
  EXPORT_SYMBOL_GPL(mtd_del_partition);
  
  /*
   * 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 +794,7 @@ int add_mtd_partitions(struct mtd_info *
+@@ -643,6 +795,7 @@ int add_mtd_partitions(struct mtd_info *
                mutex_unlock(&mtd_partitions_mutex);
  
                add_mtd_device(&slave->mtd);
index 52b87f56cc903cc84490f0de3dc4ec5744b5bb7f..793005d6e1a452eb8645159d14461beadf73d135 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -824,6 +824,30 @@ static struct mtd_part_parser *get_parti
+@@ -825,6 +825,30 @@ static struct mtd_part_parser *get_parti
  
  #define put_partition_parser(p) do { module_put((p)->owner); } while (0)
  
@@ -42,7 +42,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  int register_mtd_parser(struct mtd_part_parser *p)
  {
        spin_lock(&part_parser_lock);
-@@ -900,6 +924,38 @@ int parse_mtd_partitions(struct mtd_info
+@@ -901,6 +925,38 @@ int parse_mtd_partitions(struct mtd_info
        return ret;
  }
  
index a614094851c8db0a23be3225724cd28a7d2f1798..8d0bda825f460a7c96171d9534480918864eebd2 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -627,6 +627,37 @@ int mtd_del_partition(struct mtd_info *m
+@@ -628,6 +628,37 @@ int mtd_del_partition(struct mtd_info *m
  }
  EXPORT_SYMBOL_GPL(mtd_del_partition);
  
@@ -38,7 +38,7 @@
  static inline unsigned long
  mtd_pad_erasesize(struct mtd_info *mtd, int offset, int len)
  {
-@@ -686,6 +717,10 @@ static void split_rootfs_data(struct mtd
+@@ -687,6 +718,10 @@ static void split_rootfs_data(struct mtd
        unsigned int split_size;
        int ret;
  
@@ -49,7 +49,7 @@
        ret = split_squashfs(master, part->offset, &split_offset);
        if (ret)
                return;
-@@ -735,6 +770,12 @@ static void split_uimage(struct mtd_info
+@@ -736,6 +771,12 @@ static void split_uimage(struct mtd_info
  
  static void split_firmware(struct mtd_info *master, struct mtd_part *part)
  {
index c24f34c5cc3a336c74a843d36457d4386d962e39..23cbd6243c6cbfdb6431780ab036039cb5d228a3 100644 (file)
@@ -1,13 +1,10 @@
 --- a/drivers/mtd/Kconfig
 +++ b/drivers/mtd/Kconfig
-@@ -36,6 +36,11 @@ config MTD_UIMAGE_SPLIT
+@@ -36,6 +36,8 @@ config MTD_UIMAGE_SPLIT
        depends on MTD_SPLIT_FIRMWARE
        default y
  
-+config MTD_SPLIT
-+      def_bool n
-+      help 
-+        Generic MTD split support.
++source "drivers/mtd/mtdsplit/Kconfig"
 +
  endmenu
  
@@ -18,7 +15,7 @@
  obj-$(CONFIG_MTD)             += mtd.o
  mtd-y                         := mtdcore.o mtdsuper.o mtdconcat.o mtdpart.o mtdchar.o
  
-+mtd-$(CONFIG_MTD_SPLIT)               += mtdsplit.o
++obj-$(CONFIG_MTD_SPLIT)               += mtdsplit/
 +
  obj-$(CONFIG_MTD_OF_PARTS)    += ofpart.o
  obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
index a54b97b07c391ba242bbdbeb5b3f7fddd4774ecd..4ae675faf961c72e353e2da6eb5aa04e7c9704b7 100644 (file)
@@ -1,14 +1,6 @@
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -33,6 +33,7 @@
- #include <linux/err.h>
- #include "mtdcore.h"
-+#include "mtdsplit.h"
- /* Our partition linked list */
- static LIST_HEAD(mtd_partitions);
-@@ -669,43 +670,16 @@ mtd_pad_erasesize(struct mtd_info *mtd,
+@@ -670,43 +670,16 @@ mtd_pad_erasesize(struct mtd_info *mtd, 
        return len;
  }
  
diff --git a/target/linux/generic/patches-3.13/406-mtd-add-squashfs-parser.patch b/target/linux/generic/patches-3.13/406-mtd-add-squashfs-parser.patch
deleted file mode 100644 (file)
index b3ff9d9..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/drivers/mtd/Kconfig
-+++ b/drivers/mtd/Kconfig
-@@ -37,6 +37,17 @@ config MTD_UIMAGE_SPLIT
-       depends on MTD_SPLIT_FIRMWARE
-       default y
-+comment "Rootfs partition parsers"
-+
-+config MTD_SPLIT_SQUASHFS_ROOT
-+      bool "Squashfs based root partition parser"
-+      select MTD_SPLIT
-+      default n
-+      help
-+        This provides a parsing function which allows to detect the
-+        offset and size of the unused portion of a rootfs partition
-+        containing a squashfs.
-+
- config MTD_SPLIT
-       def_bool n
-       help 
---- a/drivers/mtd/Makefile
-+++ b/drivers/mtd/Makefile
-@@ -7,6 +7,7 @@ obj-$(CONFIG_MTD)              += mtd.o
- mtd-y                         := mtdcore.o mtdsuper.o mtdconcat.o mtdpart.o mtdchar.o
- mtd-$(CONFIG_MTD_SPLIT)               += mtdsplit.o
-+mtd-$(CONFIG_MTD_SPLIT_SQUASHFS_ROOT) += mtdsplit_squashfs.o
- obj-$(CONFIG_MTD_OF_PARTS)    += ofpart.o
- obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
diff --git a/target/linux/generic/patches-3.13/407-mtd-hook-mtdsplit_uimage-into-Kbuild.patch b/target/linux/generic/patches-3.13/407-mtd-hook-mtdsplit_uimage-into-Kbuild.patch
deleted file mode 100644 (file)
index 02697f6..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/drivers/mtd/Kconfig
-+++ b/drivers/mtd/Kconfig
-@@ -48,6 +48,12 @@ config MTD_SPLIT_SQUASHFS_ROOT
-         offset and size of the unused portion of a rootfs partition
-         containing a squashfs.
-+comment "Firmware partition parsers"
-+
-+config MTD_SPLIT_UIMAGE_FW
-+      bool "uImage based firmware partition parser"
-+      select MTD_SPLIT
-+
- config MTD_SPLIT
-       def_bool n
-       help 
---- a/drivers/mtd/Makefile
-+++ b/drivers/mtd/Makefile
-@@ -8,6 +8,7 @@ mtd-y                          := mtdcore.o mtdsuper.o mtdconc
- mtd-$(CONFIG_MTD_SPLIT)               += mtdsplit.o
- mtd-$(CONFIG_MTD_SPLIT_SQUASHFS_ROOT) += mtdsplit_squashfs.o
-+mtd-$(CONFIG_MTD_SPLIT_UIMAGE_FW) += mtdsplit_uimage.o
- obj-$(CONFIG_MTD_OF_PARTS)    += ofpart.o
- obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
diff --git a/target/linux/generic/patches-3.13/408-mtd-hook-mtdsplit_seama-into-Kbuild.patch b/target/linux/generic/patches-3.13/408-mtd-hook-mtdsplit_seama-into-Kbuild.patch
deleted file mode 100644 (file)
index 016a9b6..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/drivers/mtd/Kconfig
-+++ b/drivers/mtd/Kconfig
-@@ -50,6 +50,10 @@ config MTD_SPLIT_SQUASHFS_ROOT
- comment "Firmware partition parsers"
-+config MTD_SPLIT_SEAMA_FW
-+      bool "Seama firmware parser"
-+      select MTD_SPLIT
-+
- config MTD_SPLIT_UIMAGE_FW
-       bool "uImage based firmware partition parser"
-       select MTD_SPLIT
---- a/drivers/mtd/Makefile
-+++ b/drivers/mtd/Makefile
-@@ -7,6 +7,7 @@ obj-$(CONFIG_MTD)              += mtd.o
- mtd-y                         := mtdcore.o mtdsuper.o mtdconcat.o mtdpart.o mtdchar.o
- mtd-$(CONFIG_MTD_SPLIT)               += mtdsplit.o
-+mtd-$(CONFIG_MTD_SPLIT_SEAMA_FW) += mtdsplit_seama.o
- mtd-$(CONFIG_MTD_SPLIT_SQUASHFS_ROOT) += mtdsplit_squashfs.o
- mtd-$(CONFIG_MTD_SPLIT_UIMAGE_FW) += mtdsplit_uimage.o
diff --git a/target/linux/generic/patches-3.13/409-mtd-hook-mtdsplit_lzma-into-Kbuild.patch b/target/linux/generic/patches-3.13/409-mtd-hook-mtdsplit_lzma-into-Kbuild.patch
deleted file mode 100644 (file)
index cc9a971..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/drivers/mtd/Kconfig
-+++ b/drivers/mtd/Kconfig
-@@ -58,6 +58,10 @@ config MTD_SPLIT_UIMAGE_FW
-       bool "uImage based firmware partition parser"
-       select MTD_SPLIT
-+config MTD_SPLIT_LZMA_FW
-+      bool "LZMA compressed kernel based firmware partition parser"
-+      select MTD_SPLIT
-+
- config MTD_SPLIT
-       def_bool n
-       help 
---- a/drivers/mtd/Makefile
-+++ b/drivers/mtd/Makefile
-@@ -10,6 +10,7 @@ mtd-$(CONFIG_MTD_SPLIT)              += mtdsplit.o
- mtd-$(CONFIG_MTD_SPLIT_SEAMA_FW) += mtdsplit_seama.o
- mtd-$(CONFIG_MTD_SPLIT_SQUASHFS_ROOT) += mtdsplit_squashfs.o
- mtd-$(CONFIG_MTD_SPLIT_UIMAGE_FW) += mtdsplit_uimage.o
-+mtd-$(CONFIG_MTD_SPLIT_LZMA_FW) += mtdsplit_lzma.o
- obj-$(CONFIG_MTD_OF_PARTS)    += ofpart.o
- obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
index 8da080b2ade89e36f1da84e7be28d63a3c572d8d..668b7d7289e13d5521dd7c7f6e3b6bdf61a49786 100644 (file)
@@ -2,7 +2,7 @@
 +++ b/drivers/mtd/mtdpart.c
 @@ -35,6 +35,8 @@
  #include "mtdcore.h"
- #include "mtdsplit.h"
+ #include "mtdsplit/mtdsplit.h"
  
 +#define MTD_ERASE_PARTIAL     0x8000 /* partition only covers parts of an erase block */
 +
index fc352d2779f00bd3a083270a91b405f054d8f6b0..b6a6b6e57caa8aad4b5d66dc4db338dfe874a5e0 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/Kconfig
 +++ b/drivers/mtd/Kconfig
-@@ -212,6 +212,22 @@ config MTD_BCM47XX_PARTS
+@@ -184,6 +184,22 @@ config MTD_BCM47XX_PARTS
          This provides partitions parser for devices based on BCM47xx
          boards.
  
@@ -25,7 +25,7 @@
  config MTD_BLKDEVS
 --- a/drivers/mtd/Makefile
 +++ b/drivers/mtd/Makefile
-@@ -19,6 +19,7 @@ obj-$(CONFIG_MTD_AFS_PARTS)  += afs.o
+@@ -15,6 +15,7 @@ obj-$(CONFIG_MTD_AFS_PARTS)  += afs.o
  obj-$(CONFIG_MTD_AR7_PARTS)   += ar7part.o
  obj-$(CONFIG_MTD_BCM63XX_PARTS)       += bcm63xxpart.o
  obj-$(CONFIG_MTD_BCM47XX_PARTS)       += bcm47xxpart.o
index 9bf5e33a08a2761cd9573a323a70d1e87dfec954..372e5783268aa58c15f339561a837ad1c2a63370 100644 (file)
@@ -30,7 +30,7 @@
  /****************************************************************************/
  
  struct m25p {
-@@ -1032,7 +1038,7 @@ static int m25p_probe(struct spi_device
+@@ -1032,7 +1038,7 @@ static int m25p_probe(struct spi_device 
                flash->mtd._write = m25p80_write;
  
        /* prefer "small sector" erase if possible */
index 5b73d3898b42be443494b1a73a85137ed5674b6b..5345678c56498611356ca93681870b7893757837 100644 (file)
@@ -8,7 +8,7 @@
  static struct proc_dir_entry *my_proc_entry;
  
  static char *yaffs_dump_dev_part0(char *buf, struct yaffs_dev *dev)
-@@ -3398,6 +3399,7 @@ static int yaffs_proc_write(struct file
+@@ -3398,6 +3399,7 @@ static int yaffs_proc_write(struct file 
                return yaffs_proc_debug_write(file, buf, count, data);
        return yaffs_proc_write_trace_options(file, buf, count, data);
  }
index 5ffacaf6424ad3ffd1b62ef44f2a2127f33c2dac..94551e247f674ac0faf716a45ab33173b4d243bc 100644 (file)
@@ -34,7 +34,7 @@
  #include <linux/err.h>
  
  #include "mtdcore.h"
-+#include "mtdsplit.h"
++#include "mtdsplit/mtdsplit.h"
  
  /* Our partition linked list */
  static LIST_HEAD(mtd_partitions);
index d897034abd37f82a05c773e81bd8706a4ba85b8d..0cf1c38555110040230fa5781688280df45e6eef 100644 (file)
@@ -1,13 +1,10 @@
 --- a/drivers/mtd/Kconfig
 +++ b/drivers/mtd/Kconfig
-@@ -27,6 +27,11 @@ config MTD_SPLIT_FIRMWARE_NAME
+@@ -27,6 +27,8 @@ config MTD_SPLIT_FIRMWARE_NAME
        depends on MTD_SPLIT_FIRMWARE
        default "firmware"
  
-+config MTD_SPLIT
-+      def_bool n
-+      help 
-+        Generic MTD split support.
++source "drivers/mtd/mtdsplit/Kconfig"
 +
  endmenu
  
@@ -18,7 +15,7 @@
  obj-$(CONFIG_MTD)             += mtd.o
  mtd-y                         := mtdcore.o mtdsuper.o mtdconcat.o mtdpart.o mtdchar.o
  
-+mtd-$(CONFIG_MTD_SPLIT)               += mtdsplit.o
++obj-$(CONFIG_MTD_SPLIT)               += mtdsplit/
 +
  obj-$(CONFIG_MTD_OF_PARTS)    += ofpart.o
  obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
similarity index 92%
rename from target/linux/generic/patches-3.14/407-mtd-old-firmware-uimage-splitter.patch
rename to target/linux/generic/patches-3.14/405-mtd-old-firmware-uimage-splitter.patch
index 3f7e910e7279c08071f31d980f6b84697a88f44e..c4ceb82a32d24d40e127412aafdbc0ed6a52a7b8 100644 (file)
 +
  source "drivers/mtd/mtdsplit/Kconfig"
  
- config MTD_SPLIT
+ endmenu
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -668,6 +668,37 @@ mtd_pad_erasesize(struct mtd_info *mtd,
+@@ -668,6 +668,37 @@ mtd_pad_erasesize(struct mtd_info *mtd, 
        return len;
  }
  
@@ -52,7 +52,7 @@
  #ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
  #define SPLIT_FIRMWARE_NAME   CONFIG_MTD_SPLIT_FIRMWARE_NAME
  #else
-@@ -676,7 +707,14 @@ mtd_pad_erasesize(struct mtd_info *mtd,
+@@ -676,7 +707,14 @@ mtd_pad_erasesize(struct mtd_info *mtd, 
  
  static void split_firmware(struct mtd_info *master, struct mtd_part *part)
  {
diff --git a/target/linux/generic/patches-3.14/406-mtd-hook-mtdsplit-into-Kbuild.patch b/target/linux/generic/patches-3.14/406-mtd-hook-mtdsplit-into-Kbuild.patch
deleted file mode 100644 (file)
index 008714b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
---- a/drivers/mtd/Kconfig
-+++ b/drivers/mtd/Kconfig
-@@ -27,6 +27,8 @@ config MTD_SPLIT_FIRMWARE_NAME
-       depends on MTD_SPLIT_FIRMWARE
-       default "firmware"
-+source "drivers/mtd/mtdsplit/Kconfig"
-+
- config MTD_SPLIT
-       def_bool n
-       help 
---- a/drivers/mtd/Makefile
-+++ b/drivers/mtd/Makefile
-@@ -7,6 +7,10 @@ obj-$(CONFIG_MTD)             += mtd.o
- mtd-y                         := mtdcore.o mtdsuper.o mtdconcat.o mtdpart.o mtdchar.o
- mtd-$(CONFIG_MTD_SPLIT)               += mtdsplit.o
-+mtd-$(CONFIG_MTD_SPLIT_SEAMA_FW) += mtdsplit_seama.o
-+mtd-$(CONFIG_MTD_SPLIT_SQUASHFS_ROOT) += mtdsplit_squashfs.o
-+mtd-$(CONFIG_MTD_SPLIT_UIMAGE_FW) += mtdsplit_uimage.o
-+mtd-$(CONFIG_MTD_SPLIT_LZMA_FW) += mtdsplit_lzma.o
- obj-$(CONFIG_MTD_OF_PARTS)    += ofpart.o
- obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
similarity index 97%
rename from target/linux/generic/patches-3.14/408-mtd-old-rootfs-squashfs-splitter.patch
rename to target/linux/generic/patches-3.14/406-mtd-old-rootfs-squashfs-splitter.patch
index c29b137774e44cc6d3d1f38f01956640c7cd288f..9147d1df4648fe98fe0610fad75b2b459a3f7066 100644 (file)
@@ -14,7 +14,7 @@
        default y
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -668,6 +668,47 @@ mtd_pad_erasesize(struct mtd_info *mtd,
+@@ -668,6 +668,47 @@ mtd_pad_erasesize(struct mtd_info *mtd, 
        return len;
  }
  
index 8da080b2ade89e36f1da84e7be28d63a3c572d8d..668b7d7289e13d5521dd7c7f6e3b6bdf61a49786 100644 (file)
@@ -2,7 +2,7 @@
 +++ b/drivers/mtd/mtdpart.c
 @@ -35,6 +35,8 @@
  #include "mtdcore.h"
- #include "mtdsplit.h"
+ #include "mtdsplit/mtdsplit.h"
  
 +#define MTD_ERASE_PARTIAL     0x8000 /* partition only covers parts of an erase block */
 +
index ffc9e2199cf78b8bb63fb62d05ff435206ffa591..45af25dd61271244e899fd2293aa8051e19ca16c 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/Kconfig
 +++ b/drivers/mtd/Kconfig
-@@ -189,6 +189,22 @@ config MTD_BCM47XX_PARTS
+@@ -184,6 +184,22 @@ config MTD_BCM47XX_PARTS
          This provides partitions parser for devices based on BCM47xx
          boards.
  
@@ -25,7 +25,7 @@
  #
 --- a/drivers/mtd/Makefile
 +++ b/drivers/mtd/Makefile
-@@ -19,6 +19,7 @@ obj-$(CONFIG_MTD_AFS_PARTS)  += afs.o
+@@ -15,6 +15,7 @@ obj-$(CONFIG_MTD_AFS_PARTS)  += afs.o
  obj-$(CONFIG_MTD_AR7_PARTS)   += ar7part.o
  obj-$(CONFIG_MTD_BCM63XX_PARTS)       += bcm63xxpart.o
  obj-$(CONFIG_MTD_BCM47XX_PARTS)       += bcm47xxpart.o
index 4c4720341efe4d6afb516793fe63fde85f43ad9f..46881fca2c9419c39540070df53e499715afcedb 100644 (file)
@@ -17,7 +17,7 @@
                                 u64 offset, uint32_t mask_flags)
  {
        part->name = name;
-@@ -58,6 +59,26 @@ static void bcm47xxpart_add_part(struct
+@@ -58,6 +59,26 @@ static void bcm47xxpart_add_part(struct 
        part->mask_flags = mask_flags;
  }
  
index eec90fa413600320bf79dfa000f3b018b80f0936..4f2f4e658636251b07d37fad627095dde4b7644c 100644 (file)
@@ -30,7 +30,7 @@
  /****************************************************************************/
  
  enum read_type {
-@@ -1192,7 +1198,7 @@ static int m25p_probe(struct spi_device
+@@ -1192,7 +1198,7 @@ static int m25p_probe(struct spi_device 
                flash->mtd._write = m25p80_write;
  
        /* prefer "small sector" erase if possible */
index 597adf5445506bbe7faaa3a3dc40d44af703b7c1..bf69a3509dc6ef839c2524a51a81f3117d16008d 100644 (file)
@@ -34,7 +34,7 @@
  #include <linux/err.h>
  
  #include "mtdcore.h"
-+#include "mtdsplit.h"
++#include "mtdsplit/mtdsplit.h"
  
  /* Our partition linked list */
  static LIST_HEAD(mtd_partitions);
index d897034abd37f82a05c773e81bd8706a4ba85b8d..0cf1c38555110040230fa5781688280df45e6eef 100644 (file)
@@ -1,13 +1,10 @@
 --- a/drivers/mtd/Kconfig
 +++ b/drivers/mtd/Kconfig
-@@ -27,6 +27,11 @@ config MTD_SPLIT_FIRMWARE_NAME
+@@ -27,6 +27,8 @@ config MTD_SPLIT_FIRMWARE_NAME
        depends on MTD_SPLIT_FIRMWARE
        default "firmware"
  
-+config MTD_SPLIT
-+      def_bool n
-+      help 
-+        Generic MTD split support.
++source "drivers/mtd/mtdsplit/Kconfig"
 +
  endmenu
  
@@ -18,7 +15,7 @@
  obj-$(CONFIG_MTD)             += mtd.o
  mtd-y                         := mtdcore.o mtdsuper.o mtdconcat.o mtdpart.o mtdchar.o
  
-+mtd-$(CONFIG_MTD_SPLIT)               += mtdsplit.o
++obj-$(CONFIG_MTD_SPLIT)               += mtdsplit/
 +
  obj-$(CONFIG_MTD_OF_PARTS)    += ofpart.o
  obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
similarity index 92%
rename from target/linux/generic/patches-3.18/407-mtd-old-firmware-uimage-splitter.patch
rename to target/linux/generic/patches-3.18/405-mtd-old-firmware-uimage-splitter.patch
index 34a4b1aa8cf2ecece0da57f32d7a6bc47207eb0c..a19202a87033ee657b0d7a9def5a07bb34292820 100644 (file)
 +
  source "drivers/mtd/mtdsplit/Kconfig"
  
- config MTD_SPLIT
+ endmenu
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -681,6 +681,37 @@ mtd_pad_erasesize(struct mtd_info *mtd,
+@@ -681,6 +681,37 @@ mtd_pad_erasesize(struct mtd_info *mtd, 
        return len;
  }
  
@@ -52,7 +52,7 @@
  #ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
  #define SPLIT_FIRMWARE_NAME   CONFIG_MTD_SPLIT_FIRMWARE_NAME
  #else
-@@ -689,7 +720,14 @@ mtd_pad_erasesize(struct mtd_info *mtd,
+@@ -689,7 +720,14 @@ mtd_pad_erasesize(struct mtd_info *mtd, 
  
  static void split_firmware(struct mtd_info *master, struct mtd_part *part)
  {
diff --git a/target/linux/generic/patches-3.18/406-mtd-hook-mtdsplit-into-Kbuild.patch b/target/linux/generic/patches-3.18/406-mtd-hook-mtdsplit-into-Kbuild.patch
deleted file mode 100644 (file)
index 008714b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
---- a/drivers/mtd/Kconfig
-+++ b/drivers/mtd/Kconfig
-@@ -27,6 +27,8 @@ config MTD_SPLIT_FIRMWARE_NAME
-       depends on MTD_SPLIT_FIRMWARE
-       default "firmware"
-+source "drivers/mtd/mtdsplit/Kconfig"
-+
- config MTD_SPLIT
-       def_bool n
-       help 
---- a/drivers/mtd/Makefile
-+++ b/drivers/mtd/Makefile
-@@ -7,6 +7,10 @@ obj-$(CONFIG_MTD)             += mtd.o
- mtd-y                         := mtdcore.o mtdsuper.o mtdconcat.o mtdpart.o mtdchar.o
- mtd-$(CONFIG_MTD_SPLIT)               += mtdsplit.o
-+mtd-$(CONFIG_MTD_SPLIT_SEAMA_FW) += mtdsplit_seama.o
-+mtd-$(CONFIG_MTD_SPLIT_SQUASHFS_ROOT) += mtdsplit_squashfs.o
-+mtd-$(CONFIG_MTD_SPLIT_UIMAGE_FW) += mtdsplit_uimage.o
-+mtd-$(CONFIG_MTD_SPLIT_LZMA_FW) += mtdsplit_lzma.o
- obj-$(CONFIG_MTD_OF_PARTS)    += ofpart.o
- obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
similarity index 97%
rename from target/linux/generic/patches-3.18/408-mtd-old-rootfs-squashfs-splitter.patch
rename to target/linux/generic/patches-3.18/406-mtd-old-rootfs-squashfs-splitter.patch
index ca819584321be55a84afd469f6ef0738db4eb815..d48a6814839e7042fb00ae8fb68c97fefd83d3ee 100644 (file)
@@ -14,7 +14,7 @@
        default y
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -681,6 +681,47 @@ mtd_pad_erasesize(struct mtd_info *mtd,
+@@ -681,6 +681,47 @@ mtd_pad_erasesize(struct mtd_info *mtd, 
        return len;
  }
  
index 4a17ccd8d6b5f2e3ed2d8798eeb77849826aa266..0bb7be08484561ea2bbc3477214704c8b1889178 100644 (file)
@@ -2,7 +2,7 @@
 +++ b/drivers/mtd/mtdpart.c
 @@ -35,6 +35,8 @@
  #include "mtdcore.h"
- #include "mtdsplit.h"
+ #include "mtdsplit/mtdsplit.h"
  
 +#define MTD_ERASE_PARTIAL     0x8000 /* partition only covers parts of an erase block */
 +
index ffc9e2199cf78b8bb63fb62d05ff435206ffa591..45af25dd61271244e899fd2293aa8051e19ca16c 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/Kconfig
 +++ b/drivers/mtd/Kconfig
-@@ -189,6 +189,22 @@ config MTD_BCM47XX_PARTS
+@@ -184,6 +184,22 @@ config MTD_BCM47XX_PARTS
          This provides partitions parser for devices based on BCM47xx
          boards.
  
@@ -25,7 +25,7 @@
  #
 --- a/drivers/mtd/Makefile
 +++ b/drivers/mtd/Makefile
-@@ -19,6 +19,7 @@ obj-$(CONFIG_MTD_AFS_PARTS)  += afs.o
+@@ -15,6 +15,7 @@ obj-$(CONFIG_MTD_AFS_PARTS)  += afs.o
  obj-$(CONFIG_MTD_AR7_PARTS)   += ar7part.o
  obj-$(CONFIG_MTD_BCM63XX_PARTS)       += bcm63xxpart.o
  obj-$(CONFIG_MTD_BCM47XX_PARTS)       += bcm47xxpart.o
index 4c4720341efe4d6afb516793fe63fde85f43ad9f..46881fca2c9419c39540070df53e499715afcedb 100644 (file)
@@ -17,7 +17,7 @@
                                 u64 offset, uint32_t mask_flags)
  {
        part->name = name;
-@@ -58,6 +59,26 @@ static void bcm47xxpart_add_part(struct
+@@ -58,6 +59,26 @@ static void bcm47xxpart_add_part(struct 
        part->mask_flags = mask_flags;
  }
  
index 5b73d3898b42be443494b1a73a85137ed5674b6b..5345678c56498611356ca93681870b7893757837 100644 (file)
@@ -8,7 +8,7 @@
  static struct proc_dir_entry *my_proc_entry;
  
  static char *yaffs_dump_dev_part0(char *buf, struct yaffs_dev *dev)
-@@ -3398,6 +3399,7 @@ static int yaffs_proc_write(struct file
+@@ -3398,6 +3399,7 @@ static int yaffs_proc_write(struct file 
                return yaffs_proc_debug_write(file, buf, count, data);
        return yaffs_proc_write_trace_options(file, buf, count, data);
  }