From patchwork Mon Jul 22 02:12:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 1134648 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="WS7nthk+"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45sQnY08TTz9sBZ for ; Mon, 22 Jul 2019 12:40:16 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id B1602C21EBF; Mon, 22 Jul 2019 02:40:15 +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 C0CB8C220B8; Mon, 22 Jul 2019 02:36:19 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2DFC9C220B8; Mon, 22 Jul 2019 02:36:19 +0000 (UTC) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00081.outbound.protection.outlook.com [40.107.0.81]) by lists.denx.de (Postfix) with ESMTPS id 3B0F3C21E77 for ; Mon, 22 Jul 2019 02:12:54 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZHynm98kq56AJhqSAjYy3P3LcomjNxzZPgXsp9XUQnr6vv7INRxeLGFSiid+gfcFXYYz/75v+89xDnC7cioeMY/HvCrSAqqrRt/Xfdxr7X97+VrVh9VaEvStZXyC0HEc7pUSUMFQZRzepqBLB02K33VhhWEy9EYyM9Y8NojITi67yeYaMHyVa2M2fDkWWEQvrMT9KgO3azY+XxH3W9nPNe2ZzLg3CmuITfjwAx3dha7ZTD8FLM2xHFocTBe1uFcfJJUL5ikdTeqcL5P4troCOiaxNUZqOlKhRaZSxkmQ2LhdiIloW31DrCW68gU75htIXSUXQbz52Fror+cWe8JR2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0ztYemoMeA9uQ8ediV+3F+6OWoF0TPEwEQl5EPqPees=; b=Zaqu8U7AOVN5edsCuc+s2I6H40DW5EiObdMvPgBWcWTvpgWfdasCNziNB5gz4I8QGOqe1BhK7jrEv3ycrVC8QvGpR3a+rorH4clNTf0+o1JRi/4C5wGqpYqIHVGZlGVikeTgN+tRzLQV+kQV8HrBAnLdhD7D9EgfGYnsvDPO8MzkW2l4U+xeBDpw2jvgGSD0oPFqti9K3WUgcgw4K7U38k8uHuLGWHEHQxxBtJkMnsi5Hw5joZTeCPKpKGlGyPgRp5HnNbOd5MwapNEHli/P0sMyNH2UqNcHaLE0WvOt73j/Z38nR7ery7KNeNZlxKST25h80XFzG4c20tqVaJwnFQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com;arc=none 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=0ztYemoMeA9uQ8ediV+3F+6OWoF0TPEwEQl5EPqPees=; b=WS7nthk+sjxZ2lIE4QtnkJtwdld1QL13KWMy3GQQ+xNhXlWPpV6+c6ry/H+8UhGo5qCbk3h1ah44siMBiZosG3MnZNFzuF2H8LJS1sYlHyzr/Cd2Kd16rWL3euMuLCUbFKp4YZBODa8nHu+jxgHDLRRWy1X37MshYXEm/UeQQmI= Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (52.135.147.15) by AM0PR04MB5075.eurprd04.prod.outlook.com (20.176.214.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.16; Mon, 22 Jul 2019 02:12:52 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::2023:c0e5:8a63:2e47]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::2023:c0e5:8a63:2e47%5]) with mapi id 15.20.2094.011; Mon, 22 Jul 2019 02:12:52 +0000 From: Peng Fan To: "sbabic@denx.de" , "festevam@gmail.com" Thread-Topic: [PATCH V3 0/5] add i.MX8 container loading support Thread-Index: AQHVQDL3g+gAtepDkEKNKWdKj6xjKQ== Date: Mon, 22 Jul 2019 02:12:52 +0000 Message-ID: <20190722022808.19922-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: HK2PR02CA0129.apcprd02.prod.outlook.com (2603:1096:202:16::13) 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: aeb9387b-5a34-4357-74cf-08d70e4a19e2 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:AM0PR04MB5075; x-ms-traffictypediagnostic: AM0PR04MB5075: x-ms-exchange-purlcount: 5 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 01068D0A20 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(346002)(366004)(396003)(376002)(39860400002)(189003)(199004)(6306002)(66946007)(6512007)(66476007)(66556008)(64756008)(476003)(66446008)(2616005)(7736002)(305945005)(8676002)(54906003)(2906002)(110136005)(478600001)(966005)(68736007)(14444005)(44832011)(86362001)(71190400001)(71200400001)(102836004)(386003)(6506007)(256004)(26005)(99286004)(186003)(486006)(1076003)(4326008)(66066001)(36756003)(316002)(6486002)(25786009)(50226002)(8936002)(53936002)(81166006)(81156014)(52116002)(14454004)(5660300002)(6116002)(3846002)(2501003)(6436002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB5075; H:AM0PR04MB4481.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: NlPpM38zuPfElZ1xc9Wn2U83JeGrLhRi5Bh4N6dpCTb14c64zZHzrdq09p2pcr/zg/m9JpjF2bJg8yCJK68AiRkdXD7s1974jkpm+KcVPJCR25AcHFsvN7hWTgeWWNEimZwVDjtB/6dw3wz+SOQlb/Y59fNIdjfKClyvc5W1JLq882Xay+4ZqH5LG147LB/LpN1vebY02upLVEngEnDlba2W6UmdV18xP/sdJn2KpxcTeLeEzniR0oAgXqnyI7YQee3060MSNLZNXOzp9Uw3TOQM3qxyTKRXBTbsz2BaNGkrxpooEJwgm9ernp7SIjS+3GqwtHNLQ387M9Waqu1yQJ17xBZDH3xg1KNRaQX9uzkruMXof6+8ykhil/hWwowPcPfOEuJRxa0KjsKQXYfiG9/gBdEG/JbKU3wMWmbegt8= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: aeb9387b-5a34-4357-74cf-08d70e4a19e2 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jul 2019 02:12:52.4862 (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: AM0PR04MB5075 Cc: "u-boot@lists.denx.de" , dl-uboot-imx Subject: [U-Boot] [PATCH V3 0/5] add i.MX8 container loading support 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" V3: Drops patch 1/5 from V2, add 8QM support, nothing else changed. Stefano, This patchset was pending in patchwork for more that one month, please consider to apply. V2: Drop cleanup Makefile since V1, that patch is not correct. Rebased on master The V2 version: https://patchwork.ozlabs.org/cover/1118413/ The V1 version: https://patchwork.ozlabs.org/cover/1096334/ This patchset is to support i.MX8 container loading from SPL, i.MX8 AHAB secure boot not support FIT image, so we need to use container image. Currently still use a fixed offset for the 2nd container(u-boot.cnt), future patches will drop this fixed offset and use dynamaic offset according to the size of 1st container for spl. Only MMC is supported now, future patches will also support SPI/NOR/NAND following similar style as mmc part, if the mmc part is ok. Based on the comments in https://patchwork.ozlabs.org/patch/1096336/ So I think we have agreed the approach, the only comments that not addressed from Lukasz is add doc for the container format. The detailed format could be found in RM https://www.nxp.com/docs/en/reference-manual/IMX8DQXPRM.pdf Chapter 5.9.4 High Level Container Format CI: https://travis-ci.org/MrVan/u-boot/builds/547161366 Peng Fan (5): imx8: support parsing i.MX8 Container file spl: mmc: support loading i.MX container format file imx: add container target imx8qxp_mek: switch to use container image imx8qm_mek: switch to use container image Makefile | 8 ++ arch/arm/include/asm/arch-imx8/image.h | 56 +++++++++++ arch/arm/mach-imx/Makefile | 14 ++- arch/arm/mach-imx/imx8/Kconfig | 13 +++ arch/arm/mach-imx/imx8/Makefile | 4 + arch/arm/mach-imx/imx8/parse-container.c | 120 ++++++++++++++++++++++++ board/freescale/imx8qm_mek/README | 4 +- board/freescale/imx8qm_mek/uboot-container.cfg | 13 +++ board/freescale/imx8qxp_mek/README | 4 +- board/freescale/imx8qxp_mek/uboot-container.cfg | 13 +++ common/spl/spl_mmc.c | 10 ++ configs/imx8qm_mek_defconfig | 8 +- configs/imx8qxp_mek_defconfig | 5 +- include/spl.h | 12 +++ 14 files changed, 270 insertions(+), 14 deletions(-) create mode 100644 arch/arm/include/asm/arch-imx8/image.h create mode 100644 arch/arm/mach-imx/imx8/parse-container.c create mode 100644 board/freescale/imx8qm_mek/uboot-container.cfg create mode 100644 board/freescale/imx8qxp_mek/uboot-container.cfg