diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-09-20 02:31:43 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-09-20 02:37:13 +0300 |
commit | 43764c01cd8ed103fa6e15a61030e8005757f2d2 (patch) | |
tree | 8e7f16538e8ad63a70626a2e6d157cea191f584e /kbuild.sh | |
parent | 1b9133e66ab3a75e5b81ca6746a5fb9d608b800a (diff) |
kbuild: Allow adding out-of-tree DTBs to image
It's useful to build a FIT image with DTBs stored outside of the kernel
tree, for instance to test vendor-supplied DTBs. Support this by
allowing DTB paths to be absolute. Compilation of the DTB is skipped in
that case.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'kbuild.sh')
-rwxr-xr-x | kbuild.sh | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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 |