aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-02-05 11:28:25 +0900
committerTom Rini <trini@ti.com>2014-02-19 11:10:05 -0500
commit6ab6b2afa091dbceb37719b8a81637a00834be19 (patch)
tree5e762778e4597cfccf74f280c2d191ac4641a422 /scripts
parentbabb4440cfe1b8806cf2a5a3c5836196e501665d (diff)
downloadu-boot-6ab6b2afa091dbceb37719b8a81637a00834be19.zip
u-boot-6ab6b2afa091dbceb37719b8a81637a00834be19.tar.gz
u-boot-6ab6b2afa091dbceb37719b8a81637a00834be19.tar.bz2
dts: re-write dts/Makefile more simply with Kbuild
Useful rules in scripts/Makefile.lib allows us to easily generate a device tree blob and wrap it in assembly code. We do not need to parse a linker script to get output format and arch. This commit deletes ./u-boot.dtb since it is a copy of dts/dt.dtb. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.lib12
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index d4b5cb5..ee3ceac 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -151,9 +151,10 @@ cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(UBOOTINCLUDE) \
ld_flags = $(LDFLAGS) $(ldflags-y)
+# Modified for U-Boot
dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \
- -I$(srctree)/arch/$(SRCARCH)/boot/dts \
- -I$(srctree)/arch/$(SRCARCH)/boot/dts/include \
+ -I$(srctree)/board/$(VENDOR)/dts/ \
+ -I$(srctree)/arch/$(ARCH)/dts \
-undef -D__DTS__
# Finds the multi-part object the current object will be linked into
@@ -247,25 +248,24 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \
# Generate an assembly file to wrap the output of the device tree compiler
quiet_cmd_dt_S_dtb= DTB $@
+# Modified for U-Boot
cmd_dt_S_dtb= \
( \
- echo '\#include <asm-generic/vmlinux.lds.h>'; \
echo '.section .dtb.init.rodata,"a"'; \
- echo '.balign STRUCT_ALIGNMENT'; \
echo '.global __dtb_$(*F)_begin'; \
echo '__dtb_$(*F)_begin:'; \
echo '.incbin "$<" '; \
echo '__dtb_$(*F)_end:'; \
echo '.global __dtb_$(*F)_end'; \
- echo '.balign STRUCT_ALIGNMENT'; \
) > $@
$(obj)/%.dtb.S: $(obj)/%.dtb
$(call cmd,dt_S_dtb)
quiet_cmd_dtc = DTC $@
+# Modified for U-Boot
cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
- $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \
+ dtc -O dtb -o $@ -b 0 \
-i $(dir $<) $(DTC_FLAGS) \
-d $(depfile).dtc.tmp $(dtc-tmp) ; \
cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)