summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAdrian Freihofer <adrian.freihofer@gmail.com>2021-11-12 23:29:18 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-13 16:11:28 +0000
commit9c3e6fd9b6d181c522f4cacff274599ad750c23a (patch)
treeedffe62fbc70ebe4c7233c5fb7e9d370056bcb17 /scripts
parent7ca8dd76eaad52833f5e67d3c707966e19755e92 (diff)
downloadpoky-9c3e6fd9b6d181c522f4cacff274599ad750c23a.tar.gz
runqemu: support rootfs mounted ro
Optionally allow to set QB_KERNEL_ROOT to e.g. "/dev/vda ro" to mount the rootfs reay-only in Qemu. (From OE-Core rev: 448eb1fd21287ba16b17e9402ce040b86ae3638c) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index d4f0888f8d..efb98ab9e0 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1266,7 +1266,13 @@ class BaseConfig(object):
1266 self.rootfs_options = vm_drive 1266 self.rootfs_options = vm_drive
1267 if not self.fstype in self.vmtypes: 1267 if not self.fstype in self.vmtypes:
1268 self.rootfs_options += ' -no-reboot' 1268 self.rootfs_options += ' -no-reboot'
1269 self.kernel_cmdline = 'root=%s rw' % (self.get('QB_KERNEL_ROOT')) 1269
1270 # By default, ' rw' is appended to QB_KERNEL_ROOT unless either ro or rw is explicitly passed.
1271 qb_kernel_root = self.get('QB_KERNEL_ROOT')
1272 qb_kernel_root_l = qb_kernel_root.split()
1273 if not ('ro' in qb_kernel_root_l or 'rw' in qb_kernel_root_l):
1274 qb_kernel_root += ' rw'
1275 self.kernel_cmdline = 'root=%s' % qb_kernel_root
1270 1276
1271 if self.fstype == 'nfs': 1277 if self.fstype == 'nfs':
1272 self.rootfs_options = '' 1278 self.rootfs_options = ''