diff options
| author | Daniel Golle <daniel@makrotopia.org> | 2023-07-06 20:55:17 +0200 |
|---|---|---|
| committer | Daniel Golle <daniel@makrotopia.org> | 2023-07-07 14:01:39 +0200 |
| commit | e386b279fdab758f75160636bca5385dae202aee (patch) | |
| tree | 40c7f03accf1f90d97375903fb15c11a7bc0bb85 /target/linux/generic | |
| parent | bc91784f26b2816c949ad4b102930ccd449e2881 (diff) | |
| download | upstream-e386b279fdab758f75160636bca5385dae202aee.tar.gz upstream-e386b279fdab758f75160636bca5385dae202aee.tar.bz2 upstream-e386b279fdab758f75160636bca5385dae202aee.zip | |
generic: 6.1: fix uImage.FIT partitions on mtdblock and ubiblock
When refreshing the hack patches for Linux 6.1 the part of the uImage.FIT
partition parser patch which takes care of allowing mtdblock and ubiblock
devices to have partitions has been dropped, supposedly by accident.
Re-add a that part to the patch, so devices using a uImage.FIT filesystem
sub-image as rootfs can work with Linux 6.1.
Fixes: 19a246bb65 ("generic: 6.1: manually refresh hack patches")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/generic')
| -rw-r--r-- | target/linux/generic/hack-6.1/410-block-fit-partition-parser.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/target/linux/generic/hack-6.1/410-block-fit-partition-parser.patch b/target/linux/generic/hack-6.1/410-block-fit-partition-parser.patch index 0384dad85e5..1258f64722a 100644 --- a/target/linux/generic/hack-6.1/410-block-fit-partition-parser.patch +++ b/target/linux/generic/hack-6.1/410-block-fit-partition-parser.patch @@ -179,6 +179,32 @@ Subject: [PATCH] kernel: add block fit partition parser {0, NULL}, }; +--- a/drivers/mtd/mtd_blkdevs.c ++++ b/drivers/mtd/mtd_blkdevs.c +@@ -359,7 +359,9 @@ int add_mtd_blktrans_dev(struct mtd_blkt + } else { + snprintf(gd->disk_name, sizeof(gd->disk_name), + "%s%d", tr->name, new->devnum); +- gd->flags |= GENHD_FL_NO_PART; ++ ++ if (!IS_ENABLED(CONFIG_FIT_PARTITION) || mtd_type_is_nand(new->mtd)) ++ gd->flags |= GENHD_FL_NO_PART; + } + + set_capacity(gd, ((u64)new->size * tr->blksize) >> 9); +--- a/drivers/mtd/ubi/block.c ++++ b/drivers/mtd/ubi/block.c +@@ -431,7 +431,9 @@ int ubiblock_create(struct ubi_volume_in + ret = -ENODEV; + goto out_cleanup_disk; + } +- gd->flags |= GENHD_FL_NO_PART; ++ if (!IS_ENABLED(CONFIG_FIT_PARTITION)) ++ gd->flags |= GENHD_FL_NO_PART; ++ + gd->private_data = dev; + sprintf(gd->disk_name, "ubiblock%d_%d", dev->ubi_num, dev->vol_id); + set_capacity(gd, disk_capacity); --- a/include/linux/msdos_partition.h +++ b/include/linux/msdos_partition.h @@ -31,6 +31,7 @@ enum msdos_sys_ind { |
