image: add support for building FIT image with filesystem
[openwrt/openwrt.git] / target / linux / generic / pending-5.4 / 491-ubi-auto-create-ubiblock-device-for-rootfs.patch
index 61fcbac92ef7488219d7a137168583c4cf3e09c8..88d609d9967b59a7d4ea3299e2aa1bdf053da2f2 100644 (file)
@@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 
 --- a/drivers/mtd/ubi/block.c
 +++ b/drivers/mtd/ubi/block.c
-@@ -652,6 +652,44 @@ static void __init ubiblock_create_from_
+@@ -652,6 +652,47 @@ static void __init ubiblock_create_from_
        }
  }
  
@@ -33,6 +33,9 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 +      for (ubi_num = 0; ubi_num < UBI_MAX_DEVICES; ubi_num++) {
 +              desc = ubi_open_volume_nm(ubi_num, "rootfs", UBI_READONLY);
 +              if (IS_ERR(desc))
++                      desc = ubi_open_volume_nm(ubi_num, "fit", UBI_READONLY);;
++
++              if (IS_ERR(desc))
 +                      continue;
 +
 +              ubi_get_volume_info(desc, &vi);