diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-07-31 13:40:33 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-08-07 06:13:52 +0200 |
commit | 7b0d00c46566f1abe261c79efa63baa88ae55e47 (patch) | |
tree | 367ac4efe931f74123f13f7b6423c28e32dae3d4 /scripts/Makefile.lib | |
parent | 0a1167029dbfb21a6ea15ca6d2f5e6a749471126 (diff) | |
download | barebox-7b0d00c46566f1abe261c79efa63baa88ae55e47.tar.gz barebox-7b0d00c46566f1abe261c79efa63baa88ae55e47.tar.xz |
make: Use shell script to generate .dtb.S files
Using shell in make to generate an assembly file is not very
readable and extendable. Add an external shell script instead.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r-- | scripts/Makefile.lib | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 0a6302ba68..b546c42bd9 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -210,21 +210,9 @@ 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 $@ -cmd_dt_S_dtb= \ -( \ - echo '\#include <asm-generic/barebox.lds.h>'; \ - echo '.section .dtb.rodata.$(subst -,_,$(*F)),"a"'; \ - echo '.balign STRUCT_ALIGNMENT'; \ - echo '.global __dtb_$(subst -,_,$(*F))_start'; \ - echo '__dtb_$(subst -,_,$(*F))_start:'; \ - echo '.incbin "$<" '; \ - echo '__dtb_$(subst -,_,$(*F))_end:'; \ - echo '.global __dtb_$(subst -,_,$(*F))_end'; \ - echo '.balign STRUCT_ALIGNMENT'; \ -) > $@ - -$(obj)/%.dtb.S: $(obj)/%.dtb - $(call cmd,dt_S_dtb) +cmd_dt_S_dtb = $(srctree)/scripts/gen-dtb-s $(subst -,_,$(*F)) $< > $@ +$(obj)/%.dtb.S: $(obj)/%.dtb $(srctree)/scripts/gen-dtb-s FORCE + $(call if_changed,dt_S_dtb) quiet_cmd_dtc = DTC $@ cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ |