From patchwork Thu Aug 4 13:59:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Westby X-Patchwork-Id: 3268 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 60C3F23F3D for ; Thu, 4 Aug 2011 13:59:17 +0000 (UTC) Received: from mail-qy0-f180.google.com (mail-qy0-f180.google.com [209.85.216.180]) by fiordland.canonical.com (Postfix) with ESMTP id 119F1A1818D for ; Thu, 4 Aug 2011 13:59:16 +0000 (UTC) Received: by qyk31 with SMTP id 31so484307qyk.11 for ; Thu, 04 Aug 2011 06:59:16 -0700 (PDT) Received: by 10.229.231.66 with SMTP id jp2mr653043qcb.83.1312466356431; Thu, 04 Aug 2011 06:59:16 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.229.6.73 with SMTP id 9cs15096qcy; Thu, 4 Aug 2011 06:59:15 -0700 (PDT) Received: by 10.217.6.131 with SMTP id y3mr1872571wes.10.1312466355067; Thu, 04 Aug 2011 06:59:15 -0700 (PDT) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by mx.google.com with ESMTP id v18si3896444wec.80.2011.08.04.06.59.14; Thu, 04 Aug 2011 06:59:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) client-ip=91.189.90.139; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) smtp.mail=bounces@canonical.com Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1QoySA-0002dc-Fs for ; Thu, 04 Aug 2011 13:59:14 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 73CC22E802E for ; Thu, 4 Aug 2011 13:59:14 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: linaro-image-tools X-Launchpad-Branch: ~linaro-image-tools/linaro-image-tools/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 400 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-image-tools/linaro-image-tools/trunk] Rev 400: Add SMDKV310 support to linaro-android-media-create. Message-Id: <20110804135914.12058.30273.launchpad@loganberry.canonical.com> Date: Thu, 04 Aug 2011 13:59:14 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="13604"; Instance="initZopeless config overlay" X-Launchpad-Hash: 4ddb3e00ba8927deff0e4ad5e8a690d6c61a3ebe Merge authors: Angus Ainslie (angus-akkea) Related merge proposals: https://code.launchpad.net/~linaro-landing-team-samsung/linaro-image-tools/add-smdkv310-android-support/+merge/69535 proposed by: Angus Ainslie (angus-akkea) review: Needs Information - James Westby (james-w) ------------------------------------------------------------ revno: 400 [merge] committer: James Westby branch nick: trunk timestamp: Thu 2011-08-04 14:58:02 +0100 message: Add SMDKV310 support to linaro-android-media-create. modified: linaro_image_tools/media_create/android_boards.py linaro_image_tools/media_create/boards.py --- lp:linaro-image-tools https://code.launchpad.net/~linaro-image-tools/linaro-image-tools/trunk You are subscribed to branch lp:linaro-image-tools. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-image-tools/linaro-image-tools/trunk/+edit-subscription === modified file 'linaro_image_tools/media_create/android_boards.py' --- linaro_image_tools/media_create/android_boards.py 2011-07-28 00:14:53 +0000 +++ linaro_image_tools/media_create/android_boards.py 2011-08-04 13:58:02 +0000 @@ -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' --- linaro_image_tools/media_create/boards.py 2011-07-26 15:20:56 +0000 +++ linaro_image_tools/media_create/boards.py 2011-07-28 01:02:24 +0000 @@ -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)