]> git.sur5r.net Git - u-boot/commitdiff
scripts: Makefile.lib: Sanitize DTB names
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 5 Jul 2016 08:26:35 +0000 (10:26 +0200)
committerTom Rini <trini@konsulko.com>
Sat, 20 Aug 2016 15:34:59 +0000 (11:34 -0400)
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>
scripts/Makefile.lib

index e720562623c9332325f2768169d7bad0f8fc203a..45a0e1d486c0f50d8c8948b99257ca46046d6b53 100644 (file)
@@ -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';                              \
 ) > $@