aboutsummaryrefslogtreecommitdiffstats
path: root/doc/hal/src/main.dox
blob: ef38a519f462f3319bc2883eb3927c63a619aea0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
d48ac600297fc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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);
 	}