@@ -209,10 +209,10 @@ p9z-fsi.dts: p9z-fsi.dts.m4 p9-fsi.dtsi
%.dtb: %.dts
$(DTC_V)$(DTC) -i$(dir $@) -I dts $< -O dtb > $@
-%.dt.h: %.dtb
+%.dt.h: %.dts
$(GEN_V)$(srcdir)/generate_dt_header.sh $< > $@
%.dtb.o: %.dtb
- $(AM_V_CC)$(CC) -c $(srcdir)/template.S -DSYMBOL_PREFIX=$(shell echo $@ | tr '.-' '_') -DFILENAME=\"$<\" -o $@
+ $(AM_V_CC)$(CC) -c $(srcdir)/template.S -DSYMBOL_PREFIX=$(shell basename $@ | tr '.-' '_') -DFILENAME=\"$<\" -o $@
MOSTLYCLEANFILES = *.dtb *.dts *.dt.h p9-fsi.dtsi
@@ -1,15 +1,14 @@
#!/bin/sh
if [ $# -ne 1 ] ; then
- echo "Usage: $0 <file.dtb>"
+ echo "Usage: $0 <file.dts>"
exit 1
fi
-SYMBOL=$(echo "$1" | tr '.-' '_')
+SYMBOL=$(basename "$1" | sed 's/dts/dtb/' | tr '.-' '_')
SYM_START="_binary_${SYMBOL}_o_start"
SYM_END="_biary_${SYMBOL}_o_end"
SYM_SIZE="_biary_${SYMBOL}_o_size"
-HEADER="$f.h"
cat - <<EOF
/* This file is auto-generated from generate_dt_header.sh */