aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/pending-4.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2018-12-03 11:16:03 +0100
committerRafał Miłecki <rafal@milecki.pl>2018-12-03 11:26:05 +0100
commit7e88753ace0022bd56f77a7a647894f2936cf17b (patch)
tree02dcbc8fb198187754577fd796ed890a46e81302 /target/linux/generic/pending-4.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
parente24983e710dd7a22909e26af1ad8ee8d027b5c71 (diff)
downloadupstream-7e88753ace0022bd56f77a7a647894f2936cf17b.tar.gz
upstream-7e88753ace0022bd56f77a7a647894f2936cf17b.tar.bz2
upstream-7e88753ace0022bd56f77a7a647894f2936cf17b.zip
kernel: use add_mtd_partitions() helper when using OpenWrt parsers
This helper uses hierarchical partitions layout following the way upstream parsers work. It's closer to what we should use when mainlining our solutions. It also doesn't require hacky casting of struct mtd_partition to the const. THIS WILL AFFECT KERNEL PRINTING PARTITIONS IN THE LOG Something like: [ 3.930158] 0x0000004e0000-0x000001fb0000 : "rootfs_data" will get replaced by: [ 3.907338] Creating 1 MTD partitions on "rootfs": [ 3.912142] 0x00000031d400-0x000001ded400 : "rootfs_data" It's important to understand that "rootfs_data" in above example is a *subpartition* of the "rootfs" now. To get absolute addresses (e.g. for some debugging purposes) one has to add them to the "rootfs", e.g. [ 3.912548] 0x0000001c2c00-0x000001fb0000 : "rootfs" (0x1c2c00 + 0x31d400 = 0x4e0000) Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/generic/pending-4.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch')
-rw-r--r--target/linux/generic/pending-4.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/generic/pending-4.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch b/target/linux/generic/pending-4.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
index e870663355..f8b6266f2d 100644
--- a/target/linux/generic/pending-4.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
+++ b/target/linux/generic/pending-4.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
@@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
-@@ -793,6 +793,7 @@ run_parsers_by_type(struct mtd_part *sla
+@@ -785,6 +785,7 @@ static int run_parsers_by_type(struct mt
static void split_firmware(struct mtd_info *master, struct mtd_part *part)
{
@@ -18,7 +18,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
}
static void mtd_partition_split(struct mtd_info *master, struct mtd_part *part)
-@@ -802,6 +803,12 @@ static void mtd_partition_split(struct m
+@@ -794,6 +795,12 @@ static void mtd_partition_split(struct m
if (rootfs_found)
return;