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: 888651 X-Patchwork-Delegate: sjg@chromium.org 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=socionext.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="S4+YPu0v"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 405kV03BhFz9ryr for ; Wed, 21 Mar 2018 20:07:52 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 2E565C21E31; Wed, 21 Mar 2018 09:07:15 +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