summaryrefslogtreecommitdiff
path: root/kbuild.sh
diff options
context:
space:
mode:
Diffstat (limited to 'kbuild.sh')
-rwxr-xr-xkbuild.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/kbuild.sh b/kbuild.sh
index 3f20151..d526aad 100755
--- a/kbuild.sh
+++ b/kbuild.sh
@@ -251,6 +251,11 @@ kernel_dtbs=
if [[ ${do_build[dt]} == 1 ]] ; then
for dtb in ${dtbs[@]} ; do
dtb=${dtb/:*/}
+
+ if [[ "${dtb}" == /* ]] ; then
+ continue
+ fi
+
kernel_dtbs="$kernel_dtbs $dtb"
done
fi
@@ -324,6 +329,12 @@ copy_dtbs() {
dst=$(basename $dst)
fi
+ # The destination should never be an absolute path.
+ if [[ "${dst}" == /* ]] ; then
+ echo "Error: DTB destination ${dtb} can't be absolute path"
+ exit 1
+ fi
+
mkdir -p $(dirname $dest_dir/$dst)
cp $output_dir/arch/${arch}/boot/dts/$src* $dest_dir/$dst
done