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 DTB files during kernel bu...



details:   https://anonhg.NetBSD.org/src/rev/7628eff829c5
branches:  trunk
changeset: 824718:7628eff829c5
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Thu Jun 15 21:41:01 2017 +0000

description:
Add support for building DTB files during kernel build, from christos.

diffstat:

 sys/conf/Makefile.kern.inc |  21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diffs (35 lines):

diff -r 36b3e5fc3f6b -r 7628eff829c5 sys/conf/Makefile.kern.inc
--- a/sys/conf/Makefile.kern.inc        Thu Jun 15 20:22:44 2017 +0000
+++ b/sys/conf/Makefile.kern.inc        Thu Jun 15 21:41:01 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.kern.inc,v 1.256 2017/01/11 12:19:43 joerg Exp $
+#      $NetBSD: Makefile.kern.inc,v 1.257 2017/06/15 21:41:01 jmcneill Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -534,6 +534,25 @@
        @${KCOMPILE.s} -pg
 .endif # ___USE_SUFFIX_RULES___
 
+# Begin DTS handling
+
+DTSINC?=$S/external/gpl2/dts/dist/include
+DTSPATH?=$S/external/gpl2/dts/dist/arch/${MACHINE_CPU}/boot/dts
+DTSPADDING?=1024
+
+.SUFFIXES: .dtb .dts
+.dts.dtb:
+       ${CPP} -P -xassembler-with-cpp -I ${DTSINC} -I ${DTSPATH} \
+           -include ${.IMPSRC} /dev/null | \
+       ${TOOL_DTC} -i ${DTSINC} -i ${DTSPATH} -I dts -O dtb \
+           -p ${DTSPADDING} -b 0 -o ${.TARGET}
+
+.PATH.dts: ${DTSPATH}
+
+all: ${DTS:.dts=.dtb}
+
+# End DTS handling
+
 ##
 ## the end
 ##



Home | Main Index | Thread Index | Old Index