summaryrefslogtreecommitdiff
path: root/scripts/Makefile.lib
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2016-07-05 10:26:35 +0200
committerTom Rini <trini@konsulko.com>2016-08-20 11:34:59 -0400
commit716f90852650406d616be69c01a4f10b49742006 (patch)
treecc7a727f3e1ddf432a2320bde2cbfd30bcd17447 /scripts/Makefile.lib
parentf0ed68e21f219c1bee52b73183660e5e88b06e0f (diff)
scripts: Makefile.lib: Sanitize DTB names
Having dashes as a separator in the DTB name is a quite common practice. However, the current code to generate objects from DTBs assumes the separator is an underscore, leading to a compilation error when building a device tree with dashes. Replace all the dashes in the DTB name to generate the symbols name, which should solve this issue. Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r--scripts/Makefile.lib8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index e720562623..45a0e1d486 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -275,11 +275,11 @@ cmd_dt_S_dtb= \
( \
echo '.section .dtb.init.rodata,"a"'; \
echo '.balign 16'; \
- echo '.global __dtb_$(*F)_begin'; \
- echo '__dtb_$(*F)_begin:'; \
+ echo '.global __dtb_$(subst -,_,$(*F))_begin'; \
+ echo '__dtb_$(subst -,_,$(*F))_begin:'; \
echo '.incbin "$<" '; \
- echo '__dtb_$(*F)_end:'; \
- echo '.global __dtb_$(*F)_end'; \
+ echo '__dtb_$(subst -,_,$(*F))_end:'; \
+ echo '.global __dtb_$(subst -,_,$(*F))_end'; \
echo '.balign 16'; \
) > $@