diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2022-11-07 23:39:52 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2022-11-21 14:05:50 +0100 |
commit | af20d9d03bbe080fd9b27024acf5fca7bec15e4f (patch) | |
tree | 27f3cd09fa538cf6e0801797c1805705761499b8 /target/linux/generic/hack-5.10/421-mtd-fix-squashfs-root-on-targets-with-CONFIG_FIT_PAR.patch | |
parent | 8c1f8f997841de13c32b9e083c2c6b85c0f6f590 (diff) | |
download | upstream-af20d9d03bbe080fd9b27024acf5fca7bec15e4f.tar.gz upstream-af20d9d03bbe080fd9b27024acf5fca7bec15e4f.tar.bz2 upstream-af20d9d03bbe080fd9b27024acf5fca7bec15e4f.zip |
kernel: split out mtd hack for CONFIG_FIT_PARTITION + rootfs
This is some hack on top of our old hack. Use separated patch for it so
it's easier to understand and actually possible to describe. We should
ideally get rid of this (and we actually did with kernels 5.15+).
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 6a64eb2664c13bc7d6800747066603c27fcad8e0)
Diffstat (limited to 'target/linux/generic/hack-5.10/421-mtd-fix-squashfs-root-on-targets-with-CONFIG_FIT_PAR.patch')
-rw-r--r-- | target/linux/generic/hack-5.10/421-mtd-fix-squashfs-root-on-targets-with-CONFIG_FIT_PAR.patch | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/target/linux/generic/hack-5.10/421-mtd-fix-squashfs-root-on-targets-with-CONFIG_FIT_PAR.patch b/target/linux/generic/hack-5.10/421-mtd-fix-squashfs-root-on-targets-with-CONFIG_FIT_PAR.patch new file mode 100644 index 0000000000..2f7da2aaba --- /dev/null +++ b/target/linux/generic/hack-5.10/421-mtd-fix-squashfs-root-on-targets-with-CONFIG_FIT_PAR.patch @@ -0,0 +1,19 @@ +From: Felix Fietkau <nbd@nbd.name> +Date: Sat Apr 10 17:00:57 2021 +0200 +Subject: [PATCH] mtd: fix squashfs root on targets with CONFIG_FIT_PARTITION + +Fix assumption about the block device index +--- + +--- a/drivers/mtd/mtdcore.c ++++ b/drivers/mtd/mtdcore.c +@@ -767,6 +767,9 @@ int add_mtd_device(struct mtd_info *mtd) + unsigned int index = mtd->index; + pr_notice("mtd: device %d (%s) set to be root filesystem\n", + mtd->index, mtd->name); ++#ifdef CONFIG_FIT_PARTITION ++ index <<= 2; ++#endif + ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, index); + } + |