summaryrefslogtreecommitdiffstats
path: root/sys/tools
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2014-02-28 18:29:09 +0000
committerimp <imp@FreeBSD.org>2014-02-28 18:29:09 +0000
commit7c37cf4f64a8b60173836f7982a52d237f80331d (patch)
treea108ed945633a610d53d8813406306de44eca8c0 /sys/tools
parent65a6006c96564a609fd04df91eb0f897570e8040 (diff)
downloadFreeBSD-src-7c37cf4f64a8b60173836f7982a52d237f80331d.zip
FreeBSD-src-7c37cf4f64a8b60173836f7982a52d237f80331d.tar.gz
Integrate device-tree upstream files into the build process:
(1) Invoke cpp to bring in files via #include (although the old /include/ stuff is supported still). (2) bring in files from either vendor tree or freebsd-custom files when building. (3) move all dts* files from sys/boot/fdt/dts to sys/boot/fdt/dts/${MACHINE} as appropriate. (4) encode all the magic to do the build in sys/tools/fdt/make_dtb.sh so that the different places in the tree use the exact same logic. (5) switch back to gpl dtc by default. the bsdl one in the tree has significant issues not easily addressed by those unfamiliar with the code.
Diffstat (limited to 'sys/tools')
-rwxr-xr-xsys/tools/fdt/make_dtb.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/tools/fdt/make_dtb.sh b/sys/tools/fdt/make_dtb.sh
new file mode 100755
index 0000000..8e4892e
--- /dev/null
+++ b/sys/tools/fdt/make_dtb.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+# Script generates dtb file ($3) from dts source ($2) in build tree S ($1)
+S=$1
+dts=$2
+dtb=$3
+
+cpp -x assembler-with-cpp -I $S/gnu/dts/include -I $S/boot/fdt/dts/${MACHINE} -I $S/gnu/dts/${MACHINE} -include $dts /dev/null |
+ dtc -O dtb -o $dtb -b 0 -p 1024 -i $S/boot/fdt/dts -i $S/gnu/dts/${MACHINE}
OpenPOWER on IntegriCloud