From 186cec68891ed71fc99f15fcb890bcdb11b34049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Thu, 30 Jun 2022 15:12:53 +0200 Subject: [PATCH] packaging: Allow building virtiofsd 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 virtiofsd for CC, but it's important to note that the only difference between this one and the "vanilla" build is the installation path. Moreover, virtiofsd will **NOT** be used by the CC effort, but as the very first release target doesn't include TEE support, let's not force those who want to give it a try to setup devicemapper. Fixes: #4569 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 ba9190db88..cd1f06f640 100644 --- a/tools/packaging/kata-deploy/local-build/Makefile +++ b/tools/packaging/kata-deploy/local-build/Makefile @@ -84,3 +84,6 @@ cc-rootfs-image-tarball: cc-shim-v2-tarball: ${MAKE} $@-build + +cc-virtiofsd-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 743e066e9e..50ef1572f3 100755 --- a/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh +++ b/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh @@ -132,6 +132,15 @@ install_cc_shimv2() { DESTDIR="${destdir}" PREFIX="${cc_prefix}" EXTRA_OPTS="DEFSERVICEOFFLOAD=true" "${shimv2_builder}" } +# Install static CC virtiofsd asset +install_cc_virtiofsd() { + info "build static CC virtiofsd" + "${virtiofsd_builder}" + info "Install static CC virtiofsd" + mkdir -p "${destdir}/${cc_prefix}/libexec/" + sudo install -D --owner root --group root --mode 0744 virtiofsd/virtiofsd "${destdir}/${cc_prefix}/libexec/virtiofsd" +} + #Install guest image install_image() { info "Create image" @@ -239,6 +248,8 @@ handle_build() { cc-shim-v2) install_cc_shimv2 ;; + cc-virtiofsd) install_cc_virtiofsd ;; + cloud-hypervisor) install_clh ;; firecracker) install_firecracker ;;