From patchwork Wed Mar 21 09:03:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 132200 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1890525ljb; Wed, 21 Mar 2018 02:07:33 -0700 (PDT) X-Google-Smtp-Source: AG47ELuy1+H53t3C3C/cCdyA1bFJ+pQ2Xw/wmb5ySOdCFqL9ZqXxr2fwq0rmTHlTU2usdbkA8oGV X-Received: by 10.80.178.166 with SMTP id p35mr20181159edd.75.1521623253092; Wed, 21 Mar 2018 02:07:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521623253; cv=none; d=google.com; s=arc-20160816; b=ZPdAi0Wi2RHbYga70Frfi7GkbjUIFgxi2/olTeBu8vFxB5W7TnWGx5EElkTX4D+uoI bylBVepVAAOqb1YpmbH9lsQmikFekSJnVHNhrLyub2sL10Mqc5tBY2k35UHZFi7OILxi W8ePjmw2IMpp5n0UE14rXKL4sNFTZJ+3DNeBNf6bTwHQ9c0QyQSgeA5xZ1Vc9iu6NGco 6xs27lANkuZ2+TahBTkdLWLL1/6TJdPZIUNkJjqhaKVXB8nCqdykd27NETr+sMKoi+GQ xJob/03cv2uMU0bx7JGFnphXOFhKqNJpR2Sb81f8FwuQKKkokal4z0UJ+rgDaRXNCpKD Q7Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:dkim-filter:arc-authentication-results; bh=K70MBCGEh9V2cGv3SYEXtJ+hwaPUay6aKQgwUnGaekY=; b=NnABdW9etFGLfZOebwfcZrwQumWrUqFddjOATtcvQzxZ5r3x3Nf/0tN0pmLBkkdGqK v3uJ9UENM+ZiKGO8uN6Ek5o70++DNzaBIo6oMC7Ob+fJJXFeAk2L3dVyVIQ2QDKaKCI1 O/RC3SQVrkvdujjm51vfHwAI3KqN0Xa8DDbFazdh/tFXV+NtgNM0XU+0YCO3gdDrnyYY UjZthwIAUlejGoQJmGxSHc/ld3N3To0O/Nr/CX+PFbpz7kekc8BY5Ycyf7mCWs7LfOE2 ONfX5sILwXENdQJysyJpxybQ3ElXsq3rjnDfDznxBhrHCUHCSeAD1bvgZlbht5AXFG7/ xfEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=S4+YPu0v; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id i30si3012511edi.353.2018.03.21.02.07.32; Wed, 21 Mar 2018 02:07:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=S4+YPu0v; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 673CBC21DDC; Wed, 21 Mar 2018 09:07:16 +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=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 D2E8FC21C29; Wed, 21 Mar 2018 09:07:13 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6A579C21E2F; Wed, 21 Mar 2018 09:04:27 +0000 (UTC) Received: from conuserg-12.nifty.com (conuserg-12.nifty.com [210.131.2.79]) by lists.denx.de (Postfix) with ESMTPS id C2FEFC21E12 for ; Wed, 21 Mar 2018 09:04:26 +0000 (UTC) Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-12.nifty.com with ESMTP id w2L93irK027481; Wed, 21 Mar 2018 18:03:46 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com w2L93irK027481 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1521623026; bh=jUR3qJWO2un4qQ66MZUZXq9Bsos5dgmNceJ4VitF0O4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S4+YPu0v+BGCUbiJIwRpniI9KyqxFqzgrJsEX9mskHUMkGac0NWze1aEcvkaZTdzj sNxIMNrzrVAmJeEMOnJ1hnTgnB6bk5xOjYel1M4QX4xkfXXVenT3NPrTKEn3EPaV7X prrdmv+w4CJIxHXmTRqoBQTuPVE9umBKjHeiI6teyCncKTrXO9H1SPraBNZ0XOrmZk h6rRdQyIEsjDBm1N/ho5u9Uh8wP3yTG1uCbaNSsp09/+GwoE5sVlCFfPDzreQ8x21J wDtOwTJG0t/+mO2QO2tD5xjdyHqIY7HB5ZELAo/ql/mNY2dsc4p34Qx1Jq4WJBk/jg DmVmy5GHKq5ng== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Wed, 21 Mar 2018 18:03:36 +0900 Message-Id: <1521623017-29312-5-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521623017-29312-1-git-send-email-yamada.masahiro@socionext.com> References: <1521623017-29312-1-git-send-email-yamada.masahiro@socionext.com> Cc: Tom Rini Subject: [U-Boot] [PATCH 4/5] fdt_region: move fdt_region.c to common/ from lib/libfdt/ 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" My goal is to sync lib/libfdt/ with scripts/dtc/libfdt/, that is, make lib/libfdt/ contain only wrapper files. fdt_region.c was written only for U-Boot to implement the verified boot. So, this belongs to the same group as common/fdt_support.c, which is a collection of U-Boot own fdt helpers. Move lib/libfdt/fdt_region.c to common/fdt_region.c . This is necessary only when CONFIG_(SPL_)_FIT_SIGNATURE is enabled. Signed-off-by: Masahiro Yamada --- common/Makefile | 2 ++ {lib/libfdt => common}/fdt_region.c | 0 lib/libfdt/Makefile | 3 --- tools/Makefile | 5 +++-- 4 files changed, 5 insertions(+), 5 deletions(-) rename {lib/libfdt => common}/fdt_region.c (100%) diff --git a/common/Makefile b/common/Makefile index 7011dad..bf1713b 100644 --- a/common/Makefile +++ b/common/Makefile @@ -31,6 +31,7 @@ obj-$(CONFIG_CMD_BOOTI) += bootm.o bootm_os.o obj-$(CONFIG_CMD_BEDBUG) += bedbug.o obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o +obj-$(CONFIG_FIT_SIGNATURE) += fdt_region.o obj-$(CONFIG_MII) += miiphyutil.o obj-$(CONFIG_CMD_MII) += miiphyutil.o @@ -75,6 +76,7 @@ obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o obj-$(CONFIG_SPL_LOAD_FIT) += common_fit.o obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o +obj-$(CONFIG_SPL_FIT_SIGNATURE) += fdt_region.o ifdef CONFIG_SPL_USB_HOST_SUPPORT obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o obj-$(CONFIG_USB_STORAGE) += usb_storage.o diff --git a/lib/libfdt/fdt_region.c b/common/fdt_region.c similarity index 100% rename from lib/libfdt/fdt_region.c rename to common/fdt_region.c diff --git a/lib/libfdt/Makefile b/lib/libfdt/Makefile index edd8e64..dd30d52 100644 --- a/lib/libfdt/Makefile +++ b/lib/libfdt/Makefile @@ -21,7 +21,4 @@ obj-$(CONFIG_OF_LIBFDT_OVERLAY) += fdt_overlay.o # TODO: split out the local modifiction. obj-y += fdt_ro.o -# U-Boot own file -obj-y += fdt_region.o - ccflags-y := -I$(srctree)/scripts/dtc/libfdt diff --git a/tools/Makefile b/tools/Makefile index 55efb74..e7f701a 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -67,7 +67,7 @@ LIBFDT_SRCS_SYNCED := fdt.c fdt_wip.c fdt_sw.c fdt_rw.c \ fdt_strerror.c fdt_empty_tree.c fdt_addresses.c fdt_overlay.c # The following files are locally modified for U-Boot (unfotunately). # Use U-Boot own versions from lib/libfdt/. -LIBFDT_SRCS_UNSYNCED := fdt_ro.c fdt_region.c +LIBFDT_SRCS_UNSYNCED := fdt_ro.c LIBFDT_OBJS := $(addprefix libfdt/, $(patsubst %.c, %.o, $(LIBFDT_SRCS_SYNCED))) \ $(addprefix lib/libfdt/, $(patsubst %.c, %.o, $(LIBFDT_SRCS_UNSYNCED))) @@ -82,6 +82,7 @@ ROCKCHIP_OBS = lib/rc4.o rkcommon.o rkimage.o rksd.o rkspi.o dumpimage-mkimage-objs := aisimage.o \ atmelimage.o \ $(FIT_SIG_OBJS-y) \ + common/fdt_region.o \ common/bootm.o \ lib/crc32.o \ default_image.o \ @@ -192,7 +193,7 @@ hostprogs-$(CONFIG_STATIC_RELA) += relocate-rela hostprogs-$(CONFIG_RISCV) += prelink-riscv hostprogs-y += fdtgrep -fdtgrep-objs += $(LIBFDT_OBJS) fdtgrep.o +fdtgrep-objs += $(LIBFDT_OBJS) common/fdt_region.o fdtgrep.o hostprogs-$(CONFIG_MIPS) += mips-relocs