Skip to content

Commit

Permalink
tools: Avoid building the kernel twice
Browse files Browse the repository at this point in the history
Two different kernel build targets (build,install) have both instructions to
build the kernel, hence it was executed twice. Install should only do
install and build should only do build.

Fixes: #6588

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
  • Loading branch information
zvonkok committed Apr 4, 2023
1 parent 5d89d08 commit fe86c08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tools/packaging/kernel/build-kernel.sh
Expand Up @@ -419,6 +419,8 @@ install_kata() {
local kernel_path=${1:-}
[ -n "${kernel_path}" ] || die "kernel_path not provided"
[ -d "${kernel_path}" ] || die "path to kernel does not exist, use ${script_name} setup"
[ -n "${arch_target}" ] || arch_target="$(uname -m)"
arch_target=$(arch_to_kernel "${arch_target}")
pushd "${kernel_path}" >>/dev/null
config_version=$(get_config_version)
[ -n "${config_version}" ] || die "failed to get config version"
Expand Down Expand Up @@ -593,7 +595,6 @@ main() {
build_kernel "${kernel_path}"
;;
install)
build_kernel "${kernel_path}"
install_kata "${kernel_path}"
;;
setup)
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/kernel/kata_config_version
@@ -1 +1 @@
102
103

0 comments on commit fe86c08

Please sign in to comment.