mirror of
https://git.yoctoproject.org/poky
synced 2026-04-22 15:32:14 +02:00
targetcontrol.py: use oe.types.boolean for QEMU_USE_KVM
So that both QEMU_USE_KVM = "True" and "1" will work. [YOCTO #12343] (From OE-Core rev: f28890ae2eb8a9cb2da39588e696a4b0c501bdf0) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
7c99808915
commit
60ceabb922
@@ -215,7 +215,7 @@ def testimage_main(d):
|
||||
# Get use_kvm
|
||||
qemu_use_kvm = d.getVar("QEMU_USE_KVM")
|
||||
if qemu_use_kvm and \
|
||||
(qemu_use_kvm == 'True' and 'x86' in machine or \
|
||||
(oe.types.boolean(qemu_use_kvm) and 'x86' in machine or \
|
||||
d.getVar('MACHINE') in qemu_use_kvm.split()):
|
||||
kvm = True
|
||||
else:
|
||||
|
||||
@@ -91,6 +91,8 @@ class QemuTarget(BaseTarget):
|
||||
|
||||
def __init__(self, d, logger, image_fstype=None):
|
||||
|
||||
import oe.types
|
||||
|
||||
super(QemuTarget, self).__init__(d, logger)
|
||||
|
||||
self.rootfs = ''
|
||||
@@ -107,7 +109,7 @@ class QemuTarget(BaseTarget):
|
||||
dump_dir = d.getVar("TESTIMAGE_DUMP_DIR")
|
||||
qemu_use_kvm = d.getVar("QEMU_USE_KVM")
|
||||
if qemu_use_kvm and \
|
||||
(qemu_use_kvm == "True" and "x86" in d.getVar("MACHINE") or \
|
||||
(oe.types.boolean(qemu_use_kvm) and "x86" in d.getVar("MACHINE") or \
|
||||
d.getVar("MACHINE") in qemu_use_kvm.split()):
|
||||
use_kvm = True
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user