From 9f5623f22b2f1b4f58a6b41a51193cd441042d4e Mon Sep 17 00:00:00 2001 From: Phil Wise Date: Mon, 7 Aug 2017 15:47:58 +0200 Subject: 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. --- recipes-sota/aktualizr/aktualizr_git.bb | 4 +++- scripts/run-qemu-ota | 10 +++++++--- 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 RDEPENDS_${PN}_append = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm-test', ' softhsm softhsm-testtoken', '', d)}" SRC_URI = " \ - git://github.com/advancedtelematic/aktualizr \ + git://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \ " SRCREV = "1004efa3f86cef90c012b34620992b5762b741e3" +BRANCH ?= "master" + PV = "1.0+git${SRCPV}" PR = "7" 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): if not exists(uboot): raise ValueError("U-Boot image %s does not exist" % uboot) self.bios = uboot - ext = EXTENSIONS.get(self.machine, 'wic') - image = join(args.dir, self.machine, '%s-%s.%s' % (args.imagename, self.machine, ext)) + if exists(args.imagename): + image = args.imagename + else: + ext = EXTENSIONS.get(self.machine, 'wic') + image = join(args.dir, self.machine, '%s-%s.%s' % (args.imagename, self.machine, ext)) self.image = realpath(image) if not exists(self.image): raise ValueError("OS image %s does not exist" % self.image) @@ -122,7 +125,8 @@ class QemuCommand(object): def main(): parser = ArgumentParser(description='Run meta-updater image in qemu') - parser.add_argument('imagename', default='core-image-minimal', nargs='?') + parser.add_argument('imagename', default='core-image-minimal', nargs='?', + help="Either the name of the bitbake image target, or a path to the image to run") parser.add_argument('mac', default=None, nargs='?') parser.add_argument('--dir', default=DEFAULT_DIR, help='Path to build directory containing the image and u-boot-qemux86-64.rom') -- cgit v1.2.3-54-g00ecf