From patchwork Wed Jun 19 02:05:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 1118418 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="ByTQ4Adw"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45T7dc2nmzz9s7h for ; Wed, 19 Jun 2019 12:08:04 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 12CB8C2205F; Wed, 19 Jun 2019 02:06:27 +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=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 7C5A3C2206D; Wed, 19 Jun 2019 02:06:04 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DEC60C2204B; Wed, 19 Jun 2019 02:05:47 +0000 (UTC) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60043.outbound.protection.outlook.com [40.107.6.43]) by lists.denx.de (Postfix) with ESMTPS id D97E0C2204A for ; Wed, 19 Jun 2019 02:05:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A0kuHp+zAhHE7Jt94Ceo9WvBSlknP+tngoRtRkUoGp4=; b=ByTQ4AdwZvZNAUBjb9yesVu/C8YqGOJ4huNhrCgmUkU3jALYT42NBoPlfFwThAb2Bw6jfzkXxXre80dnb7179MgmFFEsFzXXX5zb3sc4ArZLQgnSvr2DFpZOXHF9WSqU5dModcCgSOJVfDYcumnKLi5QaHiekFZp9yCq9uwaF+8= Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (52.135.147.15) by AM0PR04MB5682.eurprd04.prod.outlook.com (20.178.202.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1987.12; Wed, 19 Jun 2019 02:05:41 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::6090:1f0b:b85b:8015]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::6090:1f0b:b85b:8015%3]) with mapi id 15.20.1987.014; Wed, 19 Jun 2019 02:05:41 +0000 From: Peng Fan To: "sbabic@denx.de" Thread-Topic: [PATCH V2 5/5] imx8qxp_mek: switch to use container image Thread-Index: AQHVJkN/HxozDDj9f0Cf/osRLM1jfw== Date: Wed, 19 Jun 2019 02:05:41 +0000 Message-ID: <20190619021958.31790-6-peng.fan@nxp.com> References: <20190619021958.31790-1-peng.fan@nxp.com> In-Reply-To: <20190619021958.31790-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.16.4 x-clientproxiedby: HK0PR01CA0062.apcprd01.prod.exchangelabs.com (2603:1096:203:a6::26) To AM0PR04MB4481.eurprd04.prod.outlook.com (2603:10a6:208:70::15) authentication-results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.71] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 809e0de9-c3f3-4215-030b-08d6f45aa186 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM0PR04MB5682; x-ms-traffictypediagnostic: AM0PR04MB5682: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2512; x-forefront-prvs: 0073BFEF03 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(366004)(376002)(346002)(396003)(39860400002)(199004)(189003)(25786009)(36756003)(6512007)(6116002)(52116002)(81156014)(7736002)(4326008)(6436002)(8676002)(1730700003)(81166006)(476003)(2616005)(86362001)(44832011)(486006)(3846002)(14454004)(54906003)(66556008)(6506007)(66446008)(66476007)(386003)(64756008)(73956011)(478600001)(6916009)(66946007)(2351001)(305945005)(71190400001)(102836004)(14444005)(2501003)(316002)(446003)(8936002)(256004)(5640700003)(50226002)(6486002)(66066001)(2906002)(11346002)(71200400001)(53936002)(5660300002)(1076003)(99286004)(186003)(68736007)(26005)(76176011); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB5682; 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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: DYgeGpbja1Hcx/kzKvqB+BKIR4CvssZ2oagP0SJ8/n035LiCSB+xixCnlk/G7XuhIb533MW/nRbXtwWHaOxO2drzNieCRFYvC9tKn6tPiyxMn/BDDM2xyuRW4wSMT0g+UIcQjs6sTqGby5u8hCl5RDOdIzrFlEs7y7wdUCaxN0aETNKZXPg20rEPcWgFrvM3+guhpqLAW3gz9VrrtiXfZVDphSV6cMT+wrYzHRFchdpPTjr9MlR2o0/jzGXtTkL03OCwOTfcDOIlutzZTZ2yHl4n1rHu624aLIzow0fSD82G3syWyO8SG/9nJ6fihPgIkwNIwSC2Pr6/do5bGIrirNSdBX7kVoPukmGTg9Val5QWdDaRESLEsYoSYAODmigLHlMS8Rh0fNvnVMIQZpMtnK9HaiAEHmmjRfD1EOwhcm0= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 809e0de9-c3f3-4215-030b-08d6f45aa186 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jun 2019 02:05:41.7140 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: peng.fan@nxp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5682 Cc: "u-boot@lists.denx.de" , dl-uboot-imx Subject: [U-Boot] [PATCH V2 5/5] imx8qxp_mek: switch to use container image 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" Because FIT could not be used for AHAB secure boot on i.MX8, so switch to use container image that could let SPL verify ATF and U-Boot with AHAB. Note: The AHAB related code has not been added. Signed-off-by: Peng Fan --- board/freescale/imx8qxp_mek/README | 4 +--- board/freescale/imx8qxp_mek/uboot-container.cfg | 13 +++++++++++++ configs/imx8qxp_mek_defconfig | 5 ++--- 3 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 board/freescale/imx8qxp_mek/uboot-container.cfg diff --git a/board/freescale/imx8qxp_mek/README b/board/freescale/imx8qxp_mek/README index f32290e3a2..6dc151b166 100644 --- a/board/freescale/imx8qxp_mek/README +++ b/board/freescale/imx8qxp_mek/README @@ -39,11 +39,9 @@ $ cp imx-sc-firmware-0.7/mx8qx-mek-scfw-tcm.bin . Build U-Boot ============ -$ export ATF_LOAD_ADDR=0x80000000 -$ export BL33_LOAD_ADDR=0x80020000 $ make imx8qxp_mek_defconfig $ make flash.bin -$ dd if=u-boot.itb of=flash.bin bs=512 seek=528 +$ dd if=u-boot.cnt of=flash.bin bs=512 seek=528 Flash the binary into the SD card ================================= diff --git a/board/freescale/imx8qxp_mek/uboot-container.cfg b/board/freescale/imx8qxp_mek/uboot-container.cfg new file mode 100644 index 0000000000..8165811818 --- /dev/null +++ b/board/freescale/imx8qxp_mek/uboot-container.cfg @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2019 NXP + */ + +#define __ASSEMBLY__ + +/* This file is to create a container image could be loaded by SPL */ +BOOT_FROM SD 0x400 +SOC_TYPE IMX8QX +CONTAINER +IMAGE A35 bl31.bin 0x80000000 +IMAGE A35 u-boot.bin CONFIG_SYS_TEXT_BASE diff --git a/configs/imx8qxp_mek_defconfig b/configs/imx8qxp_mek_defconfig index d735d34b8b..5d6c5f968f 100644 --- a/configs/imx8qxp_mek_defconfig +++ b/configs/imx8qxp_mek_defconfig @@ -7,15 +7,14 @@ CONFIG_SPL_GPIO_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_SYS_MALLOC_F_LEN=0x4000 +CONFIG_SPL_LOAD_IMX_CONTAINER=y +CONFIG_IMX_CONTAINER_CFG="board/freescale/imx8qxp_mek/uboot-container.cfg" CONFIG_TARGET_IMX8QXP_MEK=y CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_DRIVERS_MISC_SUPPORT=y CONFIG_NR_DRAM_BANKS=3 CONFIG_SPL=y -CONFIG_FIT=y -CONFIG_SPL_LOAD_FIT=y -CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh" CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/imx8qxp_mek/imximage.cfg" CONFIG_BOOTDELAY=3 CONFIG_LOG=y