aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilosz Wasilewski <milosz.wasilewski@linaro.org>2016-10-26 16:28:05 +0530
committerFathi Boudra <fathi.boudra@linaro.org>2016-10-27 07:24:33 +0000
commitdb494231852d467c59b3368c798c1c866c6035e4 (patch)
tree1de05fbb7076deee464e659040323b254dceff08
parent56ccf654a56eca9b8dfbe820e2ae4dae7439975d (diff)
downloadlinaro-image-tools-db494231852d467c59b3368c798c1c866c6035e4.tar.gz
android: increase the partion boundaries to work with sfdisk 2.26+
sfdisk 2.26+ isn't backward compatible. It causes issues when creating partitions. Increase the partition boundaries to work with sfdisk new version and older versions. Change-Id: I7ee437618691709a3a3bb2a5103a4245a6c37a0d Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
-rw-r--r--linaro_image_tools/media_create/android_boards.py4
-rw-r--r--linaro_image_tools/media_create/tests/test_media_create.py28
2 files changed, 16 insertions, 16 deletions
diff --git a/linaro_image_tools/media_create/android_boards.py b/linaro_image_tools/media_create/android_boards.py
index adcfc8c..bac9dbc 100644
--- a/linaro_image_tools/media_create/android_boards.py
+++ b/linaro_image_tools/media_create/android_boards.py
@@ -274,8 +274,8 @@ class AndroidBoardConfig(BoardConfig):
return '%s,%s,%s,*\n%s,%s,L\n%s,%s,L\n%s,-,E\n%s,%s,L\n%s,,,-' % (
boot_start, boot_len, partition_type, system_start, _system_len,
- cache_start, _cache_len, userdata_start, userdata_start,
- _userdata_len, sdcard_start)
+ cache_start, _cache_len, userdata_start, userdata_start + 1,
+ _userdata_len, sdcard_start + 2)
def populate_raw_partition(self, media, boot_dir):
super(AndroidBoardConfig, self).populate_raw_partition(media, boot_dir)
diff --git a/linaro_image_tools/media_create/tests/test_media_create.py b/linaro_image_tools/media_create/tests/test_media_create.py
index c9f9b6a..37ad170 100644
--- a/linaro_image_tools/media_create/tests/test_media_create.py
+++ b/linaro_image_tools/media_create/tests/test_media_create.py
@@ -1902,44 +1902,44 @@ class TestGetSfdiskCmd(TestCase):
def test_panda_android(self):
self.assertEqual(
- '63,270272,0x0C,*\n270336,1835008,L\n2105344,524288,L\n'
- '2629632,-,E\n2629632,1179648,L\n3809280,,,-',
+ '63,270272,0x0C,*\n270336,2097152,L\n2367488,262144,L\n'
+ '2629632,-,E\n2629633,1179648,L\n3809282,,,-',
android_boards.AndroidPandaConfig().get_sfdisk_cmd())
def test_origen_android(self):
self.assertEqual(
- '1,8191,0xDA\n8253,270274,0x0C,*\n278528,1835008,L\n'
- '2113536,-,E\n2113536,524288,L\n2637824,1179648,L\n3817472,,,-',
+ '1,8191,0xDA\n8253,270274,0x0C,*\n278528,2097152,L\n'
+ '2375680,-,E\n2375680,262144,L\n2637824,1179648,L\n3817472,,,-',
android_boards.AndroidOrigenConfig().get_sfdisk_cmd())
def test_origen_quad_android(self):
self.assertEqual(
- '1,8191,0xDA\n8253,270274,0x0C,*\n278528,1835008,L\n'
- '2113536,-,E\n2113536,524288,L\n2637824,1179648,L\n3817472,,,-',
+ '1,8191,0xDA\n8253,270274,0x0C,*\n278528,2097152,L\n'
+ '2375680,-,E\n2375680,262144,L\n2637824,1179648,L\n3817472,,,-',
android_boards.AndroidOrigenQuadConfig().get_sfdisk_cmd())
def test_snowball_emmc_android(self):
self.assertEqual(
- '256,7936,0xDA\n8192,262144,0x0C,*\n270336,1835008,L\n'
- '2105344,-,E\n2105344,524288,L\n2629632,1179648,L\n3809280,,,-',
+ '256,7936,0xDA\n8192,262144,0x0C,*\n270336,2097152,L\n'
+ '2367488,-,E\n2367488,262144,L\n2629632,1179648,L\n3809280,,,-',
android_boards.AndroidSnowballEmmcConfig().get_sfdisk_cmd())
def test_vexpress_android(self):
self.assertEqual(
- '63,270272,0x0E,*\n270336,1835008,L\n2105344,524288,L\n'
- '2629632,-,E\n2629632,1179648,L\n3809280,,,-',
+ '63,270272,0x0E,*\n270336,2097152,L\n2367488,262144,L\n'
+ '2629632,-,E\n2629633,1179648,L\n3809282,,,-',
android_boards.AndroidVexpressConfig().get_sfdisk_cmd())
def test_mx5_android(self):
self.assertEqual(
- '1,8191,0xDA\n8192,262144,0x0C,*\n270336,1835008,L\n'
- '2105344,-,E\n2105344,524288,L\n2629632,1179648,L\n3809280,,,-',
+ '1,8191,0xDA\n8192,262144,0x0C,*\n270336,2097152,L\n'
+ '2367488,-,E\n2367488,262144,L\n2629632,1179648,L\n3809280,,,-',
android_boards.AndroidMx53LoCoConfig().get_sfdisk_cmd())
def test_mx6_android(self):
self.assertEqual(
- '1,8191,0xDA\n8192,262144,0x0C,*\n270336,1835008,L\n'
- '2105344,-,E\n2105344,524288,L\n2629632,1179648,L\n3809280,,,-',
+ '1,8191,0xDA\n8192,262144,0x0C,*\n270336,2097152,L\n'
+ '2367488,-,E\n2367488,262144,L\n2629632,1179648,L\n3809280,,,-',
android_boards.AndroidMx6QSabreliteConfig().get_sfdisk_cmd())