From patchwork Tue May 7 12:52:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 1096337 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="HDEgOJYF"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44z0323PLNz9sB8 for ; Tue, 7 May 2019 22:55:58 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 0B17FC21EB9; Tue, 7 May 2019 12:54:12 +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 48289C21E3A; Tue, 7 May 2019 12:53:37 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 488F5C21E89; Tue, 7 May 2019 12:52:52 +0000 (UTC) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50044.outbound.protection.outlook.com [40.107.5.44]) by lists.denx.de (Postfix) with ESMTPS id F3D89C21DCA for ; Tue, 7 May 2019 12:52:47 +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=aouIVMMA4FldUAgq6WH9Y0Px2akpeb7WpV2XdZL0xkg=; b=HDEgOJYFKMrWo6T6zwfZTSB0sKJXVjtnnwpG/VmjDJDN9cs15qFYp3xtjh/cJ455rJyRelPNGstl8P+TEWklAotUFxbuA7gkv46nLvPRtm5Gh83HI61+DmlME+nN5c5Iu3V8/ghjRxpTLNNSeqhCOcBlt2BhRPt4OLZfjnafrgQ= Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (52.135.147.15) by AM0PR04MB6627.eurprd04.prod.outlook.com (20.179.255.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1856.11; Tue, 7 May 2019 12:52:47 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::3173:24:d401:2378]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::3173:24:d401:2378%6]) with mapi id 15.20.1856.012; Tue, 7 May 2019 12:52:46 +0000 From: Peng Fan To: "sbabic@denx.de" , "festevam@gmail.com" Thread-Topic: [PATCH 5/6] imx: add container target Thread-Index: AQHVBNPFZN4LOd5yaU+q2VIRYvgDWg== Date: Tue, 7 May 2019 12:52:46 +0000 Message-ID: <20190507130554.4598-6-peng.fan@nxp.com> References: <20190507130554.4598-1-peng.fan@nxp.com> In-Reply-To: <20190507130554.4598-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: HK0P153CA0047.APCP153.PROD.OUTLOOK.COM (2603:1096:203:17::35) 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: 2ec7ba22-a741-43d0-f0d5-08d6d2eae763 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:AM0PR04MB6627; x-ms-traffictypediagnostic: AM0PR04MB6627: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4125; x-forefront-prvs: 0030839EEE x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(136003)(376002)(366004)(396003)(346002)(189003)(199004)(6486002)(486006)(64756008)(66476007)(54906003)(110136005)(2501003)(73956011)(99286004)(1076003)(14454004)(256004)(71190400001)(71200400001)(478600001)(7736002)(66066001)(8676002)(2906002)(186003)(36756003)(81166006)(86362001)(11346002)(2616005)(446003)(6116002)(66446008)(3846002)(8936002)(305945005)(44832011)(50226002)(66946007)(53936002)(476003)(66556008)(68736007)(6436002)(316002)(52116002)(6506007)(386003)(76176011)(6512007)(5660300002)(26005)(81156014)(102836004)(4326008)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB6627; 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: T5VAPMNOcED8sSA5EPuB3d2PmheZ+tibrz1zQLwKnD1JdUpmlMy5CoxaA3A40glXyk5R/2uRNfk1YEOcfe/L8YmvNpbYHsEBZPFnijSgI30F3/vdznJneTBSmqsjHOLROegFgtn2K9CjqVg4xfTONj6ufZ2NHevW4mSucy3Aq6YqiWHh7z/lznxj4FiQfvDUTkl+W6lWML8VKsa0a2v1gqZFDWiALJQiYNC8w9+SiWoAQaAVb8XcU7Gmk1Q41wTSO1EFBOP8bC/jf5v6uQR/ihTM3CWfenUkO61BL1s/HrmLfoTmEq6KoMz/Lkut4dW8AXNSgy8A0qjenKB95RevdoThIFb9rb0DctG0uivmQ7V7ISTvH9QgmXNqQm0izH63qd0PrpHZrqdi2XzAxV8z8pKOLqRRoN5piKUQ6oIPY9U= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2ec7ba22-a741-43d0-f0d5-08d6d2eae763 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2019 12:52:46.8558 (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-Transport-CrossTenantHeadersStamped: AM0PR04MB6627 Cc: "u-boot@lists.denx.de" , dl-uboot-imx Subject: [U-Boot] [PATCH 5/6] 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, 29 insertions(+) diff --git a/Makefile b/Makefile index d6a6ef19ab..2912cebaf6 100644 --- a/Makefile +++ b/Makefile @@ -1300,9 +1300,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 0562640599..494eee8e5a 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -104,6 +104,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) + DEPFILE_EXISTS := 0 ifeq ($(CONFIG_ARCH_IMX8), y) CNTR_DEPFILES := $(srctree)/tools/imx_cntr_image.sh @@ -161,7 +166,16 @@ SPL: spl/u-boot-spl.bin spl/u-boot-spl.cfgout FORCE MKIMAGEFLAGS_flash.bin = -n spl/u-boot-spl.cfgout -T $(IMAGE_TYPE) -e 0x100000 flash.bin: MKIMAGEOUTPUT = flash.log +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) +flash.bin: spl/u-boot-spl.bin u-boot.cnt FORCE +else flash.bin: spl/u-boot-spl.bin u-boot.itb FORCE +endif $(eval SPL_DEPFILE_EXISTS := $(shell $(CPP) $(cpp_flags) -x c -o spl/u-boot-spl.cfgout $(srctree)/$(IMX_CONFIG); if [ -f spl/u-boot-spl.cfgout ]; then $(CNTR_DEPFILES) spl/u-boot-spl.cfgout; echo $$?; fi)) ifeq ($(SPL_DEPFILE_EXISTS),0) $(call if_changed,mkimage) diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig index 8e6b79eb77..8128ec16b4 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