Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/conf Add support for building overlay DT blobs specified...
details: https://anonhg.NetBSD.org/src/rev/99867309ce1a
branches: trunk
changeset: 446757:99867309ce1a
user: thorpej <thorpej%NetBSD.org@localhost>
date: Mon Dec 17 04:37:15 2018 +0000
description:
Add support for building overlay DT blobs specified in the kernel
config file like so:
makeoptions DTS_OVERLAYDIR="${THISARM}/conf"
makeoptions DTS_OVERLAYS="
my-cool-overlay.dts
"
The result is my-cool-overlay.dtbo in the kernel compile directory.
diffstat:
sys/conf/dts.mk | 31 +++++++++++++++++++++++++------
1 files changed, 25 insertions(+), 6 deletions(-)
diffs (60 lines):
diff -r efbfb4431999 -r 99867309ce1a sys/conf/dts.mk
--- a/sys/conf/dts.mk Mon Dec 17 04:21:44 2018 +0000
+++ b/sys/conf/dts.mk Mon Dec 17 04:37:15 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: dts.mk,v 1.9 2018/05/25 19:48:12 jakllsch Exp $
+# $NetBSD: dts.mk,v 1.10 2018/12/17 04:37:15 thorpej Exp $
DTSARCH?=${MACHINE_CPU}
DTSGNUARCH?=${DTSARCH}
@@ -25,9 +25,9 @@
.endfor
.endfor
-DTSPATH=${DTSINC} ${DTSDIR} dts
+DTSPATH=${DTSINC} ${DTSDIR} ${DTS_OVERLAYDIR} dts
-.SUFFIXES: .dtd .dtb .dts
+.SUFFIXES: .dtd .dtdo .dtb .dtbo .dts
.dts.dtd:
(${CPP} -P -xassembler-with-cpp ${DTSPATH:@v@-I ${v}@} \
@@ -41,6 +41,17 @@
${TOOL_SED} -e 's@null.o@${.TARGET:.dtd=.dtb}@' \
-e 's@/dev/null@@') > ${.TARGET}
+.dts.dtdo:
+ (${CPP} -P -xassembler-with-cpp ${DTSPATH:@v@-I ${v}@} \
+ -include ${.IMPSRC} /dev/null | \
+ ${TOOL_DTC} ${DTSPATH:@v@-i ${v}@} -I dts -O dtb \
+ -@ -o /dev/null -d /dev/stdout | \
+ ${TOOL_SED} -e 's@/dev/null@${.TARGET:.dtdo=.dtbo}@' \
+ -e 's@<stdin>@${.IMPSRC}@' && \
+ ${CPP} -P -xassembler-with-cpp ${DTSPATH:@v@-I ${v}@} \
+ -include ${.IMPSRC} -M /dev/null | \
+ ${TOOL_SED} -e 's@null.o@${.TARGET:.dtdo=.dtbo}@' \
+ -e 's@/dev/null@@') > ${.TARGET}
.dts.dtb:
${CPP} -P -xassembler-with-cpp ${DTSPATH:@v@-I ${v}@} \
@@ -48,9 +59,17 @@
${TOOL_DTC} ${DTSPATH:@v@-i ${v}@} -I dts -O dtb \
-p ${DTSPADDING} -b 0 -@ -o ${.TARGET}
-.PATH.dts: ${DTSDIR}
+.dts.dtbo:
+ ${CPP} -P -xassembler-with-cpp ${DTSPATH:@v@-I ${v}@} \
+ -include ${.IMPSRC} /dev/null | \
+ ${TOOL_DTC} ${DTSPATH:@v@-i ${v}@} -I dts -O dtb \
+ -@ -o ${.TARGET}
+
+.PATH.dts: ${DTSDIR} ${DTS_OVERLAYDIR}
DEPS+= ${DTS:.dts=.dtd}
-DTB= ${DTS:.dts=.dtb}
+DEPS+= ${DTS_OVERLAYS:.dts=.dtdo}
+DTB= ${DTS:.dts=.dtb}
+DTBO= ${DTS_OVERLAYS:.dts=.dtbo}
-all: ${DTB}
+all: ${DTB} ${DTBO}
Home |
Main Index |
Thread Index |
Old Index