init: Use image of read only file system in RAM if present

If a read-only file system image is in /run, specifically
/run/image-rofs, then mount it instead of the mtd partition.

This will allow running from ram to allow the flash to be updated,
either from a downloaded image, a packaged image, or an image
copied at boot.

Signed-off-by: Milton Miller <miltonm@us.ibm.com>
diff --git a/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh b/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh
index d3b4b9f..538299e 100644
--- a/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh
+++ b/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh
@@ -159,6 +159,12 @@
 	fsck=$fsckbase$rwfst
 fi
 
+if test -s /run/image-rofs
+then
+	rodev=/run/image-rofs
+	roopts=$roopts,loop
+fi
+
 mount $rodev $rodir -t $rofst -o $roopts
 
 if test -x $rodir$fsck