summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xkbuild.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/kbuild.sh b/kbuild.sh
index c548718..3f20151 100755
--- a/kbuild.sh
+++ b/kbuild.sh
@@ -316,8 +316,15 @@ copy_dtbs() {
for dtb in ${dtbs[@]} ; do
local src=${dtb/:*/}
local dst=${dtb/*:/}
- dst=${dst/*\//}
+ # If a destination is explicitly specified, don't strip
+ # directory name. This can be used for instance to store .dtbo
+ # files in an overlays/ subdirectory.
+ if ! echo ${dtb} | grep -q ':' ; then
+ dst=$(basename $dst)
+ fi
+
+ mkdir -p $(dirname $dest_dir/$dst)
cp $output_dir/arch/${arch}/boot/dts/$src* $dest_dir/$dst
done
}