kernel: add pending fitblk uImage.FIT sub-image block driver
[openwrt/staging/dangole.git] / target / linux / generic / pending-6.1 / 511-init-bypass-device-lookup-for-dev-fit-rootfs.patch
1 From 5ede3f8aed9a1a579bf7304142600d1f3500add9 Mon Sep 17 00:00:00 2001
2 From: Daniel Golle <daniel@makrotopia.org>
3 Date: Mon, 12 Jun 2023 03:58:42 +0100
4 Subject: [PATCH 2/2] init: bypass device lookup for /dev/fit* rootfs
5
6 Allow 'rootwait' as /dev/fit* can show up late if the underlaying
7 device is probed late.
8
9 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
10 ---
11 init/do_mounts.c | 3 ++-
12 1 file changed, 2 insertions(+), 1 deletion(-)
13
14 --- a/init/do_mounts.c
15 +++ b/init/do_mounts.c
16 @@ -645,7 +645,8 @@ void __init prepare_namespace(void)
17
18 if (saved_root_name[0]) {
19 root_device_name = saved_root_name;
20 - if (!strncmp(root_device_name, "mtd", 3) ||
21 + if (!strncmp(root_device_name, "fit", 3) ||
22 + !strncmp(root_device_name, "mtd", 3) ||
23 !strncmp(root_device_name, "ubi", 3)) {
24 mount_block_root(root_device_name, root_mountflags);
25 goto out;