Date: Fri, 14 Dec 2018 23:53:28 +0000 (UTC) From: Alex Richardson <arichardson@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342105 - head/sys/tools/fdt Message-ID: <201812142353.wBENrSTr091966@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: arichardson Date: Fri Dec 14 23:53:28 2018 New Revision: 342105 URL: https://svnweb.freebsd.org/changeset/base/342105 Log: 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 Modified: head/sys/tools/fdt/make_dtb.sh head/sys/tools/fdt/make_dtbo.sh Modified: head/sys/tools/fdt/make_dtb.sh ============================================================================== --- head/sys/tools/fdt/make_dtb.sh Fri Dec 14 22:22:43 2018 (r342104) +++ head/sys/tools/fdt/make_dtb.sh Fri Dec 14 23:53:28 2018 (r342105) @@ -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 Modified: head/sys/tools/fdt/make_dtbo.sh ============================================================================== --- head/sys/tools/fdt/make_dtbo.sh Fri Dec 14 22:22:43 2018 (r342104) +++ head/sys/tools/fdt/make_dtbo.sh Fri Dec 14 23:53:28 2018 (r342105) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812142353.wBENrSTr091966>