{"id":807081,"url":"http://patchwork.ozlabs.org/api/patches/807081/?format=json","web_url":"http://patchwork.ozlabs.org/project/buildroot/patch/1504010311-29937-1-git-send-email-fabio.estevam@nxp.com/","project":{"id":27,"url":"http://patchwork.ozlabs.org/api/projects/27/?format=json","name":"Buildroot development","link_name":"buildroot","list_id":"buildroot.buildroot.org","list_email":"buildroot@buildroot.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<1504010311-29937-1-git-send-email-fabio.estevam@nxp.com>","list_archive_url":null,"date":"2017-08-29T12:38:30","name":"[1/2] imx: Introduce an SPL genimage template","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"a8e528a4ff12d6968dc0d2ac73f574c5129de94e","submitter":{"id":67998,"url":"http://patchwork.ozlabs.org/api/people/67998/?format=json","name":"Fabio Estevam","email":"fabio.estevam@nxp.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/buildroot/patch/1504010311-29937-1-git-send-email-fabio.estevam@nxp.com/mbox/","series":[{"id":360,"url":"http://patchwork.ozlabs.org/api/series/360/?format=json","web_url":"http://patchwork.ozlabs.org/project/buildroot/list/?series=360","date":"2017-08-29T12:38:30","name":"[1/2] imx: Introduce an SPL genimage template","version":1,"mbox":"http://patchwork.ozlabs.org/series/360/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/807081/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/807081/checks/","tags":{},"related":[],"headers":{"Return-Path":"<buildroot-bounces@busybox.net>","X-Original-To":["incoming@patchwork.ozlabs.org","buildroot@lists.busybox.net"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","buildroot@osuosl.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=busybox.net\n\t(client-ip=140.211.166.137; helo=fraxinus.osuosl.org;\n\tenvelope-from=buildroot-bounces@busybox.net;\n\treceiver=<UNKNOWN>)","spf=fail (sender IP is 192.88.168.50)\n\tsmtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed)\n\theader.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com;"],"Received":["from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xhSqX1fLpz9t2Q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 22:38:48 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id BE7A386F87;\n\tTue, 29 Aug 2017 12:38:44 +0000 (UTC)","from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id oN_3H9cka3tJ; Tue, 29 Aug 2017 12:38:43 +0000 (UTC)","from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 3FE2987056;\n\tTue, 29 Aug 2017 12:38:43 +0000 (UTC)","from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 93B1D1C0167\n\tfor <buildroot@lists.busybox.net>;\n\tTue, 29 Aug 2017 12:38:41 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 8ADF130117\n\tfor <buildroot@lists.busybox.net>;\n\tTue, 29 Aug 2017 12:38:41 +0000 (UTC)","from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 0g8TmBwQR4Kj for <buildroot@lists.busybox.net>;\n\tTue, 29 Aug 2017 12:38:39 +0000 (UTC)","from NAM01-SN1-obe.outbound.protection.outlook.com\n\t(mail-sn1nam01on0073.outbound.protection.outlook.com [104.47.32.73])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 7ECFD2FDD4\n\tfor <buildroot@buildroot.org>; Tue, 29 Aug 2017 12:38:39 +0000 (UTC)","from BN6PR03CA0071.namprd03.prod.outlook.com (10.173.137.33) by\n\tCO2PR03MB2264.namprd03.prod.outlook.com (10.166.92.145) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id\n\t15.1.1385.9; Tue, 29 Aug 2017 12:38:37 +0000","from BN1BFFO11FD008.protection.gbl (2a01:111:f400:7c10::1:101) by\n\tBN6PR03CA0071.outlook.office365.com (2603:10b6:404:4c::33) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1385.9 via\n\tFrontend Transport; Tue, 29 Aug 2017 12:38:37 +0000","from tx30smr01.am.freescale.net (192.88.168.50) by\n\tBN1BFFO11FD008.mail.protection.outlook.com (10.58.144.71) with\n\tMicrosoft SMTP Server (version=TLS1_0,\n\tcipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1341.15\n\tvia Frontend Transport; Tue, 29 Aug 2017 12:38:37 +0000","from r49496.am.freescale.net (r49496.am.freescale.net\n\t[10.29.244.181])\n\tby tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id\n\tv7TCcZOg019806; Tue, 29 Aug 2017 05:38:35 -0700"],"X-Virus-Scanned":["amavisd-new at osuosl.org","amavisd-new at osuosl.org"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","Received-SPF":"Fail (protection.outlook.com: domain of nxp.com does not\n\tdesignate 192.88.168.50 as permitted sender)\n\treceiver=protection.outlook.com; \n\tclient-ip=192.88.168.50; helo=tx30smr01.am.freescale.net;","From":"Fabio Estevam <fabio.estevam@nxp.com>","To":"<buildroot@buildroot.org>","Date":"Tue, 29 Aug 2017 09:38:30 -0300","Message-ID":"<1504010311-29937-1-git-send-email-fabio.estevam@nxp.com>","X-Mailer":"git-send-email 2.7.4","X-EOPAttributedMessage":"0","X-Matching-Connectors":"131484839173946672;\n\t(91ab9b29-cfa4-454e-5278-08d120cd25b8); ()","X-Forefront-Antispam-Report":"CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI;\n\tSFV:NSPM;\n\tSFS:(10009020)(6009001)(336005)(39380400002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(105606002)(47776003)(4326008)(33646002)(8936002)(2351001)(50226002)(85426001)(104016004)(36756003)(110136004)(86362001)(53936002)(189998001)(498600001)(2906002)(6666003)(5003940100001)(8676002)(68736007)(626005)(8656003)(97736004)(77096006)(5660300001)(106466001)(50986999)(81166006)(6916009)(50466002)(356003)(305945005)(81156014)(48376002);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2264;\n\tH:tx30smr01.am.freescale.net; \n\tFPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; ","X-Microsoft-Exchange-Diagnostics":["1; BN1BFFO11FD008;\n\t1:WN4DYdQvB/0pdfJMfxzQXnKWeGAZXhNlQaknyM+yez0vgd6IdChxEbz0cMh8PEq2Dkje/EJYNL8qkd+GBnQWFbPJ52dHOzwTv4Qdta9RqksLZPFMP1f4ljthkiXrqc4P","1; CO2PR03MB2264;\n\t3:DNkLuuqzRuwtILMH2bb37lTIMTBhd9Gi6F8EtL9db4hNfVCKMEV5YQ9LZuLlmGiFUf6T/WnjVByXD2aDi0Tq1NtOxfGXCy0OhyoKcyuWPZM85SIAg2hYxZDWa1beAHsM2aivNM/46Z2lZ5V6U9Wy2nY5v1d9Mi8E0SgTxfpFTya79YC+DOCFlg8kpGJreGBfxbWTL0eNGXmIaojgDhiG8T/YWBMNVWtIWzqpsYuMhEuZBgzVPBYy71P5A9yEhbRU4dvYyZkd6Rha/rWlEVDENOaTHo/8Na27GrxWmMDBjcdYtFGV7bwWt5VsXglUTu1/NR1Kdy8Z6bG0uBLdGVhoR6D1isLNFZ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vxAbLo4WOx86FAGts/5RXH4ow4IUSEDGf4zCP18LQ17QxBrSqMe2KNCTymMSTDLCBEs1n/VFGlzo+Qebun1BNlBvjH0nAQGKDlrEHVUosBvi0h5PtiiMDfx9knQqNFpJCQ66Jy9MLQvBMhYPcxFSzdqwTOsC369hDA2Cf8mrRPkMjCaZ542vF9Vc9Rpwv7yG870yVAe6MpVistApYo0ep/eRcQJK+czEcMWupH4OQVVqP1rnr7L0+bO7G2Lw==;\n\t5:lknpbbt4DK7wIymH3Iu1N3s9EdFqsElMKMjWOD7DS2T+WjMbYLUnSXWF/3NAlaLWjviMd3fRpJTB6oIYdSEgwnTZh+zhu8nl7XnWtOfTphXh61o+2mEO4Zq1FWnYv51QEAq2CnM6ftcVT2pVe3LNeg==;\n\t24:Pd43CccirNr+WlhYzhN2lPJ3pdLdoUS7UxOpXq3VnxCdXTG0jlrSMOPQhUHMdNTACrq6zs1i9p8SZN7H54fSpnD2OZGvyNRS3r7eQvRTYY8=;\n\t7:1FkQAwCy+Wr1zDsnX3INyRlkreYT5omYrtCHGuzW1QIaX+mNe9bNxL8ur269eRHXJazbl/NB8m4VYwSjYLxVZqO+Xt0/vAjVM5eHhEWbIu2N1w6MQwLKtPeobSoxzep4KdPcZAUREccnfwHuM/k3H3uebkRPsUYTRJOMF7r/TWnoTPjSeU7BZdn/OEDSoHITdTh87mU/TgkBaVUTPK2y85BdKXa0n09f7/JzyjefF1I="],"MIME-Version":"1.0","X-MS-PublicTrafficType":"Email","X-MS-Office365-Filtering-Correlation-Id":"e43cd99f-946a-4a14-9bd0-08d4eedadec4","X-Microsoft-Antispam":"UriScan:; BCL:0; PCL:0;\n\tRULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);\n\tSRVR:CO2PR03MB2264; ","X-MS-TrafficTypeDiagnostic":"CO2PR03MB2264:","X-Exchange-Antispam-Report-Test":"UriScan:(185117386973197);","X-Microsoft-Antispam-PRVS":"<CO2PR03MB2264F373E97827B231BDFD64E39F0@CO2PR03MB2264.namprd03.prod.outlook.com>","X-Exchange-Antispam-Report-CFA-Test":"BCL:0; PCL:0;\n\tRULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(8121501046)(5005006)(13018025)(13016025)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123563025)(20161123559100)(20161123561025)(20161123556025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123565025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);\n\tSRVR:CO2PR03MB2264; BCL:0; PCL:0;\n\tRULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);\n\tSRVR:CO2PR03MB2264; ","X-Forefront-PRVS":"0414DF926F","SpamDiagnosticOutput":"1:99","SpamDiagnosticMetadata":"NSPM","X-MS-Exchange-CrossTenant-OriginalArrivalTime":"29 Aug 2017 12:38:37.2230\n\t(UTC)","X-MS-Exchange-CrossTenant-Id":"5afe0b00-7697-4969-b663-5eab37d5f47e","X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp":"TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;\n\tIp=[192.88.168.50]; \n\tHelo=[tx30smr01.am.freescale.net]","X-MS-Exchange-CrossTenant-FromEntityHeader":"HybridOnPrem","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"CO2PR03MB2264","Cc":"Fabio Estevam <fabio.estevam@nxp.com>","Subject":"[Buildroot] [PATCH 1/2] imx: Introduce an SPL genimage template","X-BeenThere":"buildroot@busybox.net","X-Mailman-Version":"2.1.18-1","Precedence":"list","List-Id":"Discussion and development of buildroot <buildroot.busybox.net>","List-Unsubscribe":"<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>","List-Archive":"<http://lists.busybox.net/pipermail/buildroot/>","List-Post":"<mailto:buildroot@busybox.net>","List-Help":"<mailto:buildroot-request@busybox.net?subject=help>","List-Subscribe":"<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"buildroot-bounces@busybox.net","Sender":"\"buildroot\" <buildroot-bounces@busybox.net>"},"content":"Introduce a genimage template for booting SPL + u-boot.img U-Boot\nbinaries.\n\nSigned-off-by: Fabio Estevam <fabio.estevam@nxp.com>\n---\n .../freescale/common/imx/genimage.cfg.template_spl | 46 ++++++++++++++++++++++\n board/freescale/common/imx/post-image.sh           | 11 +++++-\n 2 files changed, 56 insertions(+), 1 deletion(-)\n create mode 100644 board/freescale/common/imx/genimage.cfg.template_spl","diff":"diff --git a/board/freescale/common/imx/genimage.cfg.template_spl b/board/freescale/common/imx/genimage.cfg.template_spl\nnew file mode 100644\nindex 0000000..b9e247d\n--- /dev/null\n+++ b/board/freescale/common/imx/genimage.cfg.template_spl\n@@ -0,0 +1,46 @@\n+# Minimal SD card image for the Freescale boards Template for SPL Boot\n+#\n+# We mimic the .sdcard Freescale's image format:\n+# * the SD card must have 1 kB free space at the beginning,\n+# * U-Boot is dumped as is,\n+# * a FAT partition at offset 8MB is containing zImage/uImage and DTB files\n+# * a single root filesystem partition is required (ext2, ext3 or ext4)\n+#\n+\n+image boot.vfat {\n+  vfat {\n+    files = {\n+      %FILES%\n+    }\n+  }\n+  size = 16M\n+}\n+\n+image sdcard.img {\n+  hdimage {\n+  }\n+\n+  partition spl {\n+    in-partition-table = \"no\"\n+    image = \"SPL\"\n+    offset = 1024\n+  }\n+\n+  partition u-boot-img {\n+    in-partition-table = \"no\"\n+    image = \"u-boot.img\"\n+    offset = 69K\n+  }\n+\n+  partition boot {\n+    partition-type = 0xC\n+    bootable = \"true\"\n+    image = \"boot.vfat\"\n+    offset = 8M\n+  }\n+\n+  partition rootfs {\n+    partition-type = 0x83\n+    image = \"rootfs.ext2\"\n+  }\n+}\ndiff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh\nindex 9e4da82..b239743 100755\n--- a/board/freescale/common/imx/post-image.sh\n+++ b/board/freescale/common/imx/post-image.sh\n@@ -28,6 +28,15 @@ linux_image()\n \tfi\n }\n \n+genimage_type()\n+{\n+\tif grep -Eq \"^BR2_TARGET_UBOOT_SPL=y$\" ${BR2_CONFIG}; then\n+\t\techo \"genimage.cfg.template_spl\"\n+\telse\n+\t\techo \"genimage.cfg.template\"\n+\tfi\n+}\n+\n main()\n {\n \tlocal FILES=\"$(dtb_list) $(linux_image)\"\n@@ -35,7 +44,7 @@ main()\n \tlocal GENIMAGE_TMP=\"${BUILD_DIR}/genimage.tmp\"\n \n \tsed -e \"s/%FILES%/${FILES}/\" \\\n-\t\tboard/freescale/common/imx/genimage.cfg.template > ${GENIMAGE_CFG}\n+\t\tboard/freescale/common/imx/$(genimage_type) > ${GENIMAGE_CFG}\n \n \trm -rf \"${GENIMAGE_TMP}\"\n \n","prefixes":["1/2"]}