From patchwork Wed Nov 21 11:29:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Pigott X-Patchwork-Id: 13040 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 8E7D723EFB for ; Wed, 21 Nov 2012 11:29:15 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 1F7DBA1969B for ; Wed, 21 Nov 2012 11:29:15 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so9630208iej.11 for ; Wed, 21 Nov 2012 03:29:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :content-type:mime-version:x-launchpad-project:x-launchpad-branch :x-launchpad-message-rationale:x-launchpad-branch-revision-number :x-launchpad-notification-type:to:from:subject:message-id:date :reply-to:sender:errors-to:precedence:x-generated-by :x-launchpad-hash:x-gm-message-state; bh=RZp0g7OnyrEbFGBNiM3qjAP7sHg5sQqtP9FcdoHrU4o=; b=ojw1iI8F8IhymYIZEIIsYVxBsKk61OmQUscm8Xnau1h5ZedLeYVpFVeeCEj5WQ6iqw KkIgXTf8E6vhhuJVriJU1wxjaTH0ti32PGkRaHH3XtwikGHEqX/JaB8DZ04K7/Bsfx3x LNtux4hsK+pVTf5AQIAJpCFZ/TQj4qTS2wMWSM2ieGr2b4WNKlfpUlPvd7LLhy3H50/q pSMc2cn50BBMdTxLoCMYoW46Umo+8lrEsWZClpqxogYs42sPMDnvbZLDiywJXshdOOQK sNmyzoX7RkrASyHxEUls0meL8wWOK/DDAgqdbgT0n/xaTGd5FTFErPC7l3sKcdt1m9Or ZdUQ== Received: by 10.50.187.197 with SMTP id fu5mr13078041igc.70.1353497354562; Wed, 21 Nov 2012 03:29:14 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp11898igt; Wed, 21 Nov 2012 03:29:13 -0800 (PST) Received: by 10.216.90.129 with SMTP id e1mr7553754wef.87.1353497352897; Wed, 21 Nov 2012 03:29:12 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id ep7si14977922wib.42.2012.11.21.03.29.12 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Nov 2012 03:29:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Tb8US-0005yG-04 for ; Wed, 21 Nov 2012 11:29:12 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id E3D6BE1552 for ; Wed, 21 Nov 2012 11:29:11 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-dispatcher X-Launchpad-Branch: ~linaro-validation/lava-dispatcher/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 459 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 459: Add support for specifying bDDootloader in json and defaulting to u_boot Message-Id: <20121121112911.28471.56588.launchpad@ackee.canonical.com> Date: Wed, 21 Nov 2012 11:29:11 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="16293"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: dde3262710e20b604e88b9c98fcffa0ecbc4fce3 X-Gm-Message-State: ALoCoQlHXKNM52rsX/hX/ThnJfqBlvs2TxHJXaYAYgUwlgMyd9vGkyxmuDOAdC9nexKqCeqco2lN Merge authors: Dave Pigott (dpigott) Related merge proposals: https://code.launchpad.net/~dpigott/lava-dispatcher/add-bootloader-support/+merge/135151 proposed by: Dave Pigott (dpigott) ------------------------------------------------------------ revno: 459 [merge] fixes bug: https://launchpad.net/bugs/1057646 committer: dave.pigott@linaro.org branch nick: trunk timestamp: Wed 2012-11-21 11:28:13 +0000 message: Add support for specifying bDDootloader in json and defaulting to u_boot modified: lava_dispatcher/actions/deploy.py lava_dispatcher/client/lmc_utils.py lava_dispatcher/client/targetdevice.py lava_dispatcher/device/fastmodel.py lava_dispatcher/device/master.py lava_dispatcher/device/qemu.py --- lp:lava-dispatcher https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk You are subscribed to branch lp:lava-dispatcher. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription === modified file 'lava_dispatcher/actions/deploy.py' --- lava_dispatcher/actions/deploy.py 2012-10-24 01:34:07 +0000 +++ lava_dispatcher/actions/deploy.py 2012-11-20 13:34:19 +0000 @@ -54,6 +54,7 @@ 'rootfs': {'type': 'string', 'optional': True}, 'image': {'type': 'string', 'optional': True}, 'rootfstype': {'type': 'string', 'optional': True}, + 'bootloader': {'type': 'string', 'optional': True, 'default': 'u_boot'}, }, 'additionalProperties': False, } @@ -69,9 +70,9 @@ elif 'image' not in parameters: raise ValueError('must specify image if not specifying a hwpack') - def run(self, hwpack=None, rootfs=None, image=None, rootfstype='ext3'): + def run(self, hwpack=None, rootfs=None, image=None, rootfstype='ext3', bootloader='u_boot'): self.client.deploy_linaro( - hwpack=hwpack, rootfs=rootfs, image=image, rootfstype=rootfstype) + hwpack=hwpack, rootfs=rootfs, image=image, rootfstype=rootfstype, bootloader=bootloader) class cmd_deploy_linaro_android_image(BaseAction): === modified file 'lava_dispatcher/client/lmc_utils.py' --- lava_dispatcher/client/lmc_utils.py 2012-09-27 21:59:57 +0000 +++ lava_dispatcher/client/lmc_utils.py 2012-11-20 13:34:19 +0000 @@ -15,7 +15,7 @@ ) -def generate_image(client, hwpack_url, rootfs_url, outdir, rootfstype=None): +def generate_image(client, hwpack_url, rootfs_url, outdir, bootloader='u_boot', rootfstype=None): """Generate image from a hwpack and rootfs url :param hwpack_url: url of the Linaro hwpack to download @@ -43,8 +43,8 @@ logging.info("client.device_type = %s" %client.config.device_type) cmd = ("sudo flock /var/lock/lava-lmc.lck linaro-media-create --hwpack-force-yes --dev %s " - "--image-file %s --binary %s --hwpack %s --image-size 3G" % - (client.config.lmc_dev_arg, image_file, rootfs_path, hwpack_path)) + "--image-file %s --binary %s --hwpack %s --image-size 3G --bootloader %s" % + (client.config.lmc_dev_arg, image_file, rootfs_path, hwpack_path, bootloader)) if rootfstype is not None: cmd += ' --rootfs ' + rootfstype logging.info("Executing the linaro-media-create command") @@ -53,11 +53,11 @@ _run_linaro_media_create(cmd) return image_file -def generate_fastmodel_image(hwpack, rootfs, odir, size="2000M"): +def generate_fastmodel_image(hwpack, rootfs, odir, bootloader='u_boot', size="2000M"): cmd = ("flock /var/lock/lava-lmc.lck sudo linaro-media-create " "--dev fastmodel --output-directory %s --image-size %s " - "--hwpack %s --binary %s --hwpack-force-yes" % - (odir, size, hwpack, rootfs) ) + "--hwpack %s --binary %s --hwpack-force-yes --bootloader %s" % + (odir, size, hwpack, rootfs, bootloader) ) logging.info("Generating fastmodel image with: %s" % cmd) _run_linaro_media_create(cmd) === modified file 'lava_dispatcher/client/targetdevice.py' --- lava_dispatcher/client/targetdevice.py 2012-10-26 06:22:05 +0000 +++ lava_dispatcher/client/targetdevice.py 2012-11-20 13:34:19 +0000 @@ -50,7 +50,7 @@ self.target_device.deploy_android(boot, system, data) def deploy_linaro(self, hwpack=None, rootfs=None, image=None, - rootfstype='ext3'): + rootfstype='ext3', bootloader='u_boot'): if image is None: if hwpack is None or rootfs is None: raise CriticalError( @@ -60,7 +60,7 @@ "cannot specify hwpack or rootfs when specifying image") if image is None: - self.target_device.deploy_linaro(hwpack, rootfs) + self.target_device.deploy_linaro(hwpack, rootfs, bootloader) else: self.target_device.deploy_linaro_prebuilt(image) === modified file 'lava_dispatcher/device/fastmodel.py' --- lava_dispatcher/device/fastmodel.py 2012-11-16 00:47:20 +0000 +++ lava_dispatcher/device/fastmodel.py 2012-11-20 13:34:19 +0000 @@ -113,12 +113,12 @@ self._customize_android() - def deploy_linaro(self, hwpack=None, rootfs=None): + def deploy_linaro(self, hwpack=None, rootfs=None, bootloader='u_boot'): hwpack = download_image(hwpack, self.context, decompress=False) rootfs = download_image(rootfs, self.context, decompress=False) odir = os.path.dirname(rootfs) - generate_fastmodel_image(hwpack, rootfs, odir) + generate_fastmodel_image(hwpack, rootfs, odir, bootloader) self._sd_image = '%s/sd.img' % odir self._axf = None for f in self.config.simulator_axf_files: === modified file 'lava_dispatcher/device/master.py' --- lava_dispatcher/device/master.py 2012-11-16 00:44:40 +0000 +++ lava_dispatcher/device/master.py 2012-11-20 13:34:19 +0000 @@ -94,10 +94,10 @@ # we always leave master image devices powered on pass - def deploy_linaro(self, hwpack, rfs): + def deploy_linaro(self, hwpack, rfs, bootloader): self.boot_master_image() - image_file = generate_image(self, hwpack, rfs, self.scratch_dir) + image_file = generate_image(self, hwpack, rfs, self.scratch_dir, bootloader) (boot_tgz, root_tgz, data) = self._generate_tarballs(image_file) self._deploy_tarballs(boot_tgz, root_tgz) === modified file 'lava_dispatcher/device/qemu.py' --- lava_dispatcher/device/qemu.py 2012-11-15 21:23:20 +0000 +++ lava_dispatcher/device/qemu.py 2012-11-20 13:34:19 +0000 @@ -46,9 +46,9 @@ super(QEMUTarget, self).__init__(context, config) self._sd_image = None - def deploy_linaro(self, hwpack=None, rootfs=None): + def deploy_linaro(self, hwpack=None, rootfs=None, bootloader='u_boot'): odir = self.scratch_dir - self._sd_image = generate_image(self, hwpack, rootfs, odir) + self._sd_image = generate_image(self, hwpack, rootfs, odir, bootloader) self._customize_linux(self._sd_image) def deploy_linaro_prebuilt(self, image):