generic: sync mtd rootfs hack with part_bits
authorDaniel Golle <daniel@makrotopia.org>
Sat, 26 Mar 2022 22:51:21 +0000 (22:51 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Sat, 26 Mar 2022 22:55:13 +0000 (22:55 +0000)
In commit ab143647ef ("kernel: generic: improve FIT partition parser")
part_bits was bumped to 2 in order to allow up to 3 additional FIT
sub-images mapped into sub-partitions.
This change has to be reflected also in our local patch
420-mtd-set-rootfs-to-be-root-dev.patch
which still assumed part_bits==1 for mtdblock devices in case of
CONFIG_FIT_PARTITION=y.

Fixes: #9557
Fixes: ab143647ef ("kernel: generic: improve FIT partition parser")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/generic/hack-5.10/420-mtd-set-rootfs-to-be-root-dev.patch

index 91a91b36cabee53e93de6fb207fecf224f364dca..b071ac61ecfe0abd50b9ed39d99dffa756060912 100644 (file)
@@ -32,7 +32,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 +              pr_notice("mtd: device %d (%s) set to be root filesystem\n",
 +                        mtd->index, mtd->name);
 +#ifdef CONFIG_FIT_PARTITION
-+              index <<= 1;
++              index <<= 2;
 +#endif
 +              ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, index);
 +      }