From a8f26b67add63a916409823c1fad4adf28776e2f Mon Sep 17 00:00:00 2001 From: "Milton D. Miller II" Date: Sat, 27 Feb 2016 16:04:32 -0600 Subject: 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 --- .../common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh index d3b4b9ff5..538299e4d 100644 --- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh +++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh @@ -159,6 +159,12 @@ then 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 -- cgit v1.2.1