From patchwork Wed Aug 7 21:12:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Auer X-Patchwork-Id: 1143699 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 463kn626wwz9sMr for ; Thu, 8 Aug 2019 07:15:38 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 0AF44C21E29; Wed, 7 Aug 2019 21:13:41 +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 2710EC21EE8; Wed, 7 Aug 2019 21:13:01 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B6A30C21DA2; Wed, 7 Aug 2019 21:12:58 +0000 (UTC) Received: from mail-edgeS23.fraunhofer.de (mail-edges23.fraunhofer.de [153.97.7.23]) by lists.denx.de (Postfix) with ESMTPS id 67F0FC21DA2 for ; Wed, 7 Aug 2019 21:12:58 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2FMAQB5Pktd/xoBYJlmHAEBAQQBAQcEAQGBUwcBAQsBgheBPwFbjDpghkuLaI8ygXsJAQEBAQEBAQEBCC8BAYQ/AoJTIzQJDgEEAQEFAQECAQoCAmmFJwyFTAYyAUYQUSEcGgYOBYMigWsDHAGtGogQDV+BSQkBgSoBhwqEWYFXP4RhghqCd4R0IgSOVpwWQAcCgTllXQSPS4NrDBuNRIpuhBuTBI5KgVA5gVgzGiSDO4Ysilw9ATIBjyABAQ X-IPAS-Result: A2FMAQB5Pktd/xoBYJlmHAEBAQQBAQcEAQGBUwcBAQsBgheBPwFbjDpghkuLaI8ygXsJAQEBAQEBAQEBCC8BAYQ/AoJTIzQJDgEEAQEFAQECAQoCAmmFJwyFTAYyAUYQUSEcGgYOBYMigWsDHAGtGogQDV+BSQkBgSoBhwqEWYFXP4RhghqCd4R0IgSOVpwWQAcCgTllXQSPS4NrDBuNRIpuhBuTBI5KgVA5gVgzGiSDO4Ysilw9ATIBjyABAQ X-IronPort-AV: E=Sophos;i="5.64,358,1559512800"; d="scan'208";a="12425731" Received: from mail-mtaka26.fraunhofer.de ([153.96.1.26]) by mail-edgeS23.fraunhofer.de with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Aug 2019 23:12:35 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BgAAAbPktdfRBhWMBmHAEBAQQBAQcEAQGBUwcBAQsBg1YgPIw6YJIzjzKBewkBAwEBAQEBCC8BAYQ/AoJ1NAkOAQQBAQQBAQMBChQBARY6hS4MhUsDAzIBRhBRIRwaBg4FgyKBawMdrRqIEA1fgUkJAYEqAYcKhjA/hGGCGoJ3hHQiBI5WnBZABwKBOWVdBI9Lg2sMG41Eim6EG5MEjkqBUDeBWTMaJIM7hiyKXD0DMAGPIAEB X-IronPort-AV: E=Sophos;i="5.64,358,1559512800"; d="scan'208";a="52930264" Received: from fgdemucivp01ltm.xch.fraunhofer.de (HELO FGDEMUCIMP11EXC.ads.fraunhofer.de) ([192.88.97.16]) by mail-mtaKA26.fraunhofer.de with ESMTP/TLS/AES256-SHA; 07 Aug 2019 23:12:35 +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, 7 Aug 2019 23:15:13 +0200 From: Lukas Auer To: Date: Wed, 7 Aug 2019 23:12:04 +0200 Message-ID: <20190807211213.21849-3-lukas.auer@aisec.fraunhofer.de> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190807211213.21849-1-lukas.auer@aisec.fraunhofer.de> References: <20190807211213.21849-1-lukas.auer@aisec.fraunhofer.de> MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-11.0.0.4179-8.200.1013-24824.005 X-TM-AS-Result: No--3.169400-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No Cc: Stefan Roese , Marek Vasut , Bartosz Golaszewski , Heinrich Schuchardt , Alistair Francis , Chris Packham Subject: [U-Boot] [PATCH v3 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 either CONFIG_OF_SEPARATE or CONFIG_OF_EMBED 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 v3: None Changes in v2: None Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8513db94e3..b2f857f890 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),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),dts/dt.dtb) \ + $(U_BOOT_ITS) FORCE $(call if_changed,mkfitimage) $(BOARD_SIZE_CHECK)