aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2022-04-30 15:14:01 +0100
committerDaniel Golle <daniel@makrotopia.org>2022-04-30 16:00:05 +0100
commit2acf355e56fa099bbd4ac881aed642b8df6022e7 (patch)
tree91987140de1dfdd09b427088ebd1baebd926a110 /target/linux/generic
parent27fac9c08f89ac2bf9556afefe8f98a7387fed9e (diff)
downloadupstream-2acf355e56fa099bbd4ac881aed642b8df6022e7.tar.gz
upstream-2acf355e56fa099bbd4ac881aed642b8df6022e7.tar.bz2
upstream-2acf355e56fa099bbd4ac881aed642b8df6022e7.zip
kernel: don't parse FIT partition on NAND-backed mtdblock
ubiblock devices should be used on NAND flash to store the uImage.FIT in case the bootloader supports that -- otherwise only rootfs is stored in UBI while the uImage.FIT contains only the kernel and dtb. Hence there is no need to enable parsing partitions on NAND mtdblock devices, it is even responsible for the ugly warning on-opening of the mtdblock device now. Just don't do it. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/generic')
-rw-r--r--target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch7
1 files changed, 3 insertions, 4 deletions
diff --git a/target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch b/target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch
index 5edacd5eae..7539bc8627 100644
--- a/target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch
+++ b/target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch
@@ -112,13 +112,12 @@
dev->gd = gd;
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
-@@ -345,6 +345,9 @@ int add_mtd_blktrans_dev(struct mtd_blkt
+@@ -345,6 +345,8 @@ int add_mtd_blktrans_dev(struct mtd_blkt
gd->first_minor = (new->devnum) << tr->part_bits;
gd->minors = 1 << tr->part_bits;
gd->fops = &mtd_block_ops;
-+#ifdef CONFIG_FIT_PARTITION
-+ gd->flags |= GENHD_FL_EXT_DEVT;
-+#endif
++ if (IS_ENABLED(CONFIG_FIT_PARTITION) && !mtd_type_is_nand(new->mtd))
++ gd->flags |= GENHD_FL_EXT_DEVT;
if (tr->part_bits)
if (new->devnum < 26)