build: fix -K not working with absolute paths

This commit is contained in:
Ciro Santilli
2018-04-29 19:33:50 +01:00
parent b1463c26a3
commit 8d30cf31ce

9
build
View File

@@ -57,7 +57,7 @@ BR2_TARGET_ROOTFS_INITRAMFS=n
j="$OPTARG"
;;
K)
linux_kernel_custom_config_file="$OPTARG"
linux_kernel_custom_config_file="$(common_abspath "${OPTARG}")"
;;
k)
extra_make_args="${extra_make_args} kernel_module-reconfigure \\
@@ -130,11 +130,10 @@ BR2_ROOTFS_POST_SCRIPT_ARGS=\"${post_script_args}\"
printf "BR2_PACKAGE_GEM5=y\n" >> "${config_file}"
fi
if [ -n "$linux_kernel_custom_config_file" ]; then
f="../${linux_kernel_custom_config_file}"
if [ -f "$f" ]; then
printf "BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE=\"${f}\"\n" >> "$config_file"
if [ -f "$linux_kernel_custom_config_file" ]; then
printf "BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE=\"${linux_kernel_custom_config_file}\"\n" >> "$config_file"
if "${linux_reconfigure}"; then
touch "$f"
touch "${linux_kernel_custom_config_file}"
fi
else
echo "error: -K: file does not exist: ${linux_kernel_custom_config_file}" 1>&2