2
0
forked from Ivasoft/openwrt

generic: 5.15: get uImage.FIT partition parser ready

Prepare uImage.FIT partition parser for Linux 5.15

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
This commit is contained in:
Daniel Golle
2022-01-07 17:39:42 +00:00
parent 71efd34700
commit 30a5e07390
5 changed files with 31 additions and 149 deletions

View File

@@ -20,7 +20,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
#include <linux/nvmem-provider.h>
#include <linux/mtd/mtd.h>
@@ -694,6 +695,19 @@ int add_mtd_device(struct mtd_info *mtd)
@@ -694,6 +695,16 @@ int add_mtd_device(struct mtd_info *mtd)
of this try_ nonsense, and no bitching about it
either. :) */
__module_get(THIS_MODULE);
@@ -31,9 +31,6 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
+ 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);
+ }
+