=== modified file 'linaro_image_tools/media_create/android_boards.py'
@@ -33,6 +33,7 @@
from linaro_image_tools.media_create.boards import SnowballEmmcConfig
from linaro_image_tools.media_create.boards import SMDKV310Config
from linaro_image_tools.media_create.boards import OrigenConfig
+from linaro_image_tools.media_create.boards import VexpressA9Config
from linaro_image_tools.media_create.boards import (
align_up,
align_partition,
@@ -167,6 +168,7 @@
def install_boot_loader(cls, boot_partition, boot_device_or_file):
pass
+
class AndroidOmapConfig(AndroidBoardConfig):
pass
@@ -228,6 +230,7 @@
return '%s,%s,0xDA\n%s' % (
loader_start, loader_len, command)
+
class AndroidMx53LoCoConfig(AndroidBoardConfig, Mx53LoCoConfig):
extra_boot_args_options = (
'earlyprintk rootdelay=1 fixrtc nocompcache di1_primary tve')
@@ -282,6 +285,11 @@
android_specific_args = 'init=/init androidboot.console=ttySAC2'
+class AndroidVexpressA9Config(AndroidBoardConfig, VexpressA9Config):
+ _extra_serial_opts = 'console=tty0 console=ttyAMA0,38400n8'
+ android_specific_args = 'init=/init androidboot.console=ttyAMA0'
+
+
android_board_configs = {
'beagle': AndroidBeagleConfig,
'panda': AndroidPandaConfig,
@@ -291,4 +299,5 @@
'mx53loco': AndroidMx53LoCoConfig,
'iMX53': AndroidMx53LoCoConfig,
'origen': AndroidOrigenConfig,
+ 'vexpress-a9': AndroidVexpressA9Config,
}
=== modified file 'linaro_image_tools/media_create/boards.py'
@@ -1266,7 +1266,7 @@
initrd_addr = '0x81000000'
load_addr = kernel_addr
kernel_flavors = ['linaro-vexpress']
- boot_script = None
+ boot_script = 'boot.scr'
# ARM Boot Monitor is used to load u-boot, uImage etc. into flash and
# only allows for FAT16
fat_size = 16
@@ -1287,6 +1287,13 @@
make_uInitrd(i_img_data, boot_dir)
+class VexpressA9Config(VexpressConfig):
+ # For now, this is a duplicate of VexpressConfig.
+ # In future, there will also be A5 and A15 variants.
+ # For all of these, there should never be any V1 hardware packs.
+ pass
+
+
class SamsungConfig(BoardConfig):
@classproperty
def extra_serial_opts(cls):
@@ -1430,6 +1437,7 @@
'igep': IgepConfig,
'panda': PandaConfig,
'vexpress': VexpressConfig,
+ 'vexpress-a9': VexpressA9Config,
'ux500': Ux500Config,
'snowball_sd': SnowballSdConfig,
'snowball_emmc': SnowballEmmcConfig,
=== modified file 'linaro_image_tools/media_create/tests/test_media_create.py'
@@ -919,6 +919,11 @@
expected = ['make_uImage', 'make_uInitrd']
self.assertEqual(expected, self.funcs_calls)
+ def test_vexpress_a9_steps(self):
+ self.make_boot_files(boards.VexpressA9Config)
+ expected = ['make_uImage', 'make_uInitrd']
+ self.assertEqual(expected, self.funcs_calls)
+
def test_mx5_steps(self):
class SomeMx5Config(boards.Mx5Config):
uboot_flavor = 'uboot_flavor'
@@ -1165,6 +1170,12 @@
'794624,-,E\n794624,524288,L\n1318912,1048576,L\n2367488,,,-',
android_boards.AndroidSnowballEmmcConfig.get_sfdisk_cmd())
+ def test_vexpress_android(self):
+ self.assertEqual(
+ '63,270272,0x0E,*\n270336,524288,L\n794624,524288,L\n' \
+ '1318912,-,E\n1318912,1048576,L\n2367488,,,-',
+ android_boards.AndroidVexpressA9Config.get_sfdisk_cmd())
+
class TestGetSfdiskCmdV2(TestCase):
def test_mx5(self):
@@ -1224,6 +1235,18 @@
'bootm 0x60008000 0x81000000'}
self.assertEqual(expected, boot_commands)
+ def test_vexpress_a9(self):
+ boot_commands = board_configs['vexpress-a9']._get_boot_env(
+ is_live=False, is_lowmem=False, consoles=['ttyXXX'],
+ rootfs_uuid="deadbeef", d_img_data=None)
+ expected = {
+ 'bootargs': 'console=tty0 console=ttyAMA0,38400n8 '
+ 'console=ttyXXX root=UUID=deadbeef rootwait ro',
+ 'bootcmd': 'fatload mmc 0:1 0x60008000 uImage; '
+ 'fatload mmc 0:1 0x81000000 uInitrd; '
+ 'bootm 0x60008000 0x81000000'}
+ self.assertEqual(expected, boot_commands)
+
def test_mx51(self):
boot_commands = boards.Mx51Config._get_boot_env(
is_live=False, is_lowmem=False, consoles=[],
@@ -1436,6 +1459,17 @@
'bootm 0x40007000 0x42000000'}
self.assertEqual(expected, boot_commands)
+ def test_android_vexpress_a9(self):
+ boot_commands = (android_boards.AndroidVexpressA9Config.
+ _get_boot_env(consoles=[]))
+ expected = {
+ 'bootargs': 'console=tty0 console=ttyAMA0,38400n8 '
+ 'rootwait ro init=/init androidboot.console=ttyAMA0',
+ 'bootcmd': 'fatload mmc 0:1 0x60008000 uImage; '
+ 'fatload mmc 0:1 0x81000000 uInitrd; '
+ 'bootm 0x60008000 0x81000000'}
+ self.assertEqual(expected, boot_commands)
+
class TestUnpackBinaryTarball(TestCaseWithFixtures):