diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-05-24 10:41:00 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-06-05 06:32:55 +0300 |
commit | c6c65ee8614d51395242c0500b4419dfa35a4e33 (patch) | |
tree | 40cb5757e84325557036c092aac8c2b525da513d | |
parent | 86ec5341e421b3f6ac39c75da648b7a22e56f248 (diff) | |
download | opensbi-c6c65ee8614d51395242c0500b4419dfa35a4e33.tar.xz |
Makefile: Preprocess builtin DTS
In order to use GCC style defines and macros in DTS, we should
preporcess builtin DTS before converting it to DTB.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
-rw-r--r-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -227,7 +227,7 @@ MERGEFLAGS += -r MERGEFLAGS += -b elf$(PLATFORM_RISCV_XLEN)-littleriscv MERGEFLAGS += -m elf$(PLATFORM_RISCV_XLEN)lriscv -DTCFLAGS = -O dtb +DTSCPPFLAGS = $(CPPFLAGS) -nostdinc -nostdlib -fno-builtin -D__DTS__ -x assembler-with-cpp # Setup functions for compilation define dynamic_flags @@ -289,7 +289,7 @@ compile_objcopy = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \ $(OBJCOPY) -S -O binary $(2) $(1) compile_dts = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \ echo " DTC $(subst $(build_dir)/,,$(1))"; \ - $(DTC) $(DTCFLAGS) -o $(1) $(2) + $(CPP) $(DTSCPPFLAGS) $(2) | $(DTC) -O dtb -i `dirname $(2)` -o $(1) targets-y = $(build_dir)/lib/libsbi.a targets-y += $(build_dir)/lib/libsbiutils.a |