mirror of
https://git.yoctoproject.org/poky
synced 2026-05-02 18:32:15 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
7ca8dd76ea
commit
9c3e6fd9b6
@@ -1266,7 +1266,13 @@ class BaseConfig(object):
|
||||
self.rootfs_options = vm_drive
|
||||
if not self.fstype in self.vmtypes:
|
||||
self.rootfs_options += ' -no-reboot'
|
||||
self.kernel_cmdline = 'root=%s rw' % (self.get('QB_KERNEL_ROOT'))
|
||||
|
||||
# By default, ' rw' is appended to QB_KERNEL_ROOT unless either ro or rw is explicitly passed.
|
||||
qb_kernel_root = self.get('QB_KERNEL_ROOT')
|
||||
qb_kernel_root_l = qb_kernel_root.split()
|
||||
if not ('ro' in qb_kernel_root_l or 'rw' in qb_kernel_root_l):
|
||||
qb_kernel_root += ' rw'
|
||||
self.kernel_cmdline = 'root=%s' % qb_kernel_root
|
||||
|
||||
if self.fstype == 'nfs':
|
||||
self.rootfs_options = ''
|
||||
|
||||
Reference in New Issue
Block a user