From: Masahiro Yamada <masahiroy@kernel.org>
To: u-boot@lists.denx.de
Subject: [PATCH v2 2/3] fdt_region: move fdt_region.c to common/ from lib/libfdt/
Date: Thu, 16 Apr 2020 18:30:17 +0900 [thread overview]
Message-ID: <20200416093018.561400-3-masahiroy@kernel.org> (raw)
In-Reply-To: <20200416093018.561400-1-masahiroy@kernel.org>
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_TPL_)_FIT_SIGNATURE is enabled.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
I am resending this after two years since v1.
My previous attempt sank by this comment:
http://patchwork.ozlabs.org/project/uboot/patch/1521623017-29312-5-git-send-email-yamada.masahiro at socionext.com/#1881196
Two years have passed, but I still do not see this file
in upstream DTC.
Changes in v2:
- rebase
common/Makefile | 1 +
{lib/libfdt => common}/fdt_region.c | 0
lib/libfdt/Makefile | 3 ---
tools/Makefile | 12 ++++--------
4 files changed, 5 insertions(+), 11 deletions(-)
rename {lib/libfdt => common}/fdt_region.c (100%)
diff --git a/common/Makefile b/common/Makefile
index 702f2396cf..a3f3faf479 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -110,6 +110,7 @@ obj-y += image.o
obj-$(CONFIG_ANDROID_AB) += android_ab.o
obj-$(CONFIG_ANDROID_BOOT_IMAGE) += image-android.o image-android-dt.o
obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += image-fdt.o
+obj-$(CONFIG_$(SPL_TPL_)FIT_SIGNATURE) += fdt_region.o
obj-$(CONFIG_$(SPL_TPL_)FIT) += image-fit.o
obj-$(CONFIG_$(SPL_)MULTI_DTB_FIT) += boot_fit.o common_fit.o
obj-$(CONFIG_IMAGE_SIGN_INFO) += image-sig.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 878659f99e..1fe50ecbe5 100644
--- a/lib/libfdt/Makefile
+++ b/lib/libfdt/Makefile
@@ -15,8 +15,5 @@ obj-y += \
obj-$(CONFIG_OF_LIBFDT_OVERLAY) += fdt_overlay.o
-# U-Boot own file
-obj-y += fdt_region.o
-
ccflags-y := -I$(srctree)/scripts/dtc/libfdt \
-DFDT_ASSUME_MASK=$(CONFIG_$(SPL_TPL_)OF_LIBFDT_ASSUME_MASK)
diff --git a/tools/Makefile b/tools/Makefile
index bfdbb1339c..ee9077ca82 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -63,13 +63,8 @@ FIT_CIPHER_OBJS-$(CONFIG_FIT_CIPHER) := common/image-cipher.o
# The following files are synced with upstream DTC.
# Use synced versions from scripts/dtc/libfdt/.
-LIBFDT_SRCS_SYNCED := fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c \
- fdt_strerror.c fdt_empty_tree.c fdt_addresses.c fdt_overlay.c
-# Use U-Boot own versions from lib/libfdt/.
-LIBFDT_SRCS_UNSYNCED := fdt_region.c
-
-LIBFDT_OBJS := $(addprefix libfdt/, $(patsubst %.c, %.o, $(LIBFDT_SRCS_SYNCED))) \
- $(addprefix lib/libfdt/, $(patsubst %.c, %.o, $(LIBFDT_SRCS_UNSYNCED)))
+LIBFDT_OBJS := $(addprefix libfdt/, fdt.o fdt_ro.o fdt_wip.o fdt_sw.o fdt_rw.o \
+ fdt_strerror.o fdt_empty_tree.o fdt_addresses.o fdt_overlay.o)
RSA_OBJS-$(CONFIG_FIT_SIGNATURE) := $(addprefix lib/rsa/, \
rsa-sign.o rsa-verify.o rsa-checksum.o \
@@ -86,6 +81,7 @@ dumpimage-mkimage-objs := aisimage.o \
$(FIT_OBJS-y) \
$(FIT_SIG_OBJS-y) \
$(FIT_CIPHER_OBJS-y) \
+ common/fdt_region.o \
common/bootm.o \
lib/crc32.o \
default_image.o \
@@ -210,7 +206,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
ifneq ($(TOOLS_ONLY),y)
hostprogs-y += spl_size_limit
--
2.25.1
next prev parent reply other threads:[~2020-04-16 9:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-16 9:30 [PATCH v2 0/3] libfdt: make lib/libfdt/ contain only wrappers Masahiro Yamada
2020-04-16 9:30 ` [PATCH v2 1/3] libfdt: migrate fdt_ro.c to a wrapper of scripts/dtc/libfdt/fdt_ro.c Masahiro Yamada
2020-04-27 3:07 ` sjg at google.com
2020-04-16 9:30 ` Masahiro Yamada [this message]
2020-04-27 3:07 ` [PATCH v2 2/3] fdt_region: move fdt_region.c to common/ from lib/libfdt/ sjg at google.com
2020-04-16 9:30 ` [PATCH v2 3/3] libfdt: split fdt_region declarations out to <fdt_region.h> Masahiro Yamada
2020-04-27 3:07 ` sjg at google.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200416093018.561400-3-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox