diff options
author | Alex Richardson <arichardson@FreeBSD.org> | 2018-12-14 23:53:28 +0000 |
---|---|---|
committer | Alex Richardson <arichardson@FreeBSD.org> | 2018-12-14 23:53:28 +0000 |
commit | 0a65536cabcc7c0624dea86b95d6f9455d271bac (patch) | |
tree | 420a31f7e07c048f18f412b9583a7cf1a93b58e5 /sys/tools | |
parent | c9073141b4582138f79059b9fe187b2bbd36ff83 (diff) | |
download | src-0a65536cabcc7c0624dea86b95d6f9455d271bac.tar.gz src-0a65536cabcc7c0624dea86b95d6f9455d271bac.zip |
make_dtb.sh: Use $CPP instead of assuming that cpp is in $PATH
This fixes building in CheriBSD with a strict tmp path since we don't
bootstrap a cpp but pass the full path to clang-cpp instead.
While touching this file also fix all shellcheck warnings in make_dtb.sh.
Reviewed By: manu
Differential Revision: https://reviews.freebsd.org/D18376
Notes
Notes:
svn path=/head/; revision=342105
Diffstat (limited to 'sys/tools')
-rwxr-xr-x | sys/tools/fdt/make_dtb.sh | 11 | ||||
-rwxr-xr-x | sys/tools/fdt/make_dtbo.sh | 11 |
2 files changed, 12 insertions, 10 deletions
diff --git a/sys/tools/fdt/make_dtb.sh b/sys/tools/fdt/make_dtb.sh index a7f5a183c17c..b33dc39609cb 100755 --- a/sys/tools/fdt/make_dtb.sh +++ b/sys/tools/fdt/make_dtb.sh @@ -16,12 +16,13 @@ if [ -z "${MACHINE}" ]; then MACHINE=$(uname -m) fi -: ${DTC:=dtc} -: ${ECHO:=echo} +: "${DTC:=dtc}" +: "${ECHO:=echo}" +: "${CPP:=cpp}" for d in ${dts}; do - dtb=${dtb_path}/`basename $d .dts`.dtb + dtb="${dtb_path}/$(basename "$d" .dts).dtb" ${ECHO} "converting $d -> $dtb" - cpp -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 /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/gnu/dts/include" -I "$S/dts/${MACHINE}" -I "$S/gnu/dts/${MACHINE}" -I "$S/gnu/dts/" -include "$d" /dev/null | + ${DTC} -@ -O dtb -o "$dtb" -b 0 -p 1024 -i "$S/dts/${MACHINE}" -i "$S/gnu/dts/${MACHINE}" -i "$S/gnu/dts/" done diff --git a/sys/tools/fdt/make_dtbo.sh b/sys/tools/fdt/make_dtbo.sh index eb1ec1ed3180..edc5d7fd8d41 100755 --- a/sys/tools/fdt/make_dtbo.sh +++ b/sys/tools/fdt/make_dtbo.sh @@ -16,12 +16,13 @@ if [ -z "${MACHINE}" ]; then MACHINE=$(uname -m) fi -: ${DTC:=dtc} -: ${ECHO:=echo} +: "${DTC:=dtc}" +: "${ECHO:=echo}" +: "${CPP:=cpp}" for d in ${dtso}; do - dtb=${dtbo_path}/`basename $d .dtso`.dtbo + dtb="${dtbo_path}/$(basename "$d" .dtso).dtbo" ${ECHO} "converting $d -> $dtb" - cpp -P -x assembler-with-cpp -I $S/gnu/dts/include -I $S/dts/${MACHINE} -I $S/gnu/dts/${MACHINE} -include $d /dev/null | - ${DTC} -@ -O dtb -o $dtb -i $S/dts/${MACHINE} -i $S/gnu/dts/${MACHINE} + ${CPP} -P -x assembler-with-cpp -I "$S/gnu/dts/include" -I "$S/dts/${MACHINE}" -I "$S/gnu/dts/${MACHINE}" -include "$d" /dev/null | + ${DTC} -@ -O dtb -o "$dtb" -i "$S/dts/${MACHINE}" -i "$S/gnu/dts/${MACHINE}" done |