diff options
author | Milton D. Miller II <miltonm@us.ibm.com> | 2016-02-27 16:04:32 -0600 |
---|---|---|
committer | Milton D. Miller II <miltonm@us.ibm.com> | 2016-03-04 10:51:49 -0600 |
commit | a8f26b67add63a916409823c1fad4adf28776e2f (patch) | |
tree | a1e17db791129a4234c90b0d7921452ea54532f4 /meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs | |
parent | 90b68474b0708c74e49947de0d495a311b9f54ac (diff) | |
download | talos-openbmc-a8f26b67add63a916409823c1fad4adf28776e2f.tar.gz talos-openbmc-a8f26b67add63a916409823c1fad4adf28776e2f.zip |
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>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs')
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh | 6 |
1 files changed, 6 insertions, 0 deletions
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 |