summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPhil Wise <phil@advancedtelematic.com>2017-08-07 15:47:58 +0200
committerPhil Wise <phil@advancedtelematic.com>2017-09-13 16:58:59 +0200
commit9f5623f22b2f1b4f58a6b41a51193cd441042d4e (patch)
tree5496da2de204005b43ffba801d60403c7068d9ca /scripts
parent1f7c727d507146b39ccf443f09cc68237cc79d5c (diff)
downloadmeta-updater-9f5623f22b2f1b4f58a6b41a51193cd441042d4e.tar.gz
Make it easier to build from branches and run a specific image
Is is now easy to build a specific branch by adding the following line to local.conf BRANCH_pn-aktualizr = "mybranchname" Also, the run-qemu-ota script can also take a path to an image file, which is useful for long-term test images.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/run-qemu-ota10
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
123def main(): 126def 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')