Skip to content

Commit

Permalink
ci: Build generic OVMF for SNP.
Browse files Browse the repository at this point in the history
Fixes: kata-containers#5593

Signed-off-by: Unmesh Deodhar <[email protected]>
  • Loading branch information
UnmeshDeodhar committed May 18, 2023
1 parent 0bf11f8 commit 198b5b8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .ci/install_kata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
28 changes: 28 additions & 0 deletions .ci/install_ovmf_x86_64.sh
Original file line number Diff line number Diff line change
@@ -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 "$@"

0 comments on commit 198b5b8

Please sign in to comment.