diff --git a/.ci/install_kata.sh b/.ci/install_kata.sh index 2af726757..9953c9019 100755 --- a/.ci/install_kata.sh +++ b/.ci/install_kata.sh @@ -91,8 +91,10 @@ case "${KATA_HYPERVISOR}" in "${cidir}/install_virtiofsd.sh" if [ "${TEE_TYPE}" == "tdx" ]; then "${cidir}/install_tdvf.sh" - elif [ "${TEE_TYPE:-}" == "sev" ] || [ "${TEE_TYPE:-}" == "snp" ]; then + elif [ "${TEE_TYPE:-}" == "sev" ]; then "${cidir}/install_ovmf_sev.sh" + elif [ "${TEE_TYPE:-}" == "snp" ]; then + "${cidir}/install_ovmf_x86_64.sh" fi ;; "dragonball") diff --git a/.ci/install_ovmf_x86_64.sh b/.ci/install_ovmf_x86_64.sh new file mode 100755 index 000000000..b70b46ec1 --- /dev/null +++ b/.ci/install_ovmf_x86_64.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# Copyright 2022 Advanced Micro Devices, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +set -o errexit +set -o nounset +set -o pipefail +set -o errtrace + +cidir=$(dirname "$0") +source "${cidir}/lib.sh" + +main() { + local buildscript="${katacontainers_repo_dir}/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh" + + # Just in case the kata-containers repo is not cloned yet. + clone_katacontainers_repo + + pushd $katacontainers_repo_dir + sudo -E PATH=$PATH bash ${buildscript} --build=cc-x86_64-ovmf + sudo tar -xvJpf build/kata-static-cc-x86_64-ovmf.tar.xz -C / + sudo ln -sf /opt/confidential-containers/share/ovmf /usr/share/ovmf + popd +} + +main "$@"