=== modified file 'lava_dispatcher/client/base.py'
@@ -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'
@@ -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'
@@ -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'
@@ -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'
@@ -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
+