aboutsummaryrefslogtreecommitdiff
path: root/sys/tools/fdt/make_dtb.sh
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2021-01-15 14:28:46 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2021-01-15 19:08:39 +0000
commitefdf807990c3b58353286174e5e6bbd601a31c33 (patch)
treefd4531ff73585a6ff32eb87a651073092cf2335a /sys/tools/fdt/make_dtb.sh
parent955b980bdfb2be6949c3cf5235d8bad56a15bab9 (diff)
downloadsrc-efdf807990c3b58353286174e5e6bbd601a31c33.tar.gz
src-efdf807990c3b58353286174e5e6bbd601a31c33.zip
Switch to the new device-tree vendor tree
The old vendor tree was never fully merged and doing partial merge isn't supported with git subtree merge so a new one was created. Switch the build to use the new DTS from sys/contrib/device-tree This also bump the DTS used to be in sync with Linux 5.9 While here change the way to get the linux version, simply hardcode the value in sys/dts/freebsd-compatible.dts and use awk to get that to put it in the CFLAGS. As a bonus we now have the bindings docs available in sys/contrib/device-tree/Bindings/ so no need to link to the Linux repo or to the vendor tree.
Diffstat (limited to 'sys/tools/fdt/make_dtb.sh')
-rwxr-xr-xsys/tools/fdt/make_dtb.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/tools/fdt/make_dtb.sh b/sys/tools/fdt/make_dtb.sh
index 5c5968711661..09d0b3bd9f42 100755
--- a/sys/tools/fdt/make_dtb.sh
+++ b/sys/tools/fdt/make_dtb.sh
@@ -20,11 +20,9 @@ fi
: "${ECHO:=echo}"
: "${CPP:=cpp}"
-LINUX_DTS_VERSION=$(make -C $S/gnu/dts -V LINUX_DTS_VERSION)
-
for d in ${dts}; do
dtb="${dtb_path}/$(basename "$d" .dts).dtb"
${ECHO} "converting $d -> $dtb"
- ${CPP} -DLINUX_DTS_VERSION=\"${LINUX_DTS_VERSION}\" -P -x assembler-with-cpp -I "$S/gnu/dts/include" -I "$S/dts/${MACHINE}" -I "$S/gnu/dts/${MACHINE}" -I "$S/gnu/dts/" -include "$d" -include "$S/dts/freebsd-compatible.dts" /dev/null |
- ${DTC} -@ -O dtb -o "$dtb" -b 0 -p 1024 -i "$S/dts/${MACHINE}" -i "$S/gnu/dts/${MACHINE}" -i "$S/gnu/dts/"
+ ${CPP} -P -x assembler-with-cpp -I "$S/contrib/device-tree/include" -I "$S/dts/${MACHINE}" -I "$S/contrib/device-tree/src/${MACHINE}" -I "$S/contrib/device-tree/src/" -include "$d" -include "$S/dts/freebsd-compatible.dts" /dev/null |
+ ${DTC} -@ -O dtb -o "$dtb" -b 0 -p 1024 -i "$S/dts/${MACHINE}" -i "$S/contrib/device-tree/src/${MACHINE}" -i "$S/contrib/device-tree/src/"
done