utils: update-kernel-headers: Support relative path to kernel git tree

When given a relative path to the kernel git tree,
update-kernel-headers.sh fails to execute the headers_install.sh script
from the kernel sources. Fix it by turning the kernel directory into an
absolute path.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
This commit is contained in:
Laurent Pinchart 2024-08-27 00:12:52 +03:00
parent 874b63d5cb
commit 67b87ccb87

View file

@ -9,7 +9,7 @@ if [ $# != 1 ] ; then
fi
header_dir="$(dirname "$(realpath "$0")")/../include/linux"
kernel_dir="$1"
kernel_dir="$(realpath "$1")"
# Bail out if the directory doesn't contain kernel sources
line=$(head -3 "${kernel_dir}/Kbuild" 2>/dev/null | tail -1)