Merge lp:~pwlars/ubuntu-test-cases/krillin-recovery into lp:ubuntu-test-cases/touch

Proposed by Paul Larson
Status: Merged
Merged at revision: 321
Proposed branch: lp:~pwlars/ubuntu-test-cases/krillin-recovery
Merge into: lp:ubuntu-test-cases/touch
Diff against target: 60 lines (+25/-5)
1 file modified
scripts/device_info.py (+25/-5)
To merge this branch: bzr merge lp:~pwlars/ubuntu-test-cases/krillin-recovery
Reviewer Review Type Date Requested Status
Evan (community) Approve
Review via email: mp+238377@code.launchpad.net

Description of the change

No devices are hooked up that use this just yet, but in my testing at home, this seems to work. There should be a device to add by Thursday.

To post a comment you must log in.
320. By Paul Larson

some fixups needed for suspend-blocker, but still not completely working

Revision history for this message
Evan (ev) wrote :

Looks good, just one question inline.

review: Approve
Revision history for this message
Paul Larson (pwlars) :
321. By Paul Larson

Use a more recent "stable" fallback image on krillin until we get a new
stable promotion.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scripts/device_info.py'
2--- scripts/device_info.py 2014-10-14 21:46:04 +0000
3+++ scripts/device_info.py 2014-10-15 04:55:46 +0000
4@@ -17,13 +17,14 @@
5
6 class TouchDevice(object):
7 def __init__(self, devtype, serial, relay_url=None, bank=None,
8- power_pin=None, volume_down_pin=None):
9+ power_pin=None, volume_down_pin=None, volume_up_pin=None):
10 self.devtype = devtype
11 self.serial = serial
12 self.relay_url = relay_url
13 self.bank = bank
14 self.power_pin = power_pin
15 self.volume_down_pin = volume_down_pin
16+ self.volume_up_pin = volume_up_pin
17
18 def get_serial(self):
19 return self.serial
20@@ -57,10 +58,17 @@
21 def reimage_from_fastboot(self):
22 #Starting from fastboot mode, put a known-good image on the device
23 log.info("Flashing the last stable image")
24- subprocess.check_output(['ubuntu-device-flash', '--serial',
25- self.serial, '--channel',
26- 'ubuntu-touch/stable', '--bootstrap',
27- '--password', 'ubuntuci'])
28+ if self.devtype == "krillin":
29+ subprocess.check_output(['ubuntu-device-flash', '--serial',
30+ self.serial, '--channel',
31+ 'ubuntu-touch/ubuntu-rtm/14.09-proposed',
32+ '--bootstrap', '--revision=104',
33+ '--password', 'ubuntuci'])
34+ else:
35+ subprocess.check_output(['ubuntu-device-flash', '--serial',
36+ self.serial, '--channel',
37+ 'ubuntu-touch/stable', '--bootstrap',
38+ '--password', 'ubuntuci'])
39 return self.wait_for_device(600)
40
41 def wait_for_fastboot(self, timeout=120):
42@@ -125,6 +133,18 @@
43 set_relay(self.relay_url, self.bank, self.volume_down_pin, 0)
44 set_relay(self.relay_url, self.bank, self.power_pin, 0)
45
46+ def _krillin_to_bootloader(self):
47+ # On Krillin, the following sequence should take us to fastboot
48+ # regardless of the initial state of the device
49+ set_relay(self.relay_url, self.bank, self.volume_down_pin, 1)
50+ set_relay(self.relay_url, self.bank, self.volume_up_pin, 1)
51+ set_relay(self.relay_url, self.bank, self.power_pin, 1)
52+ time.sleep(15)
53+ set_relay(self.relay_url, self.bank, self.power_pin, 0)
54+ time.sleep(6)
55+ set_relay(self.relay_url, self.bank, self.volume_down_pin, 0)
56+ set_relay(self.relay_url, self.bank, self.volume_up_pin, 0)
57+
58
59 # When looking at the relay webUI for the mapping, we consider all
60 # ports and banks to start numbering from 0

Subscribers

People subscribed via source and target branches