From patchwork Thu May 23 18:07:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milo Casagrande X-Patchwork-Id: 17175 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-bk0-f70.google.com (mail-bk0-f70.google.com [209.85.214.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 40FB42395B for ; Thu, 23 May 2013 18:08:22 +0000 (UTC) Received: by mail-bk0-f70.google.com with SMTP id ji2sf1915923bkc.1 for ; Thu, 23 May 2013 11:07:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-beenthere:x-forwarded-to:x-forwarded-for:delivered-to :mime-version:x-launchpad-project:x-launchpad-branch :x-launchpad-message-rationale:x-launchpad-branch-revision-number :x-launchpad-notification-type:to:from:subject:message-id:date :reply-to:sender:errors-to:precedence:x-generated-by :x-launchpad-hash:x-gm-message-state:x-original-sender :x-original-authentication-results:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=XQgHnFunQVIF+D9jYHxTxy64decK3brG08dXQhS/q6w=; b=bjPr8teBC/PRtLC6fXQJUshJIH0cmRRSRN2N5CXMH7gHLoV/6GyW6aSH8J5z0EjVGt O4H2n1bLP60zuo+z7FceooLtDauYsxv99XY/b9fUWVarv+WqgiC8JJpBJjQK4Hczg7W4 5taQFqDSl/7uV4bDT8QG4aKm5v/6rujL218VQ52KbIkvTnvojvhA6WkFYEKpcna67qBr /Lynh27kwIMx+EtLRrzyTtmHo0iPWW5+57UbkP4STJrUoCjnCKyYd6xwwhdV8URgAhZ3 qrN0HtRRn7jaj36XGCC7+ag4wxMvOX3hXtJx2K8IV+XG5fBFAwY9jmjxB91tKe1plgmq AXfQ== X-Received: by 10.180.85.5 with SMTP id d5mr3934976wiz.0.1369332445851; Thu, 23 May 2013 11:07:25 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.83.71 with SMTP id o7ls25435wiy.33.gmail; Thu, 23 May 2013 11:07:25 -0700 (PDT) X-Received: by 10.180.74.207 with SMTP id w15mr26986083wiv.19.1369332445782; Thu, 23 May 2013 11:07:25 -0700 (PDT) Received: from mail-ve0-x22f.google.com (mail-ve0-x22f.google.com [2607:f8b0:400c:c01::22f]) by mx.google.com with ESMTPS id mb1si9761354wic.91.2013.05.23.11.07.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 May 2013 11:07:25 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::22f is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::22f; Received: by mail-ve0-f175.google.com with SMTP id cz11so2694691veb.34 for ; Thu, 23 May 2013 11:07:24 -0700 (PDT) X-Received: by 10.58.250.66 with SMTP id za2mr6072461vec.56.1369332444584; Thu, 23 May 2013 11:07:24 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.126.138 with SMTP id c10csp63933vcs; Thu, 23 May 2013 11:07:22 -0700 (PDT) X-Received: by 10.180.87.162 with SMTP id az2mr45807790wib.10.1369332441246; Thu, 23 May 2013 11:07:21 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id e11si13293025wiw.78.2013.05.23.11.07.20 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 23 May 2013 11:07:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1UfZv6-0002RO-Qa for ; Thu, 23 May 2013 18:07:20 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id BC06FE153E for ; Thu, 23 May 2013 18:07:20 +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: 622 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-image-tools/linaro-image-tools/trunk] Rev 622: Added BeagleBone support. Message-Id: <20130523180720.24752.29955.launchpad@ackee.canonical.com> Date: Thu, 23 May 2013 18:07:20 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: list X-Generated-By: Launchpad (canonical.com); Revision="16640"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 0837658361e0336036a70677079822226c5e2adc X-Gm-Message-State: ALoCoQnMVB1ziuxb1jUwirflAt1jbSCI+vtNP7b8uT9LntTHi0AR/HkVcHen2OzYxOQ18Lj3GzTC X-Original-Sender: noreply@launchpad.net X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::22f is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Merge authors: Fathi Boudra (fboudra) Related merge proposals: https://code.launchpad.net/~fboudra/linaro-image-tools/beaglebone-support/+merge/165455 proposed by: Fathi Boudra (fboudra) review: Approve - Milo Casagrande (milo) ------------------------------------------------------------ revno: 622 [merge] author: Fathi Boudra committer: Milo Casagrande branch nick: trunk timestamp: Thu 2013-05-23 20:06:50 +0200 message: Added BeagleBone support. modified: linaro_image_tools/media_create/boards.py linaro_image_tools/media_create/tests/test_media_create.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/boards.py' --- linaro_image_tools/media_create/boards.py 2013-04-04 08:12:38 +0000 +++ linaro_image_tools/media_create/boards.py 2013-05-23 17:29:29 +0000 @@ -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' --- linaro_image_tools/media_create/tests/test_media_create.py 2013-04-04 08:12:38 +0000 +++ linaro_image_tools/media_create/tests/test_media_create.py 2013-05-23 17:57:10 +0000 @@ -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):