summaryrefslogtreecommitdiffstats
path: root/sys/tools
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-05-16 15:56:34 +0000
committerian <ian@FreeBSD.org>2014-05-16 15:56:34 +0000
commit6c4033c89f2630952f5b5e5fb6d1a0b35339f2fc (patch)
tree9b526206a1fd1a2fa5e6899088c3d5ed20bdb958 /sys/tools
parent0e330f2d7031b7b7ac99866fff8db9856635226c (diff)
downloadFreeBSD-src-6c4033c89f2630952f5b5e5fb6d1a0b35339f2fc.zip
FreeBSD-src-6c4033c89f2630952f5b5e5fb6d1a0b35339f2fc.tar.gz
MFC 262614, 262625, 262626, 262627, 262682, 262714, 262725, 262736
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. Only try to build the static dtb when we're building a static dtb. Use proper include path for dtc as well as cpp. Fix syntax errors (missing ; other minor glitches) in existing dts files.
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..900ad9b
--- /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/${MACHINE} -i $S/gnu/dts/${MACHINE}
OpenPOWER on IntegriCloud