diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2014-10-06 13:49:11 +0000 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2014-10-06 13:49:11 +0000 |
commit | 2fe5eba1d8281eded5b490b00d87394c000da0ae (patch) | |
tree | 561fd9a10bf22f0f4108ce535671154d21c6d7c0 /target/linux/generic/patches-3.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch | |
parent | bb492392747ea57deb54d4bbd52e5d5ce83a08a2 (diff) | |
download | master-187ad058-2fe5eba1d8281eded5b490b00d87394c000da0ae.tar.gz master-187ad058-2fe5eba1d8281eded5b490b00d87394c000da0ae.tar.bz2 master-187ad058-2fe5eba1d8281eded5b490b00d87394c000da0ae.zip |
kernel: allow rootfs splitters to work without CONFIG_MTD_ROOTFS_SPLIT
We want to remove that old (built-in) splitter at some point.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42804 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/patches-3.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch')
-rw-r--r-- | target/linux/generic/patches-3.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/target/linux/generic/patches-3.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch b/target/linux/generic/patches-3.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch index 92a3ee7633..00a2e0e6fa 100644 --- a/target/linux/generic/patches-3.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch +++ b/target/linux/generic/patches-3.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch @@ -38,18 +38,7 @@ static inline unsigned long mtd_pad_erasesize(struct mtd_info *mtd, int offset, int len) { -@@ -660,6 +691,10 @@ static void split_rootfs_data(struct mtd - unsigned int split_size; - int ret; - -+ ret = run_parsers_by_type(part, MTD_PARSER_TYPE_ROOTFS); -+ if (ret > 0) -+ return; -+ - ret = split_squashfs(master, part->offset, &split_offset); - if (ret) - return; -@@ -709,6 +744,12 @@ static void split_uimage(struct mtd_info +@@ -709,6 +740,12 @@ static void split_uimage(struct mtd_info static void split_firmware(struct mtd_info *master, struct mtd_part *part) { @@ -62,6 +51,20 @@ if (config_enabled(CONFIG_MTD_UIMAGE_SPLIT)) split_uimage(master, part); } +@@ -726,9 +763,12 @@ static void mtd_partition_split(struct m + return; + + if (!strcmp(part->mtd.name, "rootfs")) { ++ int ret; ++ + rootfs_found = 1; + +- if (config_enabled(CONFIG_MTD_ROOTFS_SPLIT)) ++ ret = run_parsers_by_type(part, MTD_PARSER_TYPE_ROOTFS); ++ if (ret <= 0 && config_enabled(CONFIG_MTD_ROOTFS_SPLIT)) + split_rootfs_data(master, part); + } + --- a/include/linux/mtd/partitions.h +++ b/include/linux/mtd/partitions.h @@ -70,6 +70,8 @@ struct mtd_part_parser_data { |