From patchwork Tue Aug 20 21:08:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Auer X-Patchwork-Id: 1150362 X-Patchwork-Delegate: uboot@andestech.com 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=none (p=none dis=none) header.from=aisec.fraunhofer.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46Ck1y71NRz9s7T for ; Wed, 21 Aug 2019 07:09:24 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 7CD05C21FB9; Tue, 20 Aug 2019 21:09: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=none 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 CE847C21EB1; Tue, 20 Aug 2019 21:09:10 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id CCEE4C21D83; Tue, 20 Aug 2019 21:09:08 +0000 (UTC) Received: from mail-edgeKA24.fraunhofer.de (mail-edgeka24.fraunhofer.de [153.96.1.24]) by lists.denx.de (Postfix) with ESMTPS id 39DD8C21D83 for ; Tue, 20 Aug 2019 21:09:08 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2F7AAB1YFxd/xoHYZllHAEBAQQBAQcEAQGBVAYBAQsBgheBP1yNG5IDjzWBewkBAQEBAQEBAQEILwEBhD8CglYjNQgOAgUBAQUBAgEBBgQCAmmFJwyFTAYyAUYQUSEcGgYOBYMigWsDHAGtWogQDV+BSQkBgSoBhw+EWYFYP4RhghqCd4R0IgSOYpwzQAcCgTplXwSPXYNtDBuNTYp5hCCTGI5ZgVIBNoFYMxokgzuGLYpcPQEyAY88AQE X-IPAS-Result: A2F7AAB1YFxd/xoHYZllHAEBAQQBAQcEAQGBVAYBAQsBgheBP1yNG5IDjzWBewkBAQEBAQEBAQEILwEBhD8CglYjNQgOAgUBAQUBAgEBBgQCAmmFJwyFTAYyAUYQUSEcGgYOBYMigWsDHAGtWogQDV+BSQkBgSoBhw+EWYFYP4RhghqCd4R0IgSOYpwzQAcCgTplXwSPXYNtDBuNTYp5hCCTGI5ZgVIBNoFYMxokgzuGLYpcPQEyAY88AQE X-IronPort-AV: E=Sophos;i="5.64,410,1559512800"; d="scan'208";a="16622684" Received: from mail-mtas26.fraunhofer.de ([153.97.7.26]) by mail-edgeKA24.fraunhofer.de with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Aug 2019 23:09:08 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DDAAD3YFxdfRBhWMBlHAEBAQQBAQcEAQGBVAYBAQsBg1ZcjRuSA481gXsJAQMBAQEBAQgvAQGEPwKCeDUIDgIFAQEEAQEBAgEGBBQBARY6hS4MhUsDAzIBRhBRIRwaBg4FgyKBawMdrVyIEA1fgUkJAYEqAYcPhjE/hGGCGoJ3hHQiBI5inDNABwKBOmVfBI9dg20MG41NinmEIJMYjlmBUgE0gVkzGiSDO4Ytilw9AzABjzwBAQ X-IronPort-AV: E=Sophos;i="5.64,410,1559512800"; d="scan'208";a="85988014" Received: from fgdemucivp01ltm.xch.fraunhofer.de (HELO FGDEMUCIMP11EXC.ads.fraunhofer.de) ([192.88.97.16]) by mail-mtaS26.fraunhofer.de with ESMTP/TLS/AES256-SHA; 20 Aug 2019 23:09:06 +0200 Received: from localhost.de (10.80.233.50) by FGDEMUCIMP11EXC.ads.fraunhofer.de (10.80.232.42) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 20 Aug 2019 23:11:47 +0200 From: Lukas Auer To: Date: Tue, 20 Aug 2019 23:08:27 +0200 Message-ID: <20190820210827.977-1-lukas.auer@aisec.fraunhofer.de> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190807211213.21849-3-lukas.auer@aisec.fraunhofer.de> References: <20190807211213.21849-3-lukas.auer@aisec.fraunhofer.de> MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-11.0.0.4179-8.200.1013-24858.003 X-TM-AS-Result: No--3.114900-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No Cc: Alistair Francis Subject: [U-Boot] [PATCH v4 02/11] Makefile: support building SPL FIT images without device trees 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" When building a U-Boot FIT image, the device trees specified by the board are unconditionally built for inclusion in the FIT image. However, not all device tree providers, such as CONFIG_OF_PRIOR_STAGE, require a device tree to be built and bundled with the U-Boot binary. They rely on other mechanisms to provide the device tree to U-Boot. Compilation on boards with these device tree providers fails, because they do not specify a device tree. Change the makefile rules to conditionally build the device trees if CONFIG_OF_SEPARATE, CONFIG_OF_EMBED, or CONFIG_OF_HOSTFILE is selected as device tree provider. Signed-off-by: Lukas Auer Reviewed-by: Bin Meng Tested-by: Bin Meng Reviewed-by: Anup Patel --- Changes in v4: - Also build the device tree if CONFIG_OF_HOSTFILE is selected, otherwise this breaks sandbox_spl Changes in v3: None Changes in v2: None Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3b0864ae8e..cf85e8c949 100644 --- a/Makefile +++ b/Makefile @@ -1257,7 +1257,9 @@ MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \ -R $(srctree)/$(CONFIG_SYS_FSL_PBL_PBI:"%"=%) -T pblimage u-boot-dtb.img u-boot.img u-boot.kwb u-boot.pbl u-boot-ivt.img: \ - $(if $(CONFIG_SPL_LOAD_FIT),u-boot-nodtb.bin dts/dt.dtb,u-boot.bin) FORCE + $(if $(CONFIG_SPL_LOAD_FIT),u-boot-nodtb.bin \ + $(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_OF_HOSTFILE),dts/dt.dtb) \ + ,u-boot.bin) FORCE $(call if_changed,mkimage) $(BOARD_SIZE_CHECK) @@ -1267,7 +1269,9 @@ else MKIMAGEFLAGS_u-boot.itb = -E endif -u-boot.itb: u-boot-nodtb.bin dts/dt.dtb $(U_BOOT_ITS) FORCE +u-boot.itb: u-boot-nodtb.bin \ + $(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_OF_HOSTFILE),dts/dt.dtb) \ + $(U_BOOT_ITS) FORCE $(call if_changed,mkfitimage) $(BOARD_SIZE_CHECK)