]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: add DEPLOY_DIR_IMAGE replacement in QB_OPT_APPEND
authorJon Mason <jdmason@kudzu.us>
Wed, 13 Oct 2021 14:36:30 +0000 (10:36 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 14 Oct 2021 21:31:56 +0000 (22:31 +0100)
Add the ability to replace DEPLOY_DIR_IMAGE with that path in
QB_OPT_APPEND.  This allows for anything present in DEPLOY_DIR_IMAGE to
be passed into the qemu parameters.  This is especially useful if you
want to run multiple flash images (as -bios only allows for one).

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu

index 3268bb18ada692b867e567750af180a429b1e28b..54f2336ba97727ecb4855cb083fa9acd1b792986 100755 (executable)
@@ -1412,7 +1412,7 @@ class BaseConfig(object):
         if not os.access(qemu_bin, os.X_OK):
             raise OEPathError("No QEMU binary '%s' could be found" % qemu_bin)
 
-        self.qemu_opt = "%s %s %s %s %s" % (qemu_bin, self.get('NETWORK_CMD'), self.get('QB_RNG'), self.get('ROOTFS_OPTIONS'), self.get('QB_OPT_APPEND'))
+        self.qemu_opt = "%s %s %s %s %s" % (qemu_bin, self.get('NETWORK_CMD'), self.get('QB_RNG'), self.get('ROOTFS_OPTIONS'), self.get('QB_OPT_APPEND').replace('@DEPLOY_DIR_IMAGE@', self.get('DEPLOY_DIR_IMAGE')))
 
         for ovmf in self.ovmf_bios:
             format = ovmf.rsplit('.', 1)[-1]