diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2020-02-23 13:20:11 +0100 |
---|---|---|
committer | Koen Vandeputte <koen.vandeputte@ncentric.com> | 2020-02-28 17:50:45 +0100 |
commit | c16517d26de30c90dabce1e456615fd7fbdce07c (patch) | |
tree | e7371ee12a3c413a064885b634ee4c975ad7f96a /target/linux/generic/pending-5.4/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch | |
parent | 955634b473284847e3c8281a6ac85655329d8b06 (diff) | |
download | upstream-c16517d26de30c90dabce1e456615fd7fbdce07c.tar.gz upstream-c16517d26de30c90dabce1e456615fd7fbdce07c.tar.bz2 upstream-c16517d26de30c90dabce1e456615fd7fbdce07c.zip |
kernel: copy kernel 4.19 code to 5.4
No changes were done to the patches while coping them. Currently they do
not apply on top of kernel 5.4.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target/linux/generic/pending-5.4/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch')
-rw-r--r-- | target/linux/generic/pending-5.4/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/target/linux/generic/pending-5.4/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch b/target/linux/generic/pending-5.4/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch new file mode 100644 index 0000000000..58d2e44574 --- /dev/null +++ b/target/linux/generic/pending-5.4/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch @@ -0,0 +1,44 @@ +From: Gabor Juhos <juhosg@openwrt.org> +Subject: kernel/3.10: allow to use partition parsers for rootfs and firmware split + +lede-commit: 3b71cd94bc9517bc25267dccb393b07d4b54564e +Signed-off-by: Gabor Juhos <juhosg@openwrt.org> +--- + drivers/mtd/mtdpart.c | 37 +++++++++++++++++++++++++++++++++++++ + include/linux/mtd/partitions.h | 2 ++ + 2 files changed, 39 insertions(+) + +--- a/drivers/mtd/mtdpart.c ++++ b/drivers/mtd/mtdpart.c +@@ -759,6 +759,7 @@ run_parsers_by_type(struct mtd_part *sla + + static void split_firmware(struct mtd_info *master, struct mtd_part *part) + { ++ run_parsers_by_type(part, MTD_PARSER_TYPE_FIRMWARE); + } + + static void mtd_partition_split(struct mtd_info *master, struct mtd_part *part) +@@ -768,6 +769,12 @@ static void mtd_partition_split(struct m + if (rootfs_found) + return; + ++ if (!strcmp(part->mtd.name, "rootfs")) { ++ run_parsers_by_type(part, MTD_PARSER_TYPE_ROOTFS); ++ ++ rootfs_found = 1; ++ } ++ + if (IS_ENABLED(CONFIG_MTD_SPLIT_FIRMWARE) && + !strcmp(part->mtd.name, SPLIT_FIRMWARE_NAME) && + !of_find_property(mtd_get_of_node(&part->mtd), "compatible", NULL)) +--- a/include/linux/mtd/partitions.h ++++ b/include/linux/mtd/partitions.h +@@ -75,6 +75,8 @@ struct mtd_part_parser_data { + + enum mtd_parser_type { + MTD_PARSER_TYPE_DEVICE = 0, ++ MTD_PARSER_TYPE_ROOTFS, ++ MTD_PARSER_TYPE_FIRMWARE, + }; + + struct mtd_part_parser { |