=== modified file 'lava_dispatcher/config.py'
@@ -79,6 +79,8 @@
android_adb_over_tcp = schema.BoolOption(default=True)
android_wait_for_home_screen = schema.BoolOption(default=True)
android_home_screen_tries = schema.IntOption(default=100)
+ android_orig_block_device = schema.StringOption(default="mmcblk0")
+ android_lava_block_device = schema.StringOption(default="mmcblk0")
class OptionDescriptor(object):
=== modified file 'lava_dispatcher/default-config/lava-dispatcher/device-types/snowball.conf'
@@ -24,3 +24,5 @@
echo 0x01 > /sys/kernel/debug/ab8500/register-address
echo 0x11 > /sys/kernel/debug/ab8500/register-value
+android_orig_block_device = mmcblk1
+android_lava_block_device = mmcblk1
=== modified file 'lava_dispatcher/device/master.py'
@@ -618,19 +618,16 @@
sys_part_lava = session._client.config.sys_part_android
data_part_lava = session._client.config.data_part_android
- session.run(
- 'sed -i "/\/dev\/block\/mmcblk0p%s/d" %s'
- % (cache_part_org, rc_filename), failok=True)
+ # delete use of cache partition
+ session.run('sed -i "/\/dev\/block\/mmcblk0p%s/d" %s'
+ % (cache_part_org, rc_filename))
- session.run('sed -i "s/mmcblk0p%s/mmcblk0p%s/g" %s'
- % (data_part_org, data_part_lava, rc_filename), failok=True)
- session.run('sed -i "s/mmcblk0p%s/mmcblk0p%s/g" %s'
- % (sys_part_org, sys_part_lava, rc_filename), failok=True)
- # for snowball the mcvblk1 is used instead of mmcblk0.
- session.run('sed -i "s/mmcblk1p%s/mmcblk1p%s/g" %s'
- % (data_part_org, data_part_lava, rc_filename), failok=True)
- session.run('sed -i "s/mmcblk1p%s/mmcblk1p%s/g" %s'
- % (sys_part_org, sys_part_lava, rc_filename), failok=True)
+ 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))
def _recreate_uInitrd(session, target):