diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 587: Fix bug #1172235 - snowball does not boot due to wrong partition during

Message ID 20130424112717.28888.73498.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Senthil Kumaran April 24, 2013, 11:27 a.m. UTC
Merge authors:
  Senthil Kumaran S (stylesen)
Related merge proposals:
  https://code.launchpad.net/~stylesen/lava-dispatcher/fix-bug-1172235/+merge/160607
  proposed by: Senthil Kumaran S (stylesen)
  review: Approve - Dave Pigott (dpigott)
------------------------------------------------------------
revno: 587 [merge]
committer: Senthil Kumaran <senthil.kumaran@linaro.org>
branch nick: trunk
timestamp: Wed 2013-04-24 16:55:50 +0530
message:
  Fix bug #1172235 - snowball does not boot due to wrong partition during
  untangling of boot commands.
modified:
  lava_dispatcher/device/master.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
diff mbox

Patch

=== modified file 'lava_dispatcher/device/master.py'
--- lava_dispatcher/device/master.py	2013-04-22 09:39:22 +0000
+++ lava_dispatcher/device/master.py	2013-04-24 11:09:03 +0000
@@ -182,11 +182,23 @@ 
         """
         Returns boot_cmds list after rewriting things such as:
         
-        partition number from n to n+2
-        root=LABEL=testrootfs instead of root=UUID=ab34-...
+        * partition number from n to n+2
+        * root=LABEL=testrootfs or root=/dev/mmcblk1p5 instead of
+          root=UUID=ab34-...
         """
-        boot_cmds = re.sub(
-            r"root=UUID=\S+", "root=LABEL=testrootfs", boot_cmds, re.MULTILINE)
+
+        # This console value is specific to snowball. A snowball has mmcblk1
+        if 'ttyAMA2' in boot_cmds:
+            boot_cmds = re.sub(r"root=UUID=\S+",
+                               "root=/dev/mmcblk1p5",
+                               boot_cmds,
+                               re.MULTILINE)
+        else:
+            boot_cmds = re.sub(r"root=UUID=\S+",
+                               "root=LABEL=testrootfs",
+                               boot_cmds,
+                               re.MULTILINE)
+
         pattern = "\s+\d+:(?P<partition>\d+)\s+"
         boot_cmds = re.sub(
             pattern, self._rewrite_partition_number, boot_cmds, re.MULTILINE)