[oe-commits] Patrick Ohly : initramfs-framework: support ro boot parameter

git at git.openembedded.org git at git.openembedded.org
Sat Sep 12 21:51:41 UTC 2015


Module: openembedded-core.git
Branch: master
Commit: a09f10f9360862c16fb68972ac041d474d6e3a64
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=a09f10f9360862c16fb68972ac041d474d6e3a64

Author: Patrick Ohly <patrick.ohly at intel.com>
Date:   Tue Sep  8 15:25:49 2015 +0200

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.

Signed-off-by: Patrick Ohly <patrick.ohly at intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>

---

 meta/recipes-core/initrdscripts/initramfs-framework/finish | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/finish b/meta/recipes-core/initrdscripts/initramfs-framework/finish
index 006aef2..a8806aa 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



More information about the Openembedded-commits mailing list