summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2014-04-30 20:47:40 +0000
committerimp <imp@FreeBSD.org>2014-04-30 20:47:40 +0000
commitb633b6ce4db35420618c1a580e0b6ad7734c40cc (patch)
treea6e7ccbd7191984ef9a6b224b85e8fe43060768b
parent68cfd23112c8e1855743ad4ad8f5be1c397522b4 (diff)
downloadFreeBSD-src-b633b6ce4db35420618c1a580e0b6ad7734c40cc.zip
FreeBSD-src-b633b6ce4db35420618c1a580e0b6ad7734c40cc.tar.gz
Turns out this .if evaluated not in the context of the makedtb target
sometimes due to Makefile expansion rules. Make the test for things being NULL elsewhere...
-rw-r--r--Makefile.inc13
-rwxr-xr-xsys/tools/fdt/make_dtb.sh5
2 files changed, 5 insertions, 3 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index e31945f..8bf192d 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -1830,9 +1830,6 @@ DTBOUTPUTPATH= ${.CURDIR}
# Build 'standalone' Device Tree Blob
#
builddtb:
-.if !defined(FDT_DTS_FILE)
-.error "FDT_DTS_FILE must be specified!"
-.endif
@PATH=${TMPPATH} MACHINE=${TARGET} \
${.CURDIR}/sys/tools/fdt/make_dtb.sh ${.CURDIR}/sys \
"${FDT_DTS_FILE}" ${DTBOUTPUTPATH}
diff --git a/sys/tools/fdt/make_dtb.sh b/sys/tools/fdt/make_dtb.sh
index 278b7bb..272c19b 100755
--- a/sys/tools/fdt/make_dtb.sh
+++ b/sys/tools/fdt/make_dtb.sh
@@ -7,6 +7,11 @@ S=$1
dts="$2"
dtb_path=$3
+if [ -n "$dts" ]; then
+ echo "No DTS specified"
+ exit 1
+fi
+
for d in ${dts}; do
dtb=${dtb_path}/`basename $d .dts`.dtb
echo "converting $d -> $dtb"
OpenPOWER on IntegriCloud