diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2015-09-08 15:25:49 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-12 22:48:42 +0100 |
commit | 77524d791b8320827518232ab4844f58574e0343 (patch) | |
tree | 0f39627a8203009a5301fe1cf12ee66b0513fffa /meta/recipes-core/initrdscripts | |
parent | d7508fee3037e050417d7f3d575f1a40bd96cb2c (diff) | |
download | openembedded-core-contrib-77524d791b8320827518232ab4844f58574e0343.tar.gz |
initramfs-framework: support ro boot parameter
Default is to mount the rootfs read/write. "ro" can be used to turn
that into read-only, which is useful on systems where userspace does
an fsck before remounting read-write.
Giving both "ro" and "rw" will still mount read-only regardless of the
order, because the ordering information is not preserved by the
initramfs-framework's boot param support.
(From OE-Core rev: a09f10f9360862c16fb68972ac041d474d6e3a64)
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/initrdscripts')
-rwxr-xr-x | meta/recipes-core/initrdscripts/initramfs-framework/finish | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/finish b/meta/recipes-core/initrdscripts/initramfs-framework/finish index 006aef202f..a8806aa3af 100755 --- a/meta/recipes-core/initrdscripts/initramfs-framework/finish +++ b/meta/recipes-core/initrdscripts/initramfs-framework/finish @@ -23,6 +23,12 @@ finish_run() { if [ -e "$bootparam_root" ]; then flags="" + if [ -n "$bootparam_ro" ]; then + if [ -n "$bootparam_rootflags" ]; then + bootparam_rootflags="$bootparam_rootflags," + fi + bootparam_rootflags="${bootparam_rootflags}ro" + fi if [ -n "$bootparam_rootflags" ]; then flags="$flags -o$bootparam_rootflags" fi |