diff options
author | Konrad Weihmann <kweihmann@outlook.com> | 2020-04-15 20:39:31 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-04-24 14:10:08 +0100 |
commit | 8361b47d7ff190f84e8bd81507cde01d74ca7c1c (patch) | |
tree | 3c0425c10eee0830f29149850fca48dd50813887 /meta/classes/qemuboot.bbclass | |
parent | 892c64e7c15c5caa3e40afe4fa7a37c08cc27bc2 (diff) | |
download | poky-8361b47d7ff190f84e8bd81507cde01d74ca7c1c.tar.gz |
runqemu: add QB_ROOTFS_EXTRA_OPT parameter
Content of the optional parameter will be appended to the rootfs-device
in the qemu configuration, in case QB_ROOTFS_OPT is not specified.
By default this is empty.
Example use cases are:
Defining 'readonly' when using squashfs, so multiple instances of qemu
can share the same base image, something that cannot be done by just
specifying 'snapshot'.
Defining 'bootindex=0' which helps to get past the EFI shell in
ovmf-binary. This also enables the use case of running WIC images with
EFI bootloader through the testimage.bbclass.
(From OE-Core rev: e9b8c194636cb5505774a2a71bf54450580dd5b8)
Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/qemuboot.bbclass')
-rw-r--r-- | meta/classes/qemuboot.bbclass | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass index 68f7a03619..3162e7a8eb 100644 --- a/meta/classes/qemuboot.bbclass +++ b/meta/classes/qemuboot.bbclass | |||
@@ -65,6 +65,10 @@ | |||
65 | # " -device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon" | 65 | # " -device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon" |
66 | # Note, runqemu will replace "@PORT@" with the port number which is used. | 66 | # Note, runqemu will replace "@PORT@" with the port number which is used. |
67 | # | 67 | # |
68 | # QB_ROOTFS_EXTRA_OPT: extra options to be appended to the rootfs device in case there is none specified by QB_ROOTFS_OPT. | ||
69 | # Can be used to automatically determine the image from the other variables | ||
70 | # but define things link 'bootindex' when booting from EFI or 'readonly' when using squashfs | ||
71 | # without the need to specify a dedicated qemu configuration | ||
68 | # Usage: | 72 | # Usage: |
69 | # IMAGE_CLASSES += "qemuboot" | 73 | # IMAGE_CLASSES += "qemuboot" |
70 | # See "runqemu help" for more info | 74 | # See "runqemu help" for more info |
@@ -77,6 +81,7 @@ QB_OPT_APPEND ?= "-show-cursor" | |||
77 | QB_NETWORK_DEVICE ?= "-device virtio-net-pci,netdev=net0,mac=@MAC@" | 81 | QB_NETWORK_DEVICE ?= "-device virtio-net-pci,netdev=net0,mac=@MAC@" |
78 | QB_CMDLINE_IP_SLIRP ?= "ip=dhcp" | 82 | QB_CMDLINE_IP_SLIRP ?= "ip=dhcp" |
79 | QB_CMDLINE_IP_TAP ?= "ip=192.168.7.@CLIENT@::192.168.7.@GATEWAY@:255.255.255.0" | 83 | QB_CMDLINE_IP_TAP ?= "ip=192.168.7.@CLIENT@::192.168.7.@GATEWAY@:255.255.255.0" |
84 | QB_ROOTFS_EXTRA_OPT ?= "" | ||
80 | 85 | ||
81 | # This should be kept align with ROOT_VM | 86 | # This should be kept align with ROOT_VM |
82 | QB_DRIVE_TYPE ?= "/dev/sd" | 87 | QB_DRIVE_TYPE ?= "/dev/sd" |