From patchwork Fri Sep 20 15:28:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Jacques Hiblot X-Patchwork-Id: 1165288 X-Patchwork-Delegate: trini@ti.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=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="ySpsnJ1l"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46Zd9g1NbPz9s00 for ; Sat, 21 Sep 2019 01:36:39 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id E6685C21E39; Fri, 20 Sep 2019 15:33:40 +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=KHOP_BIG_TO_CC, 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 F3A4EC21E34; Fri, 20 Sep 2019 15:33:38 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E8157C21E3A; Fri, 20 Sep 2019 15:29:08 +0000 (UTC) Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lists.denx.de (Postfix) with ESMTPS id D2D3EC21E36 for ; Fri, 20 Sep 2019 15:29:04 +0000 (UTC) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8KFSn1v012668; Fri, 20 Sep 2019 10:28:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568993329; bh=UfXIdMbomJ2KDTPU0BL9XcHd2CW55qYgbhkr92bevKw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ySpsnJ1lvx0X4Svn+bqLllI00Zg/eWLEJthvNfr46GC5LvdTJTN6wbWKwHovUfz+/ 0E86mzyfZ3tw7Xcq/Nrtv0gbB5qcnO6hZHhGctZfW0WdYJlJmLXelyx2wEuOmKhdOs UTr5ovablKK/cZfuLQLKFGvGOHe0lftEnBV4tt+4= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8KFSnMS065158; Fri, 20 Sep 2019 10:28:49 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 20 Sep 2019 10:28:49 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Fri, 20 Sep 2019 10:28:45 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8KFSmCN116717; Fri, 20 Sep 2019 10:28:49 -0500 From: Jean-Jacques Hiblot To: , , Date: Fri, 20 Sep 2019 17:28:18 +0200 Message-ID: <20190920152824.18958-11-jjhiblot@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190920152824.18958-1-jjhiblot@ti.com> References: <20190920152824.18958-1-jjhiblot@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: Maxime Ripard , Stefan Roese , u-boot@lists.denx.de, Hans de Goede , "NXP i.MX U-Boot Team" , Heinrich Schuchardt , Chris Packham , Marek Vasut Subject: [U-Boot] [PATCH v5 10/15] Makefile: Query the SPL Fit Generator for its dependencies 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 reduce the complexity of the Makefile, let the generator tell what its dependencies are. For this purpose use the "--deps" option. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Simon Glass --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None Makefile | 9 ++------- arch/arm/mach-imx/mkimage_fit_atf.sh | 5 +++++ arch/arm/mach-rockchip/make_fit_atf.py | 7 +++++++ board/sunxi/mksunxi_fit_atf.sh | 4 ++++ board/theobroma-systems/puma_rk3399/fit_spl_atf.sh | 6 ++++++ 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 8a28740b22..1fa63d2a6b 100644 --- a/Makefile +++ b/Makefile @@ -1235,13 +1235,8 @@ U_BOOT_ITS = $(src)/$(SPL_FIT_SOURCE) else ifneq ($(SPL_FIT_GENERATOR),) U_BOOT_ITS := u-boot.its -ifeq ($(CONFIG_SPL_FIT_GENERATOR),"arch/arm/mach-imx/mkimage_fit_atf.sh") -U_BOOT_ITS_DEPS += u-boot-nodtb.bin -endif -ifeq ($(CONFIG_SPL_FIT_GENERATOR),"arch/arm/mach-rockchip/make_fit_atf.py") -U_BOOT_ITS_DEPS += u-boot -endif -$(U_BOOT_ITS): $(U_BOOT_ITS_DEPS) FORCE +U_BOOT_ITS_DEPS += $(shell $(srctree)/$(SPL_FIT_GENERATOR) --deps $(BOARD)) +$(U_BOOT_ITS): u-boot-nodtb.bin $(U_BOOT_ITS_DEPS) FORCE $(srctree)/$(SPL_FIT_GENERATOR) \ $(patsubst %,arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) > $@ endif diff --git a/arch/arm/mach-imx/mkimage_fit_atf.sh b/arch/arm/mach-imx/mkimage_fit_atf.sh index 38c9858e84..4da7531954 100755 --- a/arch/arm/mach-imx/mkimage_fit_atf.sh +++ b/arch/arm/mach-imx/mkimage_fit_atf.sh @@ -11,6 +11,11 @@ [ -z "$ATF_LOAD_ADDR" ] && ATF_LOAD_ADDR="0x00910000" [ -z "$BL33_LOAD_ADDR" ] && BL33_LOAD_ADDR="0x40200000" + +if [ x"$1" = x"--deps" ]; then + exit 0 +fi + if [ ! -f $BL31 ]; then echo "ERROR: BL31 file $BL31 NOT found" >&2 exit 0 diff --git a/arch/arm/mach-rockchip/make_fit_atf.py b/arch/arm/mach-rockchip/make_fit_atf.py index b9a1988298..56fab4e330 100755 --- a/arch/arm/mach-rockchip/make_fit_atf.py +++ b/arch/arm/mach-rockchip/make_fit_atf.py @@ -163,6 +163,10 @@ def unpack_elf(filename): segments.append((index, e_entry, p_paddr, p_data)) return segments +def show_deps_and_exit(): + print("u-boot") + sys.exit(0) + def main(): uboot_elf = "./u-boot" fit_its = sys.stdout @@ -178,6 +182,9 @@ def main(): logging.warning(' BL31 file bl31.elf NOT found, resulting binary is non-functional') logging.warning(' Please read Building section in doc/README.rockchip') + if sys.argv[1] == "--deps": + show_deps_and_exit() + opts, args = getopt.getopt(sys.argv[1:], "o:u:b:h") for opt, val in opts: if opt == "-o": diff --git a/board/sunxi/mksunxi_fit_atf.sh b/board/sunxi/mksunxi_fit_atf.sh index 88ad719747..c0ce4394e2 100755 --- a/board/sunxi/mksunxi_fit_atf.sh +++ b/board/sunxi/mksunxi_fit_atf.sh @@ -5,6 +5,10 @@ # # usage: $0 [ [ [ [