summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbsp/update-targets.sh5
-rwxr-xr-xscripts/fixup-dts8
2 files changed, 7 insertions, 6 deletions
diff --git a/bsp/update-targets.sh b/bsp/update-targets.sh
index 976a9c4..198cd5a 100755
--- a/bsp/update-targets.sh
+++ b/bsp/update-targets.sh
@@ -45,9 +45,10 @@ then
TARGET_LIST="$(ls -d coreip*) "
TARGET_LIST+="sifive-hifive1 sifive-hifive1-revb freedom-e310-arty sifive-hifive-unleashed "
else
- if [ ! -f "$DTSFILE" -a "$DTSFILE" != "*.dts" ]
+ file "$DTSFILE"
+ if [ ! -f "$DTSFILE" ]
then
- echo "[ERROR] $0: $DTSFILE must be a dts file" >&2
+ echo "[ERROR] $0: $DTSFILE must be a file" >&2
help "$0"
exit 1
fi
diff --git a/scripts/fixup-dts b/scripts/fixup-dts
index 7192aea..bb73115 100755
--- a/scripts/fixup-dts
+++ b/scripts/fixup-dts
@@ -38,10 +38,10 @@ if [ `grep -c 'riscv,pmp' ${dts}` -eq 0 ]; then
# Check for targets without PMP support
TARGET=`echo ${dts} | cut -d '/' -f 1`
- if [ $TARGET != "freedom-e310-arty" -a \
- $TARGET != "sifive-hifive1" -a \
- $TARGET != "coreip-e20-rtl" -a \
- $TARGET != "coreip-e20-arty" ]; then
+ if [ "$TARGET" != "freedom-e310-arty" -a \
+ "$TARGET" != "sifive-hifive1" -a \
+ "$TARGET" != "coreip-e20-rtl" -a \
+ "$TARGET" != "coreip-e20-arty" ]; then
${SED} -i '/riscv,isa/a riscv,pmpregions = <1>;' ${dts}