From patchwork Thu Jan 12 22:12:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Larson X-Patchwork-Id: 6169 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 D657423F82 for ; Thu, 12 Jan 2012 22:12:15 +0000 (UTC) Received: from mail-bk0-f52.google.com (mail-bk0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id B9166A181C2 for ; Thu, 12 Jan 2012 22:12:15 +0000 (UTC) Received: by bkbzu5 with SMTP id zu5so2230849bkb.11 for ; Thu, 12 Jan 2012 14:12:15 -0800 (PST) Received: by 10.204.152.20 with SMTP id e20mr1875823bkw.117.1326406335394; Thu, 12 Jan 2012 14:12:15 -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.205.82.144 with SMTP id ac16cs15754bkc; Thu, 12 Jan 2012 14:12:15 -0800 (PST) Received: by 10.180.106.33 with SMTP id gr1mr9811415wib.6.1326406333769; Thu, 12 Jan 2012 14:12:13 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id s80si3833623weq.50.2012.01.12.14.12.13 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 Jan 2012 14:12:13 -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 1RlSsX-0004Lg-HR for ; Thu, 12 Jan 2012 22:12:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 73BA7E04CF for ; Thu, 12 Jan 2012 22:12:13 +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: 188 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 188: Fixes for android on snowball from ChiThu Message-Id: <20120112221213.7324.44274.launchpad@ackee.canonical.com> Date: Thu, 12 Jan 2012 22:12:13 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14664"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 4a617710262575533e8e207cc73f9fde1d5dcd4c Merge authors: Le Chi Thu le.chi.thu@linaro.org Related merge proposals: https://code.launchpad.net/~le-chi-thu/lava-dispatcher/snowball_android_fix/+merge/88427 proposed by: Paul Larson (pwlars) review: Approve - Paul Larson (pwlars) ------------------------------------------------------------ revno: 188 [merge] committer: Paul Larson branch nick: lava-dispatcher timestamp: Thu 2012-01-12 16:10:32 -0600 message: Fixes for android on snowball from ChiThu modified: lava_dispatcher/client/base.py lava_dispatcher/client/lmc_utils.py lava_dispatcher/client/master.py lava_dispatcher/connection.py lava_dispatcher/default-config/lava-dispatcher/device-types/snowball.conf --- 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/client/base.py' --- lava_dispatcher/client/base.py 2012-01-03 18:25:33 +0000 +++ lava_dispatcher/client/base.py 2012-01-12 20:38:57 +0000 @@ -103,6 +103,7 @@ return rc + class NetworkCommandRunner(CommandRunner): """A CommandRunner with some networking utility methods.""" @@ -229,7 +230,7 @@ def wait_home_screen(self): cmd = 'getprop init.svc.bootanim' for count in range(100): - self.run(cmd, response='stopped') + self.run(cmd, response='stopped', timeout=5) if self.match_id == 0: return True time.sleep(1) @@ -399,8 +400,21 @@ self.in_test_shell(timeout=900) self.proc.sendline("export PS1=\"root@linaro: \"") + if self.config.get("enable_network_after_boot_android"): + time.sleep(1) + self._enable_network() + self._enable_adb_over_tcpip() + def _enable_network(self): + network_interface = self.default_network_interface + session = TesterCommandRunner(self, wait_for_rc=False) + session.run("netcfg", timeout=20) + session.run("netcfg %s up"%self.default_network_interface, timeout=20) + session.run("netcfg %s dhcp"%self.default_network_interface, timeout=300) + session.run("ifconfig " + self.default_network_interface, timeout=20) + + def _enable_adb_over_tcpip(self): logging.info("Enable adb over TCPIP") session = TesterCommandRunner(self, wait_for_rc=False) === modified file 'lava_dispatcher/client/lmc_utils.py' --- lava_dispatcher/client/lmc_utils.py 2011-12-19 01:44:12 +0000 +++ lava_dispatcher/client/lmc_utils.py 2012-01-12 20:38:57 +0000 @@ -99,8 +99,10 @@ image_file = os.path.join(tarball_dir, "lava.img") #XXX Hack for removing startupfiles from snowball hwpacks - if client.device_type == "snowball_sd": - cmd = "sudo linaro-hwpack-replace -r startupfiles-v3 -t %s -i" % hwpack_path + logging.info("client.device_type = %s" %client.device_type) + if client.device_type == "snowball": + logging.info("Remove startupfiles from snowball") + cmd = "sudo linaro-hwpack-replace -r startupfiles-v3 -t %s -i" % hwpack_path rc, output = getstatusoutput(cmd) if rc: raise RuntimeError("linaro-hwpack-replace failed: %s" % output) === modified file 'lava_dispatcher/client/master.py' --- lava_dispatcher/client/master.py 2012-01-04 21:16:34 +0000 +++ lava_dispatcher/client/master.py 2012-01-12 20:38:57 +0000 @@ -145,9 +145,14 @@ % data_part_org) session.run('sed -i "s/mmcblk0p%s/mmcblk0p%s/g" init.rc' % (sys_part_org, sys_part_lava)) + # for snowball the mcvblk1 is used instead of mmcblk0. + session.run('sed -i "s/mmcblk1p%s/mmcblk1p%s/g" init.rc' + % (sys_part_org, sys_part_lava)) session.run( 'sed -i "/export PATH/a \ \ \ \ export PS1 root@linaro: " init.rc') + session.run("cat init.rc") + session.run( 'cpio -i -t -F ramdisk.cpio | cpio -o -H newc | \ gzip > ramdisk_new.cpio.gz') === modified file 'lava_dispatcher/connection.py' --- lava_dispatcher/connection.py 2011-12-11 17:12:43 +0000 +++ lava_dispatcher/connection.py 2012-01-12 20:38:57 +0000 @@ -82,7 +82,11 @@ self.sendline("") def soft_reboot(self): - self.sendline("reboot") + cmd = self.device_option("soft_boot_cmd") + if cmd != "": + self.sendline(cmd) + else: + self.sendline("reboot") # set soft reboot timeout 120s, or do a hard reset logging.info("Rebooting the system") id = self.expect( === modified file 'lava_dispatcher/default-config/lava-dispatcher/device-types/snowball.conf' --- lava_dispatcher/default-config/lava-dispatcher/device-types/snowball.conf 2011-12-15 18:31:53 +0000 +++ lava_dispatcher/default-config/lava-dispatcher/device-types/snowball.conf 2012-01-12 20:38:57 +0000 @@ -10,9 +10,19 @@ boot_cmds_android = mmc init, mmc rescan 1, setenv bootcmd "'fat load mmc 1:3 0x00100000 /uImage; fat load mmc 1:3 0x05000000 /uInitrd; bootm 0x00100000 0x05000000'", + setenv bootargs "'console=ttyAMA2,115200n8 rootwait ro earlyprintk mem=128M@0 mali.mali_mem=32M@128M hwmem=168M@160M mem=48M@328M mem_issw=1M@383M mem=640M@384M vmalloc=256M init=/init androidboot.console=ttyAMA2 omapdss.def_disp=hdmi consoleblank=0'", boot - + bootloader_prompt = $ lmc_dev_arg = snowball_sd +soft_boot_cmd = echo "Restarting system." + echo 0x02 > /sys/kernel/debug/ab8500/register-bank + echo 0x02 > /sys/kernel/debug/ab8500/register-address + echo 0x01 > /sys/kernel/debug/ab8500/register-value + echo 0x01 > /sys/kernel/debug/ab8500/register-address + echo 0x11 > /sys/kernel/debug/ab8500/register-value + +enable_network_after_boot_android = 1 +