From df486533faa27df81be51c39628415319ba76f3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Thu, 30 Jun 2022 12:26:06 +0200 Subject: [PATCH] packaging: Allow building a CC shim-v2 capable runtime MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's add a new build target for our local-build scripts, cc-shim-v2, and use it to build Kata Containers properly configured for the CC use-case. Fixes: #4564 Depends-on: github.com/kata-containers/tests#4895 Signed-off-by: Fabiano FidĂȘncio --- tools/packaging/kata-deploy/local-build/Makefile | 3 +++ .../kata-deploy/local-build/kata-deploy-binaries.sh | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/tools/packaging/kata-deploy/local-build/Makefile b/tools/packaging/kata-deploy/local-build/Makefile index 66cb99c534..73204e106d 100644 --- a/tools/packaging/kata-deploy/local-build/Makefile +++ b/tools/packaging/kata-deploy/local-build/Makefile @@ -72,3 +72,6 @@ image: kata-tarball cc-rootfs-image-tarball: ${MAKE} $@-build + +cc-shim-v2-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 ae5d40d856..7a29c40f08 100755 --- a/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh +++ b/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh @@ -95,6 +95,14 @@ install_cc_image() { "${rootfs_builder}" --imagetype=image --prefix="${cc_prefix}" --destdir="${destdir}" } +#Install all components that are not assets +install_cc_shimv2() { + GO_VERSION="$(yq r ${versions_yaml} languages.golang.meta.newest-version)" + export GO_VERSION + export REMOVE_VMM_CONFIGS="acrn fc" + DESTDIR="${destdir}" PREFIX="${cc_prefix}" EXTRA_OPTS="DEFSERVICEOFFLOAD=true" "${shimv2_builder}" +} + #Install guest image install_image() { info "Create image" @@ -194,6 +202,8 @@ handle_build() { cc-rootfs-image) install_cc_image ;; + cc-shim-v2) install_cc_shimv2 ;; + cloud-hypervisor) install_clh ;; firecracker) install_firecracker ;; @@ -242,6 +252,7 @@ main() { local silent build_targets=( cc-rootfs-image + cc-shim-v2 cloud-hypervisor firecracker kernel