dtc: compile fdtget
We need fdtget in subsequent patches, so compile it. Unfortunately this is not straight forward. fdtget needs libfdt, but the Kernel Build System is not prepared for compiling libraries for the host or binaries from files in multiple directories. This patch moves the libfdt files to the dtc toplevel directory and compiles fdtget as a binary from multiple source files but from the same directory. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
fb60ba388b
commit
0a1167029d
|
@ -2,3 +2,4 @@ dtc
|
|||
dtc-lexer.lex.c
|
||||
dtc-parser.tab.c
|
||||
dtc-parser.tab.h
|
||||
fdtget
|
||||
|
|
|
@ -1,15 +1,20 @@
|
|||
# scripts/dtc makefile
|
||||
|
||||
hostprogs-y := dtc
|
||||
hostprogs-y := 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
|
||||
|
||||
libfdt-objs = fdt.o fdt_ro.o fdt_strerror.o fdt_wip.o
|
||||
libfdt-objs += fdt_empty_tree.o fdt_rw.o fdt_sw.o
|
||||
|
||||
fdtget-objs += fdtget.o $(libfdt-objs) util.o
|
||||
|
||||
# Source files need to get at the userspace version of libfdt_env.h to compile
|
||||
|
||||
HOSTCFLAGS_DTC := -I$(src) -I$(src)/libfdt
|
||||
HOSTCFLAGS_DTC := -I$(src)
|
||||
|
||||
HOSTCFLAGS_checks.o := $(HOSTCFLAGS_DTC)
|
||||
HOSTCFLAGS_data.o := $(HOSTCFLAGS_DTC)
|
||||
|
@ -21,6 +26,15 @@ HOSTCFLAGS_srcpos.o := $(HOSTCFLAGS_DTC)
|
|||
HOSTCFLAGS_treesource.o := $(HOSTCFLAGS_DTC)
|
||||
HOSTCFLAGS_util.o := $(HOSTCFLAGS_DTC)
|
||||
|
||||
HOSTCFLAGS_fdt.o := $(HOSTCFLAGS_DTC)
|
||||
HOSTCFLAGS_fdt_ro.o := $(HOSTCFLAGS_DTC)
|
||||
HOSTCFLAGS_fdt_strerror.o := $(HOSTCFLAGS_DTC)
|
||||
HOSTCFLAGS_fdt_wip.o := $(HOSTCFLAGS_DTC)
|
||||
HOSTCFLAGS_fdt_empty_tree.o := $(HOSTCFLAGS_DTC)
|
||||
HOSTCFLAGS_fdt_rw.o := $(HOSTCFLAGS_DTC)
|
||||
HOSTCFLAGS_fdt_sw.o := $(HOSTCFLAGS_DTC)
|
||||
HOSTCFLAGS_fdtget.o := $(HOSTCFLAGS_DTC)
|
||||
|
||||
HOSTCFLAGS_dtc-lexer.lex.o := $(HOSTCFLAGS_DTC)
|
||||
HOSTCFLAGS_dtc-parser.tab.o := $(HOSTCFLAGS_DTC)
|
||||
|
||||
|
|
Loading…
Reference in New Issue