Skip to content

Commit

Permalink
generic: sync mtd rootfs hack with part_bits
Browse files Browse the repository at this point in the history
In commit ab14364 ("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: openwrt#9557
Fixes: ab14364 ("kernel: generic: improve FIT partition parser")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  • Loading branch information
dangowrt committed Mar 26, 2022
1 parent 2c26eb4 commit 13960fb
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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);
+ }
Expand Down

0 comments on commit 13960fb

Please sign in to comment.