From patchwork Wed Aug 21 19:14:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Auer X-Patchwork-Id: 1151131 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 46DHTH2Z8Pz9s7T for ; Thu, 22 Aug 2019 05:16:35 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 10908C2200F; Wed, 21 Aug 2019 19:15:35 +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 BCC7DC2200F; Wed, 21 Aug 2019 19:15:09 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 04AA7C21E0B; Wed, 21 Aug 2019 19:15:06 +0000 (UTC) Received: from mail-edgeS23.fraunhofer.de (mail-edges23.fraunhofer.de [153.97.7.23]) by lists.denx.de (Postfix) with ESMTPS id B0FA1C21F29 for ; Wed, 21 Aug 2019 19:15:06 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2FDAAB4l11d/xoHYZlkHAEBAQQBAQcEAQGBUwcBAQsBgheBPyA8jDtghgKLbY81gXsJAQEBAQEBAQEBCC8BAYQ/AoJdIzQJDgIFAQEFAQEBAQEGBAICaYUnDIVMBjIBRhBRIRwaBg4FgyKBawMcAaxQiCANYYFJCQGBKgGHFIRZgVg/hGGCGoJ3hHQiBI5inDNABwKBOmVfBI9dg20MG41NinmEIJMYjlmBUDmBWDMaJIM7gnqDM4pcPQEyAY1FAQE X-IPAS-Result: A2FDAAB4l11d/xoHYZlkHAEBAQQBAQcEAQGBUwcBAQsBgheBPyA8jDtghgKLbY81gXsJAQEBAQEBAQEBCC8BAYQ/AoJdIzQJDgIFAQEFAQEBAQEGBAICaYUnDIVMBjIBRhBRIRwaBg4FgyKBawMcAaxQiCANYYFJCQGBKgGHFIRZgVg/hGGCGoJ3hHQiBI5inDNABwKBOmVfBI9dg20MG41NinmEIJMYjlmBUDmBWDMaJIM7gnqDM4pcPQEyAY1FAQE X-IronPort-AV: E=Sophos;i="5.64,412,1559512800"; d="scan'208";a="12659889" Received: from mail-mtas26.fraunhofer.de ([153.97.7.26]) by mail-edgeS23.fraunhofer.de with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Aug 2019 21:15:06 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A7AAB4l11dfRBhWMBkHAEBAQQBAQcEAQGBUwcBAQsBg1YgPIw7YJFvjzWBewkBAwEBAQEBCC8BAYQ/AoJ/NAkOAgUBAQQBAQECAQYEFAEBFjqFLgyFSwMDMgFGEFEhHBoGDgWDIoFrAx2sUIggDWGBSQkBgSoBhxSGMT+EYYIagneEdCIEjmKcM0AHAoE6ZV8Ej12DbQwbjU2KeYQgkxiOWYFQN4FZMxokgzuCeoMzilw9AzABjUUBAQ X-IronPort-AV: E=Sophos;i="5.64,412,1559512800"; d="scan'208";a="86123321" 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; 21 Aug 2019 21:15: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; Wed, 21 Aug 2019 21:15:05 +0200 From: Lukas Auer To: Date: Wed, 21 Aug 2019 21:14:41 +0200 Message-ID: <20190821191450.14507-3-lukas.auer@aisec.fraunhofer.de> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190821191450.14507-1-lukas.auer@aisec.fraunhofer.de> References: <20190821191450.14507-1-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] [RESEND 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 sandbox_spl is broken 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)