=== modified file 'linaro_image_tools/media_create/android_boards.py'
@@ -26,11 +26,15 @@
from linaro_image_tools.media_create.partitions import SECTOR_SIZE
from linaro_image_tools.media_create.boards import PART_ALIGN_S
+from linaro_image_tools.media_create.boards import SAMSUNG_V310_BL1_START
+from linaro_image_tools.media_create.boards import SAMSUNG_V310_BL2_START
+from linaro_image_tools.media_create.boards import SAMSUNG_V310_BL2_LEN
from linaro_image_tools.media_create.boards import BeagleConfig
from linaro_image_tools.media_create.boards import PandaConfig
from linaro_image_tools.media_create.boards import Mx53LoCoConfig
from linaro_image_tools.media_create.boards import SnowballSdConfig
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 (
align_up,
align_partition,
@@ -240,10 +244,33 @@
def install_boot_loader(cls, boot_partition, boot_device_or_file):
install_mx5_boot_loader(os.path.join(boot_device_or_file, "u-boot.imx"), boot_partition, cls.LOADER_MIN_SIZE_S)
+
+class AndroidSMDKV310Config(AndroidBoardConfig, SMDKV310Config):
+ _extra_serial_opts = 'console=tty0 console=ttySAC1,115200n8'
+ android_specific_args = 'init=/init androidboot.console=ttySAC1'
+
+ @classmethod
+ def get_sfdisk_cmd(cls, should_align_boot_part=False):
+ loaders_min_len = (
+ SAMSUNG_V310_BL2_START + SAMSUNG_V310_BL2_LEN -
+ SAMSUNG_V310_BL1_START)
+
+ loader_start, loader_end, loader_len = align_partition(
+ 1, loaders_min_len, 1, PART_ALIGN_S)
+
+ command = super(AndroidSMDKV310Config, cls).get_sfdisk_cmd(
+ should_align_boot_part=False, start_addr=loader_end,
+ extra_part=True)
+
+ return '%s,%s,0xDA\n%s' % (
+ loader_start, loader_len, command)
+
+
android_board_configs = {
'beagle': AndroidBeagleConfig,
'panda': AndroidPandaConfig,
'snowball_sd': AndroidSnowballSdConfig,
'snowball_emmc': AndroidSnowballEmmcConfig,
+ 'smdkv310': AndroidSMDKV310Config,
'iMX53': AndroidMx53LoCoConfig,
}
=== modified file 'linaro_image_tools/media_create/boards.py'
@@ -1042,6 +1042,20 @@
'u-boot.bin')
return uboot_file
+
+ @classmethod
+ def populate_raw_partition(cls, chroot_dir, boot_device_or_file):
+ # Populate created raw partition with BL1, env and u-boot
+ spl_file = os.path.join(chroot_dir, 'boot', 'u-boot-mmc-spl.bin')
+ assert os.path.getsize(spl_file) <= (SAMSUNG_V310_BL1_LEN * SECTOR_SIZE), (
+ "%s is larger than SAMSUNG_V310_BL1_LEN" % spl_file)
+ _dd(spl_file, boot_device_or_file, seek=SAMSUNG_V310_BL1_START)
+ uboot_file = os.path.join(chroot_dir, 'boot', 'u-boot.bin')
+ assert os.path.getsize(uboot_file) <= (SAMSUNG_V310_BL2_LEN * SECTOR_SIZE), (
+ "%s is larger than SAMSUNG_V310_BL2_LEN" % uboot_file)
+ _dd(uboot_file, boot_device_or_file, seek=SAMSUNG_V310_BL2_START)
+
+
@classmethod
def install_samsung_boot_loader(cls, chroot_dir, boot_device_or_file):
spl_file = cls._get_samsung_spl(chroot_dir)