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-08 09:12:05 +0100 |
commit | 6a64eb2664c13bc7d6800747066603c27fcad8e0 (patch) | |
tree | 0742eee6115142edc473519757cc4d99eb0ea326 /target/linux/generic/hack-5.10/420-mtd-set-rootfs-to-be-root-dev.patch | |
parent | 961e01fc67e7d9e60557df3474fa326216aa4839 (diff) | |
download | upstream-6a64eb2664c13bc7d6800747066603c27fcad8e0.tar.gz upstream-6a64eb2664c13bc7d6800747066603c27fcad8e0.tar.bz2 upstream-6a64eb2664c13bc7d6800747066603c27fcad8e0.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>
Diffstat (limited to 'target/linux/generic/hack-5.10/420-mtd-set-rootfs-to-be-root-dev.patch')
-rw-r--r-- | target/linux/generic/hack-5.10/420-mtd-set-rootfs-to-be-root-dev.patch | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/target/linux/generic/hack-5.10/420-mtd-set-rootfs-to-be-root-dev.patch b/target/linux/generic/hack-5.10/420-mtd-set-rootfs-to-be-root-dev.patch index fa3b175dcf..a70d8af4c2 100644 --- a/target/linux/generic/hack-5.10/420-mtd-set-rootfs-to-be-root-dev.patch +++ b/target/linux/generic/hack-5.10/420-mtd-set-rootfs-to-be-root-dev.patch @@ -20,7 +20,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> #include <linux/nvmem-provider.h> #include <linux/mtd/mtd.h> -@@ -759,6 +760,19 @@ int add_mtd_device(struct mtd_info *mtd) +@@ -759,6 +760,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); + } + |