aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOskar Holmlund <oh@FreeBSD.org>2025-12-11 17:19:44 +0000
committerOskar Holmlund <oh@FreeBSD.org>2025-12-11 17:19:44 +0000
commit95d8576d8cc725ce2536d85335523c350b0bf69c (patch)
treee69963e0240fbb5852a3517d4cea6116638b3236
parentf825427c0ae975025e831542782d4078b063a82e (diff)
make_dtb.sh: add include path
The device tree include file for TI TPS65* is in a relative path to the source for example: device-tree/src/arm/ti/omap/am335x-bone-common.dtsi#n305 device-tree/src/arm/rockchip/rk3066a-marsboard.dts#n183 This patch gets the dts path and adds that as an include path for the device tree compiler. Approved by: manu (mentor) Differential revision: https://reviews.freebsd.org/D53887
-rwxr-xr-xsys/tools/fdt/make_dtb.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/tools/fdt/make_dtb.sh b/sys/tools/fdt/make_dtb.sh
index 8cefb6c5704b..dbd4504d75d4 100755
--- a/sys/tools/fdt/make_dtb.sh
+++ b/sys/tools/fdt/make_dtb.sh
@@ -21,6 +21,7 @@ fi
for d in ${dts}; do
dtb="${dtb_path}/$(basename "$d" .dts).dtb"
+ dts_path=`dirname $d`
${CPP} -P -x assembler-with-cpp -I "$S/dts/include" -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/"
+ ${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/" -i "$dts_path"
done