From 4efaee5d71e13e5f64faac703394f717f2857661 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Mon, 7 Oct 2013 17:46:45 +0200 Subject: [PATCH] add support for patched rootfs Signed-off-by: John Crispin --- mount_root.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mount_root.c b/mount_root.c index f1474f0..8ebd64e 100644 --- a/mount_root.c +++ b/mount_root.c @@ -423,6 +423,9 @@ static int switch2jffs(void) { char mtd[32]; + if (!find_mtd_block("rootfs_patches", mtd, sizeof(mtd))) + return 0; + if (find_mtd_block("rootfs_data", mtd, sizeof(mtd))) { ERROR("no rootfs_data was found\n"); return -1; @@ -763,7 +766,9 @@ int main(int argc, char **argv) if (!getenv("PREINIT")) return -1; - if (find_mtd_char("rootfs_data", mtd, sizeof(mtd))) { + if (!find_mtd_block("rootfs_patches", mtd, sizeof(mtd))) { + ramoverlay(); + } else if (find_mtd_char("rootfs_data", mtd, sizeof(mtd))) { if (!find_mtd_char("rootfs", mtd, sizeof(mtd))) mtd_unlock(mtd); LOG("mounting /dev/root\n"); -- 2.25.1