aboutsummaryrefslogtreecommitdiff
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2014-04-30 18:02:04 +0000
committerWarner Losh <imp@FreeBSD.org>2014-04-30 18:02:04 +0000
commit0edb7351698260475fa44fc68ff13777d142a806 (patch)
treeb99dcaa7476d82c5822f2afec6f978c6ce9e1987 /Makefile.inc1
parent82ce0085382942aad3a782dedb1e8dc210b4ded5 (diff)
downloadsrc-0edb7351698260475fa44fc68ff13777d142a806.tar.gz
src-0edb7351698260475fa44fc68ff13777d142a806.zip
Allow FDT_DTS_FILE to be a list, either in the makedtb target, or in a
kernel config file. If you also want to have a static DTB compiled into your kernel, however, it cannot be a list. We have no mechanism in the kernel for picking one, so that doesn't make sense and will result in a compile-time error.
Notes
Notes: svn path=/head/; revision=265154
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc122
1 files changed, 5 insertions, 17 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 1b7d38da81d2..e31945f4a363 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -1830,24 +1830,12 @@ DTBOUTPUTPATH= ${.CURDIR}
# Build 'standalone' Device Tree Blob
#
builddtb:
- @if [ "${FDT_DTS_FILE}" = "" ]; then \
- echo "ERROR: FDT_DTS_FILE must be specified!"; \
- exit 1; \
- fi; \
- if [ ! -f ${.CURDIR}/sys/boot/fdt/dts/${TARGET}/${FDT_DTS_FILE} ]; then \
- echo "ERROR: Specified DTS file (${FDT_DTS_FILE}) does not \
- exist!"; \
- exit 1; \
- fi; \
- if [ "${DTBOUTPUTPATH}" = "${.CURDIR}" ]; then \
- echo "WARNING: DTB will be placed in the current working \
- directory"; \
- fi
- @PATH=${TMPPATH} \
- MACHINE=${TARGET} \
+.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}/`basename ${FDT_DTS_FILE} .dts`
+ "${FDT_DTS_FILE}" ${DTBOUTPUTPATH}
###############