mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-25 15:02:45 +00:00
tools: fix build kernel shell error
Build kernel shell setup with -f, don't find patches directory path, because patches_path is none, so fix this error. Fixes: #1768 Signed-off-by: zyt312074545 <zyt312074545@hotmail.com>
This commit is contained in:
parent
fb30c58847
commit
ee7de8abcc
@ -31,7 +31,7 @@ readonly kernel_config_repo="github.com/${project_name}/kata-containers/tools/pa
|
||||
readonly patches_repo="github.com/${project_name}/kata-containers/tools/packaging"
|
||||
readonly patches_repo_dir="${GOPATH}/src/${patches_repo}"
|
||||
# Default path to search patches to apply to kernel
|
||||
readonly default_patches_dir="${script_dir}/patches/"
|
||||
readonly default_patches_dir="${script_dir}/patches"
|
||||
# Default path to search config for kata
|
||||
readonly default_kernel_config_dir="${script_dir}/configs"
|
||||
# Default path to search for kernel config fragments
|
||||
@ -322,12 +322,12 @@ setup_kernel() {
|
||||
fi
|
||||
|
||||
[ -n "$kernel_path" ] || die "failed to find kernel source path"
|
||||
|
||||
get_config_and_patches
|
||||
|
||||
[ -d "${patches_path}" ] || die " patches path '${patches_path}' does not exist"
|
||||
fi
|
||||
|
||||
get_config_and_patches
|
||||
|
||||
[ -d "${patches_path}" ] || die " patches path '${patches_path}' does not exist"
|
||||
|
||||
local major_kernel
|
||||
major_kernel=$(get_major_kernel_version "${kernel_version}")
|
||||
local patches_dir_for_version="${patches_path}/${major_kernel}.x"
|
||||
|
Loading…
Reference in New Issue
Block a user