diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 609: Add support for rootfs on USB Flash for TC2 boards

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

Commit Message

Matt Hart May 23, 2013, 5:57 p.m. UTC
Merge authors:
  Matt Hart <matt@mint>
Related merge proposals:
  https://code.launchpad.net/~matthew-hart/lava-dispatcher/rootfs-tc2-on-usb/+merge/165349
  proposed by: Matthew Hart (matthew-hart)
  review: Approve - Tyler Baker (tyler-baker)
  review: Approve - Antonio Terceiro (terceiro)
------------------------------------------------------------
revno: 609 [merge]
committer: Matt Hart <matt@mint>
branch nick: lava-dispatcher
timestamp: Thu 2013-05-23 18:56:42 +0100
message:
  Add support for rootfs on USB Flash for TC2 boards
modified:
  lava_dispatcher/config.py
  lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf
  lava_dispatcher/default-config/lava-dispatcher/device-types/vexpress-tc2.conf
  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/config.py'
--- lava_dispatcher/config.py	2013-05-16 01:53:21 +0000
+++ lava_dispatcher/config.py	2013-05-23 11:08:00 +0000
@@ -94,6 +94,8 @@ 
     android_boot_prompt_timeout = schema.IntOption(default=1200)
     android_orig_block_device = schema.StringOption(default="mmcblk0")
     android_lava_block_device = schema.StringOption(default="mmcblk0")
+    partition_padding_string_org = schema.StringOption(default="p")
+    partition_padding_string_android = schema.StringOption(default="p")
 
     arm_probe_binary = schema.StringOption(default='/usr/local/bin/arm-probe')
     arm_probe_config = schema.StringOption(default='/usr/local/etc/arm-probe-config')

=== modified file 'lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf'
--- lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf	2013-05-14 18:58:37 +0000
+++ lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf	2013-05-23 17:51:36 +0000
@@ -79,7 +79,6 @@ 
 sys_part_android = 5
 # sdcard partition number in LAVA test image, counting from 1
 sdcard_part_android = 7
-
 # data partition number in LAVA test image, counting from 1
 data_part_android = 6
 

=== modified file 'lava_dispatcher/default-config/lava-dispatcher/device-types/vexpress-tc2.conf'
--- lava_dispatcher/default-config/lava-dispatcher/device-types/vexpress-tc2.conf	2013-05-02 21:43:14 +0000
+++ lava_dispatcher/default-config/lava-dispatcher/device-types/vexpress-tc2.conf	2013-05-23 11:08:00 +0000
@@ -27,3 +27,10 @@ 
 vexpress_usb_mass_storage_device = /dev/disk/by-label/VEMSD
 
 read_boot_cmds_from_image = 0
+
+android_orig_block_device = mmcblk0
+android_lava_block_device = sda
+partition_padding_string_android =
+sys_part_android = 1
+sdcard_part_android = 3
+data_part_android = 2
\ No newline at end of file

=== modified file 'lava_dispatcher/device/master.py'
--- lava_dispatcher/device/master.py	2013-05-20 06:37:29 +0000
+++ lava_dispatcher/device/master.py	2013-05-23 11:08:00 +0000
@@ -649,20 +649,24 @@ 
     sys_part_org = session._client.config.sys_part_android_org
     cache_part_org = session._client.config.cache_part_android_org
     data_part_org = session._client.config.data_part_android_org
+    partition_padding_string_org = session._client.config.partition_padding_string_org
+
     # Sdcard layout in Lava image
     sys_part_lava = session._client.config.sys_part_android
     data_part_lava = session._client.config.data_part_android
-
-    # delete use of cache partition
-    session.run('sed -i "/\/dev\/block\/mmcblk0p%s/d" %s'
-                % (cache_part_org, rc_filename))
+    partition_padding_string_lava = session._client.config.partition_padding_string_android
 
     blkorg = session._client.config.android_orig_block_device
     blklava = session._client.config.android_lava_block_device
-    session.run('sed -i "s/%sp%s/%sp%s/g" %s'
-                % (blkorg, data_part_org, blklava, data_part_lava, rc_filename))
-    session.run('sed -i "s/%sp%s/%sp%s/g" %s'
-                % (blkorg, sys_part_org, blklava, sys_part_lava, rc_filename))
+
+    # delete use of cache partition
+    session.run('sed -i "/\/dev\/block\/%s%s%s/d" %s'
+                % (blkorg, partition_padding_string_org, cache_part_org, rc_filename))
+    session.run('sed -i "s/%s%s%s/%s%s%s/g" %s'
+                % (blkorg, partition_padding_string_org, data_part_org, blklava, partition_padding_string_lava, data_part_lava, rc_filename))
+    session.run('sed -i "s/%s%s%s/%s%s%s/g" %s'
+                % (blkorg, partition_padding_string_org, sys_part_org, blklava, partition_padding_string_lava, sys_part_lava, rc_filename))
+
 
 
 def _recreate_uInitrd(session, target):