Thread (1 message) 1 message, 1 author, 2020-02-06

Re: [RFC PATCH 1/4] scripts/dtc: update fdtget.c to upstream version v1.4.7-57-gf267e674d145

From: Łukasz Stelmach <l.stelmach@samsung.com>
Date: 2020-02-06 13:17:23

It was <2020-01-30 czw 08:16>, when Rob Herring wrote:
On Thu, Jan 30, 2020 at 6:42 AM Łukasz Stelmach [off-list ref] wrote:
quoted
Build and fdtget and add fdtget.c to the list of update source files.
Why does the kernel need fdtget and why not use the version from your
distro?
get_console_base.pl introduced in one of later patches uses fdtget. The
script is required to build bootImage. So fdtget is required to build
the kernel the same way dtc is.
quoted
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
---
 scripts/dtc/.gitignore           |   4 +
 scripts/dtc/Makefile             |   5 ++
 scripts/dtc/fdtget.c             | 125 ++++++++++++++++++-------------
 scripts/dtc/update-dtc-source.sh |   4 +-
Separate changes by updates to this script, running the script (to get
fdtget.c), and updates to kernel files.
OK.
quoted
 4 files changed, 82 insertions(+), 56 deletions(-)
diff --git scripts/dtc/.gitignore scripts/dtc/.gitignore
index 2e6e60d64ede..80f6b50fdf77 100644
--- scripts/dtc/.gitignore
+++ scripts/dtc/.gitignore
@@ -1 +1,5 @@
 dtc
+dtc-lexer.lex.c
+dtc-parser.tab.c
+dtc-parser.tab.h
These are needed regardless. Probably a treewide rule for *.lex.c,
*.tab.c, *.tab.h would be better.
Indeed, there are appropriate entris in the global .gitignore already.
quoted
+fdtget
diff --git scripts/dtc/Makefile scripts/dtc/Makefile
index b5a5b1c548c9..74322d8dac25 100644
--- scripts/dtc/Makefile
+++ scripts/dtc/Makefile
@@ -2,12 +2,15 @@
 # scripts/dtc makefile

 hostprogs-$(CONFIG_DTC) := dtc
+hostprogs-$(CONFIG_DTC) += fdtget
 always         := $(hostprogs-y)

 dtc-objs       := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \
                   srcpos.o checks.o util.o
 dtc-objs       += dtc-lexer.lex.o dtc-parser.tab.o

+fdtget-objs     := fdtget.o util.o
+
 # Source files need to get at the userspace version of libfdt_env.h to compile
 HOST_EXTRACFLAGS := -I $(srctree)/$(src)/libfdt
@@ -26,5 +29,7 @@ endif
 HOSTCFLAGS_dtc-lexer.lex.o := -I $(srctree)/$(src)
 HOSTCFLAGS_dtc-parser.tab.o := -I $(srctree)/$(src)

+HOSTLDLIBS_fdtget := -L$(obj)/libfdt -lfdt -Wl,-rpath='$$ORIGIN/libfdt'
+
We never build libfdt as a library, so how does this work unless it
pulls in the distro copy?
It is my mistake. I haven't included my scrpits/dtc/libfdt/Makefile in
the patch. I lost it when I was rebasing the patchset.

-- 
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help