From patchwork Tue Oct 16 04:50:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 984562 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="mG1B49Kb"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42Z2wg5B92z9s9J for ; Tue, 16 Oct 2018 15:52:19 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 5C04DC21C50; Tue, 16 Oct 2018 04:52:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4F2A3C21DFD; Tue, 16 Oct 2018 04:50:58 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6969AC21DFF; Tue, 16 Oct 2018 04:50:56 +0000 (UTC) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10050.outbound.protection.outlook.com [40.107.1.50]) by lists.denx.de (Postfix) with ESMTPS id D1EA2C21DEC for ; Tue, 16 Oct 2018 04:50:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7w6jn8Jh8QcDTDyOYR9jeZdR6NfI+ajTPmOdxN+Q4j8=; b=mG1B49Kb+9AlF2nCjnY5qp6NVE7kQXjkJ1CB88UvbaSYRRU4omTsVsJ3w+BAdC7uPZoHLgfvrwuop9dDq2rnnJ4NSv9a9lqyeawIsYnXyOCqlyk0SjjJyb89BZKkAgPGgUDbhRPRVa35/n/ai8lTHcj847CSS7SWhqAzqXW55ro= Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (52.135.148.143) by AM0PR04MB4020.eurprd04.prod.outlook.com (52.134.90.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.23; Tue, 16 Oct 2018 04:50:39 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::b927:8a2e:c51d:bb82]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::b927:8a2e:c51d:bb82%5]) with mapi id 15.20.1228.027; Tue, 16 Oct 2018 04:50:39 +0000 From: Peng Fan To: "sbabic@denx.de" , Fabio Estevam , "agust@denx.de" Thread-Topic: [PATCH 3/3] imx: imx8qxp_mek: update to build image in U-Boot Thread-Index: AQHUZQvJ9qJiIdNvw0afL8TvobbzxQ== Date: Tue, 16 Oct 2018 04:50:39 +0000 Message-ID: <20181016045609.2237-3-peng.fan@nxp.com> References: <20181016045609.2237-1-peng.fan@nxp.com> In-Reply-To: <20181016045609.2237-1-peng.fan@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.14.1 x-clientproxiedby: HK0PR04CA0015.apcprd04.prod.outlook.com (2603:1096:203:36::27) To AM0PR04MB4481.eurprd04.prod.outlook.com (2603:10a6:208:73::15) authentication-results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [92.121.68.129] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM0PR04MB4020; 6:C60iK9CNUml3fIs01FBE/eUV1QHHmEjDowHcdaEgWda/493JkQwJW/N9RobEfJ7czUSVCwk8gXipx81LyE7SO2IEVOFA4nOEL8HbI69+83uNHh+oVdyBohDvEpKEC6NkTIl+M3G2JkBKuTol96dylp9l7jRzg5wvY2Y5AfmnkE7tpQkKnEDPeqCHUMV+0FwtQCX4rKHo+J+eV6rcyt08Swc1YTOym1pGTnsVxa9t7Ls2nhMGmFZz9+//NpFaCfgt+jPlOdln5/GutSCmJ7eUYKdLk69yJoGuqIPz3vvie4JuZTi1fKumrwGsVSEyX/oxAxOEAoetJc3WIf2YvEEfG/MguGyuNIM+w6M3k5jYcledhsa7AHH9mAMmYerznK2NPIN8/HIUD2rZ4tZcB3Ki7Ct2bBd0QltORLLK8hKd40aR+HHTmfgu+7cvIFsv6HxU6qtP5g5Mk3wVx1lplC1YZQ==; 5:VKdR1xMCeqE78LBmY6g2IbM+FnhowFRIdQdq+MsmTvyOWZnuqFEzllKsrb+6H8sDLYc6TWI85EKhXA17WPuS8BYFCDi1wpC5Nfu7OIw2SEJXv3VBp3ZaZmhqd677gke9GtNfnGKG6LX1XbfXFIUjmO5UqwM2l2gxUTYY6VVqIr4=; 7:d+nocTkFk0jfeMr6e+ofd4k5CMYAJ+l5pAs7U/vrApGvGV07TZZ9mctd3JjF/Fd/1TIh2Hpu/1HP0wtXMTcbGueQDjbkWcM0X5z7z0tZOl10poQ61oMtX/cD7j8Jp4BhiO/D7Q4IcrMYBJAwjL9r92ST3LueIjdVpaPgezx21KSTSteCo7XEg2bL8UT5btHFJqWLKgciJdY2uWZ93i0GyU4P3DoNEmyd2yypYgMG6VJY/0Nhucu88PaqOtoou+w1 x-ms-office365-filtering-correlation-id: e41ba568-deeb-4835-3d68-08d63322eb53 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR04MB4020; x-ms-traffictypediagnostic: AM0PR04MB4020: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(264314650089876)(185117386973197); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231355)(944501410)(52105095)(3002001)(6055026)(149066)(150057)(6041310)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(201708071742011)(7699051); SRVR:AM0PR04MB4020; BCL:0; PCL:0; RULEID:; SRVR:AM0PR04MB4020; x-forefront-prvs: 0827D7ACB9 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(366004)(39860400002)(396003)(346002)(376002)(199004)(189003)(53936002)(6306002)(76176011)(102836004)(966005)(106356001)(2616005)(476003)(11346002)(316002)(105586002)(486006)(99286004)(2906002)(66066001)(97736004)(6506007)(5250100002)(52116002)(446003)(1076002)(2501003)(386003)(3846002)(6116002)(44832011)(71190400001)(54906003)(36756003)(68736007)(81166006)(4326008)(2900100001)(50226002)(14444005)(256004)(86362001)(71200400001)(8676002)(81156014)(25786009)(14454004)(5660300001)(15650500001)(26005)(478600001)(186003)(6486002)(305945005)(110136005)(8936002)(6512007)(7736002)(6436002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB4020; H:AM0PR04MB4481.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: lYOCyk65GojFjqoitaJgMlFI/zhGG79yIl3I0yBOdtTZD5wBLnuunMLU2ZiK1z2sAWRjmHllg15t+jtZN8+YGBeqBbQMEzQLtyyHD/qrvlrWeudLwsPadCgySXLKoCx+6LNFkldFlet9i8g/9GU2aE1WwxeHIVz5wml1sGv70QnBDqwH9kYil18muslJQIpDDowGa3mQyHGbLNPTo/uGGazlTAqE5lYjrbwvtA4zgAFr0Ii0zX1rffHMmTsR3RiBif+5s4N70/C9u5FAyk9JVmbSr272XUaVUqmxDbYIF22gLfDE0b0gWaBgQu0KM7WeZX1BFVIqcIGbI2Aj4ksfnUHijS6zT/bRbffOQTnw5r4= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e41ba568-deeb-4835-3d68-08d63322eb53 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Oct 2018 04:50:39.4583 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4020 Cc: "u-boot@lists.denx.de" Subject: [U-Boot] [PATCH 3/3] imx: imx8qxp_mek: update to build image in U-Boot X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Update README Add imximage.cfg Update defconfig to include imximage.cfg Signed-off-by: Peng Fan --- board/freescale/imx8qxp_mek/README | 41 ++++++++++---------------------- board/freescale/imx8qxp_mek/imximage.cfg | 25 +++++++++++++++++++ configs/imx8qxp_mek_defconfig | 1 + 3 files changed, 38 insertions(+), 29 deletions(-) create mode 100644 board/freescale/imx8qxp_mek/imximage.cfg diff --git a/board/freescale/imx8qxp_mek/README b/board/freescale/imx8qxp_mek/README index 7f740894b2..e91e193d11 100644 --- a/board/freescale/imx8qxp_mek/README +++ b/board/freescale/imx8qxp_mek/README @@ -3,20 +3,12 @@ U-Boot for the NXP i.MX8QXP EVK board Quick Start =========== -- Build U-Boot - Build the ARM Trusted firmware binary - Get scfw_tcm.bin and ahab-container.img -- Get mkimage tool -- Generate flash.bin using imx-mkimage +- Build U-Boot - Flash the binary into the SD card - Boot -Build U-Boot -============ - -$ make imx8qxp_mek_defconfig -$ make - Get and Build the ARM Trusted firmware ====================================== @@ -35,37 +27,28 @@ $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-7.6.bin $ chmod +x firmware-imx-7.6.bin $ ./firmware-imx-7.6.bin -Get imx-mkimage tool -============================== -Download the imx-mkimage tool: +Copy the following binaries to U-Boot folder: -$ git clone https://source.codeaurora.org/external/imx/imx-mkimage/ -$ cd imx-mkimage/ -$ git checkout origin/imx_4.9.88_imx8qxp_beta2 -b imx_4.9.88_imx8qxp_beta2 - - -Generate flash.bin using imx-mkimage -==================================== - -Copy the following binaries to imx-mkimage/iMX8M folder: +$ cp imx-atf/build/imx8qxp/release/bl31.bin . +$ cp u-boot/u-boot.bin . -$ cp imx-atf/build/imx8qxp/release/bl31.bin imx-mkimage/iMX8QX/ -$ cp u-boot/u-boot.bin imx-mkimage/iMX8QX/ +Copy the following firmwares U-Boot folder : -Copy the following firmwares to imx-mkimage/iMX8 folder : +$ cp firmware-imx-7.6/firmware/seco/ahab-container.img . +$ cp imx-sc-firmware-0.7/mx8qx-mek-scfw-tcm.bin . -$ cp firmware-imx-7.6/firmware/seco/ahab-container.img imx-mkimage/iMX8QX/ -$ cp imx-sc-firmware-0.7/mx8qx-mek-scfw-tcm.bin imx-mkimage/iMX8QX/scfw_tcm.bin +Build U-Boot +============ -$ cd imx-mkimage/ -$ make SOC=iMX8QX flash +$ make imx8qxp_mek_defconfig +$ make Flash the binary into the SD card ================================= Burn the flash.bin binary to SD card offset 32KB: -$ sudo dd if=iMX8QX/flash.bin of=/dev/sd[x] bs=1024 seek=32 +$ sudo dd if=u-boot-dtb.imx of=/dev/sd[x] bs=1024 seek=32 Boot ==== diff --git a/board/freescale/imx8qxp_mek/imximage.cfg b/board/freescale/imx8qxp_mek/imximage.cfg new file mode 100644 index 0000000000..9d39f25bf6 --- /dev/null +++ b/board/freescale/imx8qxp_mek/imximage.cfg @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2018 NXP + * + * Refer doc/README.imx8image for more details about how-to configure + * and create imx8image boot image + */ + +#define __ASSEMBLY__ +#include + +/* Boot from SD, sector size 0x400 */ +BOOT_FROM SD 0x400 +/* SoC type IMX8QX */ +SOC_TYPE IMX8QX +/* Append seco container image */ +APPEND ahab-container.img +/* Create the 2nd container */ +CONTAINER +/* Add scfw image with exec attribute */ +IMAGE SCU mx8qx-mek-scfw-tcm.bin +/* Add ATF image with exec attribute */ +IMAGE A35 bl31.bin 0x80000000 +/* Add U-Boot image with load attribute */ +DATA A35 u-boot-dtb.bin 0x80020000 diff --git a/configs/imx8qxp_mek_defconfig b/configs/imx8qxp_mek_defconfig index 873f30c9c5..5bb578073b 100644 --- a/configs/imx8qxp_mek_defconfig +++ b/configs/imx8qxp_mek_defconfig @@ -1,6 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_IMX8=y CONFIG_SYS_TEXT_BASE=0x80020000 +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/imx8qxp_mek/imximage.cfg" CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_IMX8QXP_MEK=y CONFIG_NR_DRAM_BANKS=3