From 8a6533501f1e8af840d63c23282a5102bcdcb063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Fri, 25 Nov 2022 13:47:13 +0100 Subject: [PATCH 1/2] build: export kernel_version to be used with its build script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that we're caching the kernel, we're relying on the kernel version being exported. This is already done for the CC kernel, but not for the TEE specific ones. Fixes: #5770 Signed-off-by: Fabiano FidĂȘncio --- tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh b/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh index 3b4f19f4f..811efb3a4 100755 --- a/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh +++ b/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh @@ -195,6 +195,7 @@ install_cc_tee_kernel() { [[ "${tee}" != "tdx" && "${tee}" != "sev" ]] && die "Non supported TEE" info "build initramfs for tee kernel" + export kernel_version=${kernel_version} "${initramfs_builder}" kernel_url="$(yq r $versions_yaml assets.kernel.${tee}.url)" DESTDIR="${destdir}" PREFIX="${cc_prefix}" "${kernel_builder}" -x "${tee}" -v "${kernel_version}" -u "${kernel_url}" From 8baee93fcaba685e725193fb45f1dbd50e6bbf9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Fri, 25 Nov 2022 13:48:36 +0100 Subject: [PATCH 2/2] build: Fix kernel/build.sh identation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Simply replace space by tabs in one line that was off. Signed-off-by: Fabiano FidĂȘncio --- tools/packaging/static-build/kernel/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/packaging/static-build/kernel/build.sh b/tools/packaging/static-build/kernel/build.sh index 663a007c8..0ffd19193 100755 --- a/tools/packaging/static-build/kernel/build.sh +++ b/tools/packaging/static-build/kernel/build.sh @@ -69,7 +69,7 @@ check_cached_kernel() { install_cached_kernel() { local kernel_directory="${cached_path}/tools/packaging/kata-deploy/local-build/build/cc-kernel/destdir/opt/confidential-containers/share/kata-containers" - local vmlinux_kernel_name="vmlinux-${cached_kernel_version}-${cached_kernel_config}" + local vmlinux_kernel_name="vmlinux-${cached_kernel_version}-${cached_kernel_config}" local vmlinuz_kernel_name="vmlinuz-${cached_kernel_version}-${cached_kernel_config}" mkdir -p "${kernel_directory}" pushd "${kernel_directory}"