From patchwork Wed Jun 19 02:05:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 1118415 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="na7Ln/uJ"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45T7c74lSGz9s7h for ; Wed, 19 Jun 2019 12:06:47 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 4872BC21F8A; Wed, 19 Jun 2019 02:06:14 +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 DEBF9C21F3C; Wed, 19 Jun 2019 02:06:02 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9D904C21F3C; Wed, 19 Jun 2019 02:05:43 +0000 (UTC) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30068.outbound.protection.outlook.com [40.107.3.68]) by lists.denx.de (Postfix) with ESMTPS id 31AFCC22067 for ; Wed, 19 Jun 2019 02:05:40 +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=z8iYd+Z6v4sO6w8IfBlBsFgCX+R6PiNx78zSMlJ/su0=; b=na7Ln/uJOY/CllvjsubzLVMicRR4fxVAvJBqcqKUqygiihQhkHBAc3FOFiZTweI0M6cSGURhFcciIg+I3K5wiKQVsbI8D1zVjovJqp9zvIEmmPhh8ygSiBqzEmAgEQWkXHL5oBsgXxATZzMstzqr22W53tnTEqwOclmzATDXkRc= 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:39 +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:39 +0000 From: Peng Fan To: "sbabic@denx.de" Thread-Topic: [PATCH V2 4/5] imx: add container target Thread-Index: AQHVJkN97ONb5YkQcUmtHwd/yyCiVA== Date: Wed, 19 Jun 2019 02:05:39 +0000 Message-ID: <20190619021958.31790-5-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: d734fa6d-3f12-43d2-ed3d-08d6f45aa021 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:4125; 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)(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: jWfmrYMrNkdLytuAXwxLgBpm2pR6kPGktys9ocRHPJNhHGBJCNt+KE4ab17+lOe7XJxfF8s5pjvBAJNLYKEk8K49OxW7bxK8/TxhWR5BQCUPnJyt+MBCfVoFrqodiU1dsZJQcDl63OPL8bkOsq/tNoYZpFERRDj2uAehvOo2i/LGjeUME4DOC/ARNYcEndrv/EMjd5q4+wo5uZFP2jfg7/YAX0RuX+V55yFSoYYw0bUjsVk16/u4TWzzI/dX8K7bWzxnSYkfHG4M0msxC3ZzrH/bdj78L5CbXKpGlQor8gPPesOc5/7bG9ci9iklDNFeX5N7g/kDf1r0Ft88hB3V599HolPmHBXAMcFL+6x/mufvFWMK7zBZpjmYFG4DKKgzRmoDWc6/7DG310aEmlMwZj058HhrtdBhf3xDV4iPhn0= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d734fa6d-3f12-43d2-ed3d-08d6f45aa021 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jun 2019 02:05:39.2944 (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 4/5] imx: add container target 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" To support SPL loading container file, add a new Makefile target, and introduce a new Kconfig file to source the cfg file which will be parsed by mkimage. Signed-off-by: Peng Fan --- Makefile | 8 ++++++++ arch/arm/mach-imx/Makefile | 14 ++++++++++++-- arch/arm/mach-imx/imx8/Kconfig | 7 +++++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c55ffa265f..09b354bea9 100644 --- a/Makefile +++ b/Makefile @@ -1333,9 +1333,17 @@ SPL: spl/u-boot-spl.bin FORCE $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@ ifeq ($(CONFIG_ARCH_IMX8M)$(CONFIG_ARCH_IMX8), y) +ifeq ($(CONFIG_SPL_LOAD_IMX_CONTAINER), y) +u-boot.cnt: u-boot.bin FORCE + $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@ + +flash.bin: spl/u-boot-spl.bin u-boot.cnt FORCE + $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@ +else flash.bin: spl/u-boot-spl.bin u-boot.itb FORCE $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@ endif +endif u-boot-with-spl.imx u-boot-with-nand-spl.imx: SPL u-boot.bin FORCE $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@ diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 898478fc4a..6de81408f8 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -89,6 +89,11 @@ IMX_CONFIG = $(CONFIG_IMX_CONFIG:"%"=%) $(Q)mkdir -p $(dir $@) $(call if_changed_dep,cpp_cfg) +IMX_CONTAINER_CFG = $(CONFIG_IMX_CONTAINER_CFG:"%"=%) +container.cfg: $(IMX_CONTAINER_CFG) FORCE + $(Q)mkdir -p $(dir $@) + $(call if_changed_dep,cpp_cfg) + ifeq ($(CONFIG_ARCH_IMX8), y) CNTR_DEPFILES := $(srctree)/tools/imx_cntr_image.sh IMAGE_TYPE := imx8image @@ -157,10 +162,15 @@ SPL: MKIMAGEFLAGS_flash.bin = -n spl/u-boot-spl.cfgout -T $(IMAGE_TYPE) -e 0x100000 flash.bin: MKIMAGEOUTPUT = flash.log -flash.bin: spl/u-boot-spl.bin u-boot.itb FORCE -ifeq ($(SPL_DEPFILE_EXISTS),0) +MKIMAGEFLAGS_u-boot.cnt = -n container.cfg -T $(IMAGE_TYPE) -e 0x100000 +u-boot.cnt: MKIMAGEOUTPUT = u-boot.cnt.log + +ifeq ($(CONFIG_SPL_LOAD_IMX_CONTAINER), y) +u-boot.cnt: u-boot.bin container.cfg FORCE $(call if_changed,mkimage) endif +flash.bin: spl/u-boot-spl.bin FORCE + $(call if_changed,mkimage) endif else diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig index e9496cb611..d17760e333 100644 --- a/arch/arm/mach-imx/imx8/Kconfig +++ b/arch/arm/mach-imx/imx8/Kconfig @@ -29,6 +29,13 @@ config SPL_LOAD_IMX_CONTAINER help This is to let SPL could load i.MX8 Container image +config IMX_CONTAINER_CFG + string "i.MX Container config file" + depends on SPL + help + This is to specific the cfg file for generating container + image which will be loaded by SPL. + choice prompt "i.MX8 board select" optional