of the following environment variables (in any order):
KERNEL - the kernel image file to use
ROOTFS - the rootfs image file or nfsroot directory to use
+ DEVICE_TREE - the device tree blob to use
MACHINE - the machine name (optional, autodetected from KERNEL filename if unspecified)
Simplified QEMU command-line options can be passed with:
nographic - disable video console
self.env_vars = ('MACHINE',
'ROOTFS',
'KERNEL',
+ 'DEVICE_TREE',
'DEPLOY_DIR_IMAGE',
'OE_TMPDIR',
'OECORE_NATIVE_SYSROOT',
raise RunQemuError("Can't find OVMF firmware: %s" % ovmf)
def check_kernel(self):
- """Check and set kernel, dtb"""
+ """Check and set kernel"""
# The vm image doesn't need a kernel
if self.fstype in self.vmtypes:
return
if not os.path.exists(self.kernel):
raise RunQemuError("KERNEL %s not found" % self.kernel)
+ def check_dtb(self):
+ """Check and set dtb"""
+ # Did the user specify a device tree?
+ if self.get('DEVICE_TREE'):
+ self.dtb = self.get('DEVICE_TREE')
+ if not os.path.exists(self.dtb):
+ raise RunQemuError('Specified DTB not found: %s' % self.dtb)
+ return
+
dtb = self.get('QB_DTB')
if dtb:
+ deploy_dir_image = self.get('DEPLOY_DIR_IMAGE')
cmd_match = "%s/%s" % (deploy_dir_image, dtb)
cmd_startswith = "%s/%s*" % (deploy_dir_image, dtb)
cmd_wild = "%s/*.dtb" % deploy_dir_image
self.check_rootfs()
self.check_ovmf()
self.check_kernel()
+ self.check_dtb()
self.check_biosdir()
self.check_mem()
self.check_tcpserial()