[PATCH openbmc 20/32] init: Use image of read only file system in RAM if present
OpenBMC Patches
openbmc-patches at stwcx.xyz
Sat Mar 5 23:30:11 AEDT 2016
From: "Milton D. Miller II" <miltonm at us.ibm.com>
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 at us.ibm.com>
---
.../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 d3b4b9f..538299e 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
--
2.7.1
More information about the openbmc
mailing list