From a5587d67f9f8ac5971f073fdfbf4cb0e69fc2bd7 Mon Sep 17 00:00:00 2001 From: imp Date: Tue, 2 Jun 2015 21:24:47 +0000 Subject: MFC: Merge r276846: Add infrastructure to build dtb files from dts files. --- share/mk/Makefile | 1 + share/mk/bsd.dtb.mk | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 share/mk/bsd.dtb.mk (limited to 'share/mk') diff --git a/share/mk/Makefile b/share/mk/Makefile index 75b45e8..d0234d8 100644 --- a/share/mk/Makefile +++ b/share/mk/Makefile @@ -11,6 +11,7 @@ FILES= \ bsd.crunchgen.mk \ bsd.dep.mk \ bsd.doc.mk \ + bsd.dtb.mk \ bsd.endian.mk \ bsd.files.mk \ bsd.incs.mk \ diff --git a/share/mk/bsd.dtb.mk b/share/mk/bsd.dtb.mk new file mode 100644 index 0000000..24e6930 --- /dev/null +++ b/share/mk/bsd.dtb.mk @@ -0,0 +1,17 @@ +# $FreeBSD$ + +# Search for kernel source tree in standard places. +.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \ + ${.CURDIR}/../../../../.. /sys /usr/src/sys +.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk) +SYSDIR= ${_dir} +.endif +.endfor +.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \ + !exists(${SYSDIR}/conf/kmod.mk) +.error Unable to locate the kernel source tree. Set SYSDIR to override. +.endif + +.include "${SYSDIR}/conf/dtb.mk" + +.include -- cgit v1.1