From c4cc16efcd946f225c6b010e5dd916f7fc86a326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Thu, 30 Jun 2022 14:08:22 +0200 Subject: [PATCH] packaging: Allow building the Kernel for CC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We're adding a new target for building the Kernel for CC, but it's important to note that the only difference between this one and the "vanilla" build is the installation path. The reason we're taking this approach is because the first release target for CC doesn't include TEE support. Fixes: #4567 Signed-off-by: Fabiano FidĂȘncio --- tools/packaging/kata-deploy/local-build/Makefile | 3 +++ .../kata-deploy/local-build/kata-deploy-binaries.sh | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/tools/packaging/kata-deploy/local-build/Makefile b/tools/packaging/kata-deploy/local-build/Makefile index d9229b38dc..97a1a580e9 100644 --- a/tools/packaging/kata-deploy/local-build/Makefile +++ b/tools/packaging/kata-deploy/local-build/Makefile @@ -73,6 +73,9 @@ image: kata-tarball cc-cloud-hypervisor-tarball: ${MAKE} $@-build +cc-kernel-tarball: + ${MAKE} $@-build + cc-rootfs-image-tarball: ${MAKE} $@-build 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 41fba87929..7bc556dbc6 100755 --- a/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh +++ b/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh @@ -108,6 +108,12 @@ install_cc_image() { "${rootfs_builder}" --imagetype=image --prefix="${cc_prefix}" --destdir="${destdir}" } +#Install CC kernel asset +install_cc_kernel() { + export kernel_version="$(yq r $versions_yaml assets.kernel.version)" + DESTDIR="${destdir}" PREFIX="${cc_prefix}" "${kernel_builder}" -f -v "${kernel_version}" +} + #Install all components that are not assets install_cc_shimv2() { GO_VERSION="$(yq r ${versions_yaml} languages.golang.meta.newest-version)" @@ -215,6 +221,8 @@ handle_build() { cc-cloud-hypervisor) install_cc_clh ;; + cc-kernel) install_cc_kernel ;; + cc-rootfs-image) install_cc_image ;; cc-shim-v2) install_cc_shimv2 ;;