mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-31 08:28:34 +00:00
packaging: Allow building Cloud Hypervisor for CC
We're adding a new target for building Cloud Hypervisor for CC, but it's important to note that the only difference between this one and the "vanilla" build is the installation path. The reasons we're taking this approach are: * Cloud Hypervisor, for the `main` and `stable` branches, is already built with TDX support. * The first target for the CC release doesn't include TEE support. Fixes: #4566 Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
@@ -70,6 +70,9 @@ install-tarball:
|
||||
image: kata-tarball
|
||||
$(MK_DIR)kata-deploy-build-and-upload-image.sh $(CURDIR)/kata-static.tar.xz
|
||||
|
||||
cc-cloud-hypervisor-tarball:
|
||||
${MAKE} $@-build
|
||||
|
||||
cc-rootfs-image-tarball:
|
||||
${MAKE} $@-build
|
||||
|
||||
|
@@ -85,6 +85,19 @@ EOF
|
||||
exit "${return_code}"
|
||||
}
|
||||
|
||||
# Install static CC cloud-hypervisor asset
|
||||
install_cc_clh() {
|
||||
if [[ "${ARCH}" == "x86_64" ]]; then
|
||||
export features="tdx"
|
||||
fi
|
||||
|
||||
info "build static CC cloud-hypervisor"
|
||||
"${clh_builder}"
|
||||
info "Install static CC cloud-hypervisor"
|
||||
mkdir -p "${destdir}/${cc_prefix}/bin/"
|
||||
sudo install -D --owner root --group root --mode 0744 cloud-hypervisor/cloud-hypervisor "${destdir}/${cc_prefix}/bin/cloud-hypervisor"
|
||||
}
|
||||
|
||||
#Install cc capable guest image
|
||||
install_cc_image() {
|
||||
info "Create CC image"
|
||||
@@ -200,6 +213,8 @@ handle_build() {
|
||||
install_virtiofsd
|
||||
;;
|
||||
|
||||
cc-cloud-hypervisor) install_cc_clh ;;
|
||||
|
||||
cc-rootfs-image) install_cc_image ;;
|
||||
|
||||
cc-shim-v2) install_cc_shimv2 ;;
|
||||
|
Reference in New Issue
Block a user