From patchwork Wed Oct 17 11:49:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Sokolovsky X-Patchwork-Id: 12304 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 644A31D5170 for ; Wed, 17 Oct 2012 11:49:18 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id C98EBA18355 for ; Wed, 17 Oct 2012 11:49:17 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so11194384iej.11 for ; Wed, 17 Oct 2012 04:49:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :content-type: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; bh=dI2sjYRbOjrYcPR3JkkIc+2umTNIhQtMv5Ln93s2oPo=; b=bP5rvndNYxhHbMPXgkMo3mSWsOPk4Snz8bRm1sSgozXc0/FoK/iqkegEVbqxB4DeDY Ro35bYQ559+cQZTV7TLZkYJ+VOLpL5j46w4hTFSqzBUK21LARpvqnmUkocwETWqcWCii AIkteoC01xZcTLpZxW676MLSdecrtKii3/oG1EBKXNd6AqI0LXFZaytLJLFnliWKMO9x hwxBbhfPZ00B5k1kx/XKPADLXuGnOAU7jQlwTgDkqxjtJfHt2tvCXDsok0dAwIQEkW5n K36/MBjWoelv92U3QLNUmrFn+7ZlhWHMzReWWttZ3MH/BpG5ZNPE1OVx3PSOg1pIftX6 fApg== Received: by 10.42.57.10 with SMTP id b10mr423255ich.54.1350474557244; Wed, 17 Oct 2012 04:49:17 -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.50.67.148 with SMTP id n20csp882065igt; Wed, 17 Oct 2012 04:49:16 -0700 (PDT) Received: by 10.180.86.34 with SMTP id m2mr3628492wiz.14.1350474555244; Wed, 17 Oct 2012 04:49:15 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id f79si23880769weo.20.2012.10.17.04.49.14 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 17 Oct 2012 04:49:15 -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; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1TOS7e-0007T2-G0 for ; Wed, 17 Oct 2012 11:49:14 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 6BE49E0514 for ; Wed, 17 Oct 2012 11:49: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: 577 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-image-tools/linaro-image-tools/trunk] Rev 577: [merge] Allow to override initrd_high and fdt_high uboot params, do so for Snowball. Message-Id: <20121017114914.22057.61951.launchpad@ackee.canonical.com> Date: Wed, 17 Oct 2012 11:49: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="16152"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: a0e86a9483b496266137fd3f1f728c990571135f X-Gm-Message-State: ALoCoQkB/MnX+PWgRefyKFswj9hl1CbhjfEuICx2GIEG3BJ5dwbj+7wpu9FQwEQMZsGBzvm+tT6I Merge authors: Paul Sokolovsky (pfalcon) Related merge proposals: https://code.launchpad.net/~pfalcon/linaro-image-tools/snowball_dts_tweaks/+merge/129419 proposed by: Paul Sokolovsky (pfalcon) review: Approve - Milo Casagrande (milo) ------------------------------------------------------------ revno: 577 [merge] committer: Paul Sokolovsky branch nick: trunk timestamp: Wed 2012-10-17 14:47:40 +0300 message: [merge] Allow to override initrd_high and fdt_high uboot params, do so for Snowball. modified: linaro_image_tools/media_create/android_boards.py 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/android_boards.py' --- linaro_image_tools/media_create/android_boards.py 2012-09-20 08:08:10 +0000 +++ linaro_image_tools/media_create/android_boards.py 2012-10-17 10:48:49 +0000 @@ -84,6 +84,8 @@ # comes from - and lives in the same directory in the boot tarball, so # here we don't need to pass the whole path to it. boot_env["bootcmd"] = cls._get_bootcmd(initrd, cls.dtb_name) + boot_env["initrd_high"] = cls.initrd_high + boot_env["fdt_high"] = cls.fdt_high return boot_env @classmethod @@ -204,7 +206,9 @@ class AndroidSnowballSdConfig(AndroidBoardConfig, SnowballSdConfig): boot_script = 'boot.scr' + fdt_high = '0x05000000' initrd_addr = '0x05000000' + initrd_high = '0x06000000' extra_boot_args_options = ( 'earlyprintk mem=128M@0 mali.mali_mem=64M@128M hwmem=168M@192M ' 'mem=22M@360M mem_issw=1M@383M mem=640M@384M vmalloc=500M') @@ -216,7 +220,9 @@ class AndroidSnowballEmmcConfig(AndroidBoardConfig, SnowballEmmcConfig): boot_script = 'boot.scr' + fdt_high = '0x05000000' initrd_addr = '0x05000000' + initrd_high = '0x06000000' extra_boot_args_options = ( 'earlyprintk mem=128M@0 mali.mali_mem=64M@128M hwmem=168M@192M ' 'mem=22M@360M mem_issw=1M@383M mem=640M@384M vmalloc=500M') === modified file 'linaro_image_tools/media_create/boards.py' --- linaro_image_tools/media_create/boards.py 2012-10-09 14:39:52 +0000 +++ linaro_image_tools/media_create/boards.py 2012-10-12 12:40:11 +0000 @@ -403,10 +403,12 @@ # be specified in the hwpack metadata. kernel_addr = None initrd_addr = None + initrd_high = '0xffffffff' load_addr = None dtb_addr = None dtb_name = None dtb_file = None + fdt_high = '0xffffffff' kernel_flavors = None boot_script = None serial_tty = None @@ -841,6 +843,8 @@ boot_env["bootargs"] = cls._get_bootargs( is_live, is_lowmem, consoles, rootfs_id) boot_env["bootcmd"] = cls._get_bootcmd(i_img_data, d_img_data) + boot_env["initrd_high"] = cls.initrd_high + boot_env["fdt_high"] = cls.fdt_high return boot_env @classmethod @@ -1976,8 +1980,8 @@ # https://bugs.launchpad.net/linaro-image-tools/+bug/788765 # for more. return ( - 'setenv initrd_high "0xffffffff"\n' - 'setenv fdt_high "0xffffffff"\n' + 'setenv initrd_high "%(initrd_high)s"\n' + 'setenv fdt_high "%(fdt_high)s"\n' 'setenv bootcmd "%(bootcmd)s"\n' 'setenv bootargs "%(bootargs)s"\n' "boot" === modified file 'linaro_image_tools/media_create/tests/test_media_create.py' --- linaro_image_tools/media_create/tests/test_media_create.py 2012-10-04 09:12:57 +0000 +++ linaro_image_tools/media_create/tests/test_media_create.py 2012-10-17 08:59:25 +0000 @@ -1693,7 +1693,9 @@ 'console=ttyXXX root=UUID=deadbeef rootwait ro', 'bootcmd': 'fatload mmc 0:1 0x60000000 uImage; ' 'fatload mmc 0:1 0x62000000 uInitrd; ' - 'bootm 0x60000000 0x62000000'} + 'bootm 0x60000000 0x62000000', + 'fdt_high': '0xffffffff', + 'initrd_high': '0xffffffff'} self.assertEqual(expected, boot_commands) def test_vexpress_a9(self): @@ -1705,7 +1707,9 @@ 'console=ttyXXX root=UUID=deadbeef rootwait ro', 'bootcmd': 'fatload mmc 0:1 0x60000000 uImage; ' 'fatload mmc 0:1 0x62000000 uInitrd; ' - 'bootm 0x60000000 0x62000000'} + 'bootm 0x60000000 0x62000000', + 'fdt_high': '0xffffffff', + 'initrd_high': '0xffffffff'} self.assertEqual(expected, boot_commands) def test_mx51(self): @@ -1719,7 +1723,9 @@ 'bootcmd': 'fatload mmc 0:2 0x90000000 uImage; ' 'fatload mmc 0:2 0x92000000 uInitrd; ' 'fatload mmc 0:2 0x91ff0000 board.dtb; ' - 'bootm 0x90000000 0x92000000 0x91ff0000'} + 'bootm 0x90000000 0x92000000 0x91ff0000', + 'fdt_high': '0xffffffff', + 'initrd_high': '0xffffffff'} self.assertEqual(expected, boot_commands) def test_smdkv310(self): @@ -1733,7 +1739,9 @@ 'fatload mmc 0:2 0x42000000 uInitrd; ' 'bootm 0x40007000 0x42000000', 'ethact': 'smc911x-0', - 'ethaddr': '00:40:5c:26:0a:5b'} + 'ethaddr': '00:40:5c:26:0a:5b', + 'fdt_high': '0xffffffff', + 'initrd_high': '0xffffffff'} self.assertEqual(expected, boot_commands) def test_origen(self): @@ -1745,7 +1753,9 @@ 'rootwait ro', 'bootcmd': 'fatload mmc 0:2 0x40007000 uImage; ' 'fatload mmc 0:2 0x42000000 uInitrd; ' - 'bootm 0x40007000 0x42000000'} + 'bootm 0x40007000 0x42000000', + 'fdt_high': '0xffffffff', + 'initrd_high': '0xffffffff'} self.assertEqual(expected, boot_commands) def test_ux500(self): @@ -1761,7 +1771,9 @@ 'hwmem=48M@302M mem=152M@360M', 'bootcmd': 'fatload mmc 1:1 0x00100000 uImage; ' 'fatload mmc 1:1 0x08000000 uInitrd; ' - 'bootm 0x00100000 0x08000000'} + 'bootm 0x00100000 0x08000000', + 'fdt_high': '0xffffffff', + 'initrd_high': '0xffffffff'} self.assertEqual(expected, boot_commands) def test_snowball_emmc(self): @@ -1777,7 +1789,9 @@ 'hwmem=48M@302M mem=152M@360M', 'bootcmd': 'fatload mmc 1:1 0x00100000 uImage; ' 'fatload mmc 1:1 0x08000000 uInitrd; ' - 'bootm 0x00100000 0x08000000'} + 'bootm 0x00100000 0x08000000', + 'fdt_high': '0xffffffff', + 'initrd_high': '0xffffffff'} self.assertEqual(expected, boot_commands) def test_panda(self): @@ -1798,7 +1812,9 @@ 'bootcmd': 'fatload mmc 0:1 0x80200000 uImage; ' 'fatload mmc 0:1 0x81600000 uInitrd; ' 'fatload mmc 0:1 0x815f0000 board.dtb; ' - 'bootm 0x80200000 0x81600000 0x815f0000'} + 'bootm 0x80200000 0x81600000 0x815f0000', + 'fdt_high': '0xffffffff', + 'initrd_high': '0xffffffff'} self.assertEqual(expected, boot_commands) def test_beagle(self): @@ -1819,7 +1835,9 @@ 'bootcmd': 'fatload mmc 0:1 0x80000000 uImage; ' 'fatload mmc 0:1 0x81600000 uInitrd; ' 'fatload mmc 0:1 0x815f0000 board.dtb; ' - 'bootm 0x80000000 0x81600000 0x815f0000'} + 'bootm 0x80000000 0x81600000 0x815f0000', + 'fdt_high': '0xffffffff', + 'initrd_high': '0xffffffff'} self.assertEqual(expected, boot_commands) def test_igep(self): @@ -1840,7 +1858,9 @@ 'bootcmd': 'fatload mmc 0:1 0x80000000 uImage; ' 'fatload mmc 0:1 0x81600000 uInitrd; ' 'fatload mmc 0:1 0x815f0000 board.dtb; ' - 'bootm 0x80000000 0x81600000 0x815f0000'} + 'bootm 0x80000000 0x81600000 0x815f0000', + 'fdt_high': '0xffffffff', + 'initrd_high': '0xffffffff'} self.assertEqual(expected, boot_cmd) def test_overo(self): @@ -1862,7 +1882,9 @@ 'bootcmd': 'fatload mmc 0:1 0x80000000 uImage; ' 'fatload mmc 0:1 0x81600000 uInitrd; ' 'fatload mmc 0:1 0x815f0000 board.dtb; ' - 'bootm 0x80000000 0x81600000 0x815f0000'} + 'bootm 0x80000000 0x81600000 0x815f0000', + 'fdt_high': '0xffffffff', + 'initrd_high': '0xffffffff'} self.assertEqual(expected, boot_commands) @@ -1958,7 +1980,9 @@ 'bootcmd': 'fatload mmc 0:1 0x80200000 uImage; ' 'fatload mmc 0:1 0x81600000 uInitrd; ' 'fatload mmc 0:1 0x815f0000 board.dtb; ' - 'bootm 0x80200000 0x81600000 0x815f0000'} + 'bootm 0x80200000 0x81600000 0x815f0000', + 'fdt_high': '0xffffffff', + 'initrd_high': '0xffffffff'} self.assertBootEnv(config, expected) def test_android_snowball_sd(self): @@ -1971,7 +1995,9 @@ 'bootcmd': 'fatload mmc 1:1 0x00100000 uImage; ' 'fatload mmc 1:1 0x05000000 uInitrd; ' 'fatload mmc 1:1 0x8000000 board.dtb; ' - 'bootm 0x00100000 0x05000000 0x8000000'} + 'bootm 0x00100000 0x05000000 0x8000000', + 'fdt_high': '0x05000000', + 'initrd_high': '0x06000000'} self.assertBootEnv( android_boards.AndroidSnowballSdConfig, expected) @@ -1985,7 +2011,9 @@ 'bootcmd': 'fatload mmc 0:2 0x00100000 uImage; ' 'fatload mmc 0:2 0x05000000 uInitrd; ' 'fatload mmc 0:2 0x8000000 board.dtb; ' - 'bootm 0x00100000 0x05000000 0x8000000'} + 'bootm 0x00100000 0x05000000 0x8000000', + 'fdt_high': '0x05000000', + 'initrd_high': '0x06000000'} self.assertBootEnv( android_boards.AndroidSnowballEmmcConfig, expected) @@ -1995,7 +2023,9 @@ 'rootwait ro init=/init androidboot.console=ttySAC2', 'bootcmd': 'fatload mmc 0:2 0x40007000 uImage; ' 'fatload mmc 0:2 0x42000000 uInitrd; ' - 'bootm 0x40007000 0x42000000'} + 'bootm 0x40007000 0x42000000', + 'fdt_high': '0xffffffff', + 'initrd_high': '0xffffffff'} self.assertBootEnv( android_boards.AndroidOrigenConfig, expected) @@ -2005,7 +2035,9 @@ 'rootwait ro init=/init androidboot.console=ttyAMA0', 'bootcmd': 'fatload mmc 0:1 0x60000000 uImage; ' 'fatload mmc 0:1 0x62000000 uInitrd; ' - 'bootm 0x60000000 0x62000000'} + 'bootm 0x60000000 0x62000000', + 'fdt_high': '0xffffffff', + 'initrd_high': '0xffffffff'} self.assertBootEnv( android_boards.AndroidVexpressConfig, expected) @@ -2017,7 +2049,9 @@ 'androidboot.console=ttymxc0', 'bootcmd': 'fatload mmc 0:2 0x70000000 uImage; ' 'fatload mmc 0:2 0x72000000 uInitrd; ' - 'bootm 0x70000000 0x72000000'} + 'bootm 0x70000000 0x72000000', + 'fdt_high': '0xffffffff', + 'initrd_high': '0xffffffff'} self.assertBootEnv( android_boards.AndroidMx53LoCoConfig, expected) @@ -2030,7 +2064,9 @@ 'bootcmd': 'fatload mmc 0:2 0x10000000 uImage; ' 'fatload mmc 0:2 0x12000000 uInitrd; ' 'fatload mmc 0:2 0x11ff0000 board.dtb; ' - 'bootm 0x10000000 0x12000000 0x11ff0000'} + 'bootm 0x10000000 0x12000000 0x11ff0000', + 'fdt_high': '0xffffffff', + 'initrd_high': '0xffffffff'} self.assertBootEnv( android_boards.AndroidMx6QSabreliteConfig, expected) @@ -2213,7 +2249,8 @@ self.assertEqual(expected, fixture.mock.commands_executed) def test_get_plain_boot_script_contents(self): - boot_env = {'bootargs': 'mybootargs', 'bootcmd': 'mybootcmd'} + boot_env = {'bootargs': 'mybootargs', 'bootcmd': 'mybootcmd', + 'initrd_high': '0xffffffff', 'fdt_high': '0xffffffff'} boot_script_data = get_plain_boot_script_contents(boot_env) self.assertEqual(textwrap.dedent("""\ setenv initrd_high "0xffffffff" @@ -2230,7 +2267,8 @@ fixture = self._mock_Popen() boot_script_path = os.path.join(tempdir, 'boot.scr') plain_boot_script_path = os.path.join(tempdir, 'boot.txt') - boot_env = {'bootargs': 'mybootargs', 'bootcmd': 'mybootcmd'} + boot_env = {'bootargs': 'mybootargs', 'bootcmd': 'mybootcmd', + 'initrd_high': '0xffffffff', 'fdt_high': '0xffffffff'} make_boot_script(boot_env, boot_script_path) expected = [ '%s cp /tmp/random-abxzr %s' % (