Merge lp:~le-chi-thu/lava-dispatcher/snowball_android_fix into lp:lava-dispatcher

Proposed by Paul Larson
Status: Merged
Merged at revision: 188
Proposed branch: lp:~le-chi-thu/lava-dispatcher/snowball_android_fix
Merge into: lp:lava-dispatcher
Diff against target: 120 lines (+40/-5)
5 files modified
lava_dispatcher/client/base.py (+15/-1)
lava_dispatcher/client/lmc_utils.py (+4/-2)
lava_dispatcher/client/master.py (+5/-0)
lava_dispatcher/connection.py (+5/-1)
lava_dispatcher/default-config/lava-dispatcher/device-types/snowball.conf (+11/-1)
To merge this branch: bzr merge lp:~le-chi-thu/lava-dispatcher/snowball_android_fix
Reviewer Review Type Date Requested Status
Paul Larson (community) Approve
Review via email: mp+88427@code.launchpad.net

Description of the change

ChiThu and I discussed this in irc, I'm testing it right now locally

To post a comment you must log in.
Revision history for this message
Paul Larson (pwlars) wrote :

This is working well for me. One ***IMPORTANT**** think we need to make sure to do, is change the snowball01-0n.conf files to make their type snowball instead of snowball_sd whenever we update this on v.l.o.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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 21:33:28 +0000
@@ -103,6 +103,7 @@
103 return rc103 return rc
104104
105105
106
106class NetworkCommandRunner(CommandRunner):107class NetworkCommandRunner(CommandRunner):
107 """A CommandRunner with some networking utility methods."""108 """A CommandRunner with some networking utility methods."""
108109
@@ -229,7 +230,7 @@
229 def wait_home_screen(self):230 def wait_home_screen(self):
230 cmd = 'getprop init.svc.bootanim'231 cmd = 'getprop init.svc.bootanim'
231 for count in range(100):232 for count in range(100):
232 self.run(cmd, response='stopped')233 self.run(cmd, response='stopped', timeout=5)
233 if self.match_id == 0:234 if self.match_id == 0:
234 return True235 return True
235 time.sleep(1)236 time.sleep(1)
@@ -399,8 +400,21 @@
399 self.in_test_shell(timeout=900)400 self.in_test_shell(timeout=900)
400 self.proc.sendline("export PS1=\"root@linaro: \"")401 self.proc.sendline("export PS1=\"root@linaro: \"")
401402
403 if self.config.get("enable_network_after_boot_android"):
404 time.sleep(1)
405 self._enable_network()
406
402 self._enable_adb_over_tcpip()407 self._enable_adb_over_tcpip()
403408
409 def _enable_network(self):
410 network_interface = self.default_network_interface
411 session = TesterCommandRunner(self, wait_for_rc=False)
412 session.run("netcfg", timeout=20)
413 session.run("netcfg %s up"%self.default_network_interface, timeout=20)
414 session.run("netcfg %s dhcp"%self.default_network_interface, timeout=300)
415 session.run("ifconfig " + self.default_network_interface, timeout=20)
416
417
404 def _enable_adb_over_tcpip(self):418 def _enable_adb_over_tcpip(self):
405 logging.info("Enable adb over TCPIP")419 logging.info("Enable adb over TCPIP")
406 session = TesterCommandRunner(self, wait_for_rc=False)420 session = TesterCommandRunner(self, wait_for_rc=False)
407421
=== 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 21:33:28 +0000
@@ -99,8 +99,10 @@
9999
100 image_file = os.path.join(tarball_dir, "lava.img")100 image_file = os.path.join(tarball_dir, "lava.img")
101 #XXX Hack for removing startupfiles from snowball hwpacks101 #XXX Hack for removing startupfiles from snowball hwpacks
102 if client.device_type == "snowball_sd":102 logging.info("client.device_type = %s" %client.device_type)
103 cmd = "sudo linaro-hwpack-replace -r startupfiles-v3 -t %s -i" % hwpack_path103 if client.device_type == "snowball":
104 logging.info("Remove startupfiles from snowball")
105 cmd = "sudo linaro-hwpack-replace -r startupfiles-v3 -t %s -i" % hwpack_path
104 rc, output = getstatusoutput(cmd)106 rc, output = getstatusoutput(cmd)
105 if rc:107 if rc:
106 raise RuntimeError("linaro-hwpack-replace failed: %s" % output)108 raise RuntimeError("linaro-hwpack-replace failed: %s" % output)
107109
=== 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 21:33:28 +0000
@@ -145,9 +145,14 @@
145 % data_part_org)145 % data_part_org)
146 session.run('sed -i "s/mmcblk0p%s/mmcblk0p%s/g" init.rc'146 session.run('sed -i "s/mmcblk0p%s/mmcblk0p%s/g" init.rc'
147 % (sys_part_org, sys_part_lava))147 % (sys_part_org, sys_part_lava))
148 # for snowball the mcvblk1 is used instead of mmcblk0.
149 session.run('sed -i "s/mmcblk1p%s/mmcblk1p%s/g" init.rc'
150 % (sys_part_org, sys_part_lava))
148 session.run(151 session.run(
149 'sed -i "/export PATH/a \ \ \ \ export PS1 root@linaro: " init.rc')152 'sed -i "/export PATH/a \ \ \ \ export PS1 root@linaro: " init.rc')
150153
154 session.run("cat init.rc")
155
151 session.run(156 session.run(
152 'cpio -i -t -F ramdisk.cpio | cpio -o -H newc | \157 'cpio -i -t -F ramdisk.cpio | cpio -o -H newc | \
153 gzip > ramdisk_new.cpio.gz')158 gzip > ramdisk_new.cpio.gz')
154159
=== modified file 'lava_dispatcher/connection.py'
--- lava_dispatcher/connection.py 2011-12-11 17:12:43 +0000
+++ lava_dispatcher/connection.py 2012-01-12 21:33:28 +0000
@@ -82,7 +82,11 @@
82 self.sendline("")82 self.sendline("")
8383
84 def soft_reboot(self):84 def soft_reboot(self):
85 self.sendline("reboot")85 cmd = self.device_option("soft_boot_cmd")
86 if cmd != "":
87 self.sendline(cmd)
88 else:
89 self.sendline("reboot")
86 # set soft reboot timeout 120s, or do a hard reset90 # set soft reboot timeout 120s, or do a hard reset
87 logging.info("Rebooting the system")91 logging.info("Rebooting the system")
88 id = self.expect(92 id = self.expect(
8993
=== 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 21:33:28 +0000
@@ -10,9 +10,19 @@
10boot_cmds_android = mmc init,10boot_cmds_android = mmc init,
11 mmc rescan 1,11 mmc rescan 1,
12 setenv bootcmd "'fat load mmc 1:3 0x00100000 /uImage; fat load mmc 1:3 0x05000000 /uInitrd; bootm 0x00100000 0x05000000'",12 setenv bootcmd "'fat load mmc 1:3 0x00100000 /uImage; fat load mmc 1:3 0x05000000 /uInitrd; bootm 0x00100000 0x05000000'",
13 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'",
13 boot14 boot
1415
15bootloader_prompt = $16bootloader_prompt = $
1617
17lmc_dev_arg = snowball_sd18lmc_dev_arg = snowball_sd
1819
20soft_boot_cmd = echo "Restarting system."
21 echo 0x02 > /sys/kernel/debug/ab8500/register-bank
22 echo 0x02 > /sys/kernel/debug/ab8500/register-address
23 echo 0x01 > /sys/kernel/debug/ab8500/register-value
24 echo 0x01 > /sys/kernel/debug/ab8500/register-address
25 echo 0x11 > /sys/kernel/debug/ab8500/register-value
26
27enable_network_after_boot_android = 1
28

Subscribers

People subscribed via source and target branches