summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2017-09-13 17:40:04 +0200
committerGitHub <noreply@github.com>2017-09-13 17:40:04 +0200
commite789ff50f9d11f838a3e1cd985cb3ae34c1ca764 (patch)
tree5496da2de204005b43ffba801d60403c7068d9ca
parent1f7c727d507146b39ccf443f09cc68237cc79d5c (diff)
parent9f5623f22b2f1b4f58a6b41a51193cd441042d4e (diff)
downloadmeta-updater-e789ff50f9d11f838a3e1cd985cb3ae34c1ca764.tar.gz
Merge pull request #142 from advancedtelematic/feat/development-tools-pyro
Make it easier to build from branches and run a specific image
-rw-r--r--recipes-sota/aktualizr/aktualizr_git.bb4
-rwxr-xr-xscripts/run-qemu-ota10
2 files changed, 10 insertions, 4 deletions
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb
index bd85b2a..2d0dadc 100644
--- a/recipes-sota/aktualizr/aktualizr_git.bb
+++ b/recipes-sota/aktualizr/aktualizr_git.bb
@@ -13,9 +13,11 @@ RDEPENDS_${PN}_append = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' e
13RDEPENDS_${PN}_append = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm-test', ' softhsm softhsm-testtoken', '', d)}" 13RDEPENDS_${PN}_append = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm-test', ' softhsm softhsm-testtoken', '', d)}"
14 14
15SRC_URI = " \ 15SRC_URI = " \
16 git://github.com/advancedtelematic/aktualizr \ 16 git://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \
17 " 17 "
18SRCREV = "1004efa3f86cef90c012b34620992b5762b741e3" 18SRCREV = "1004efa3f86cef90c012b34620992b5762b741e3"
19BRANCH ?= "master"
20
19PV = "1.0+git${SRCPV}" 21PV = "1.0+git${SRCPV}"
20PR = "7" 22PR = "7"
21 23
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')