diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/run-qemu-ota | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/run-qemu-ota b/scripts/run-qemu-ota index 7f84d08..5334814 100755 --- a/scripts/run-qemu-ota +++ b/scripts/run-qemu-ota | |||
| @@ -60,8 +60,11 @@ class QemuCommand(object): | |||
| 60 | if not exists(uboot): | 60 | if not exists(uboot): |
| 61 | raise ValueError("U-Boot image %s does not exist" % uboot) | 61 | raise ValueError("U-Boot image %s does not exist" % uboot) |
| 62 | self.bios = uboot | 62 | self.bios = uboot |
| 63 | ext = EXTENSIONS.get(self.machine, 'wic') | 63 | if exists(args.imagename): |
| 64 | image = join(args.dir, self.machine, '%s-%s.%s' % (args.imagename, self.machine, ext)) | 64 | image = args.imagename |
| 65 | else: | ||
| 66 | ext = EXTENSIONS.get(self.machine, 'wic') | ||
| 67 | image = join(args.dir, self.machine, '%s-%s.%s' % (args.imagename, self.machine, ext)) | ||
| 65 | self.image = realpath(image) | 68 | self.image = realpath(image) |
| 66 | if not exists(self.image): | 69 | if not exists(self.image): |
| 67 | raise ValueError("OS image %s does not exist" % self.image) | 70 | raise ValueError("OS image %s does not exist" % self.image) |
| @@ -122,7 +125,8 @@ class QemuCommand(object): | |||
| 122 | 125 | ||
| 123 | def main(): | 126 | def main(): |
| 124 | parser = ArgumentParser(description='Run meta-updater image in qemu') | 127 | parser = ArgumentParser(description='Run meta-updater image in qemu') |
| 125 | parser.add_argument('imagename', default='core-image-minimal', nargs='?') | 128 | parser.add_argument('imagename', default='core-image-minimal', nargs='?', |
| 129 | help="Either the name of the bitbake image target, or a path to the image to run") | ||
| 126 | parser.add_argument('mac', default=None, nargs='?') | 130 | parser.add_argument('mac', default=None, nargs='?') |
| 127 | parser.add_argument('--dir', default=DEFAULT_DIR, | 131 | parser.add_argument('--dir', default=DEFAULT_DIR, |
| 128 | help='Path to build directory containing the image and u-boot-qemux86-64.rom') | 132 | help='Path to build directory containing the image and u-boot-qemux86-64.rom') |
