From e271eba4e02e5ed5af0c8189e78b497f9bac0aa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 6 Dec 2022 11:20:46 +0100 Subject: [PATCH 1/2] kernel: Only print build info when not using cached artefacts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's move the info about building initramfs to *after* trying to install the cached components. Signed-off-by: Fabiano FidĂȘncio --- .../kata-deploy/local-build/kata-deploy-binaries.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 8c36ebb987..23a89abb88 100755 --- a/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh +++ b/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh @@ -181,8 +181,6 @@ install_cc_tdx_image() { #Install CC kernel asset install_cc_kernel() { - info "build initramfs for cc kernel" - export KATA_BUILD_CC=yes export kernel_version="$(yq r $versions_yaml assets.kernel.version)" @@ -195,6 +193,7 @@ install_cc_kernel() { "${final_tarball_path}" \ && return 0 + info "build initramfs for CC kernel" "${initramfs_builder}" DESTDIR="${destdir}" PREFIX="${cc_prefix}" "${kernel_builder}" -f -v "${kernel_version}" } @@ -260,7 +259,6 @@ install_cc_tee_kernel() { [[ "${tee}" != "tdx" && "${tee}" != "sev" ]] && die "Non supported TEE" - info "build initramfs for tee kernel" export kernel_version=${kernel_version} install_cached_component \ @@ -272,6 +270,7 @@ install_cc_tee_kernel() { "${final_tarball_path}" \ && return 0 + info "build initramfs for TEE kernel" "${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 32e91d9d8aec140727009add053fa0b789eb6ce5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 6 Dec 2022 11:22:46 +0100 Subject: [PATCH 2/2] kernel: Export KATA_BUILD_CC in install_cc_tee_kernel() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As already done for install_cc_kernel(), let's ensure we export KATA_BUILD_CC=yes as part of the install_cc_tee_kernel. This is used to generate the hash of the devices in the initramfs. Fixes: #5845 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 23a89abb88..87275292d5 100755 --- a/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh +++ b/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh @@ -254,6 +254,7 @@ install_cc_virtiofsd() { #Install CC kernel assert, with TEE support install_cc_tee_kernel() { + export KATA_BUILD_CC=yes tee="${1}" kernel_version="${2}"