=== modified file 'linaro_image_tools/media_create/boards.py'
@@ -896,7 +896,6 @@
class OmapConfig(BoardConfig):
-
def __init__(self):
super(OmapConfig, self).__init__()
self.kernel_flavors = ['linaro-omap4', 'linaro-lt-omap',
@@ -963,7 +962,6 @@
class BeagleConfig(OmapConfig):
-
def __init__(self):
super(BeagleConfig, self).__init__()
self.boot_script = 'boot.scr'
@@ -1016,6 +1014,21 @@
self._live_serial_options = 'serialtty=%s'
+class BeagleBoneConfig(OmapConfig):
+ def __init__(self):
+ super(BeagleBoneConfig, self).__init__()
+ self.boot_script = 'boot.scr'
+ self.bootloader_flavor = 'am335x_evm'
+ self.kernel_flavors = ['am335x']
+ self._serial_tty = 'ttyO0'
+ self.dtb_addr = '0x815f0000'
+ self.initrd_addr = '0x81600000'
+ self.kernel_addr = '0x80200000'
+ self.load_addr = '0x80008000'
+ self.extra_boot_args_options = ('fixrtc')
+ self._extra_serial_options = 'console=ttyO0,115200n8'
+
+
class IgepConfig(BeagleConfig):
def __init__(self):
super(IgepConfig, self).__init__()
@@ -1774,6 +1787,7 @@
board_configs = {
'arndale': ArndaleConfig,
'beagle': BeagleConfig,
+ 'beaglebone': BeagleBoneConfig,
'efikamx': EfikamxConfig,
'efikasb': EfikasbConfig,
'fastmodel': FastModelConfig,
=== modified file 'linaro_image_tools/media_create/tests/test_media_create.py'
@@ -1429,6 +1429,16 @@
expected = []
self.assertEqual(expected, self.funcs_calls)
+ def test_beaglbone_steps(self):
+ board_conf = boards.BeagleBoneConfig()
+ board_conf.hwpack_format = HardwarepackHandler.FORMAT_1
+ self.mock_set_appropriate_serial_tty(board_conf)
+ self.make_boot_files(board_conf)
+ expected = [
+ 'install_omap_boot_loader', 'make_uImage', 'make_uInitrd',
+ 'make_dtb', 'make_boot_script', 'make_boot_ini']
+ self.assertEqual(expected, self.funcs_calls)
+
class TestPopulateRawPartition(TestCaseWithFixtures):
@@ -1555,6 +1565,11 @@
expected = []
self.assertEqual(expected, self.funcs_calls)
+ def test_beaglebone_raw(self):
+ self.populate_raw_partition(boards.BeagleBoneConfig())
+ expected = []
+ self.assertEqual(expected, self.funcs_calls)
+
class TestPopulateRawPartitionAndroid(TestCaseWithFixtures):
@@ -1861,6 +1876,13 @@
'63,106432,0x83,*\n106496,,,-',
board_conf.get_sfdisk_cmd())
+ def test_beaglebone(self):
+ board_conf = get_board_config('highbank')
+ self.set_up_config(board_conf)
+ self.assertEquals(
+ '63,106432,0x83,*\n106496,,,-',
+ board_conf.get_sfdisk_cmd())
+
def test_panda_android(self):
self.assertEqual(
'63,270272,0x0C,*\n270336,1048576,L\n1318912,524288,L\n'
@@ -1983,6 +2005,13 @@
'63,106432,0x83,*\n106496,,,-',
board_conf.get_sfdisk_cmd())
+ def test_beaglebone(self):
+ board_conf = get_board_config('beaglebone')
+ board_conf.partition_layout = 'bootfs_rootfs'
+ self.assertEquals(
+ '63,106432,0x0C,*\n106496,,,-',
+ board_conf.get_sfdisk_cmd())
+
class TestGetBootCmd(TestCase):
@@ -2241,6 +2270,24 @@
'initrd_high': '0xffffffff'}
self.assertEqual(expected, boot_commands)
+ def test_beaglebone(self):
+ config = get_board_config('beaglebone')
+ config.serial_tty = config._serial_tty
+ boot_commands = config._get_boot_env(
+ is_live=False, is_lowmem=False, consoles=[],
+ rootfs_id="UUID=deadbeef", i_img_data="initrd",
+ d_img_data="board.dtb")
+ expected = {
+ 'bootargs': 'console=ttyO0,115200n8 '
+ 'root=UUID=deadbeef rootwait ro fixrtc',
+ 'bootcmd': 'fatload mmc 0:1 0x80200000 uImage; '
+ 'fatload mmc 0:1 0x81600000 uInitrd; '
+ 'fatload mmc 0:1 0x815f0000 board.dtb; '
+ 'bootm 0x80200000 0x81600000 0x815f0000',
+ 'fdt_high': '0xffffffff',
+ 'initrd_high': '0xffffffff'}
+ self.assertEqual(expected, boot_commands)
+
class TestExtraBootCmd(TestCaseWithFixtures):