diff --git a/tools/packaging/static-build/td-shim/Dockerfile b/tools/packaging/static-build/td-shim/Dockerfile deleted file mode 100644 index ed9270ca4a..0000000000 --- a/tools/packaging/static-build/td-shim/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) 2022 Intel -# -# SPDX-License-Identifier: Apache-2.0 - -FROM ubuntu:20.04 -ENV DEBIAN_FRONTEND=noninteractive -SHELL ["/bin/bash", "-o", "pipefail", "-c"] -ARG RUST_TOOLCHAIN - -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - ca-certificates \ - clang \ - curl \ - gcc \ - git \ - llvm \ - nasm && \ - apt-get clean && rm -rf /var/lib/lists/ && \ - curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain ${RUST_TOOLCHAIN} && \ - source "$HOME/.cargo/env" && \ - rustup component add rust-src && \ - cargo install cargo-xbuild diff --git a/tools/packaging/static-build/td-shim/build-td-shim.sh b/tools/packaging/static-build/td-shim/build-td-shim.sh deleted file mode 100755 index cbc336d666..0000000000 --- a/tools/packaging/static-build/td-shim/build-td-shim.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2022 Intel -# -# SPDX-License-Identifier: Apache-2.0 - -set -o errexit -set -o nounset -set -o pipefail - -script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -source "${script_dir}/../../scripts/lib.sh" - -tdshim_repo="${tdshim_repo:-}" -DESTDIR=${DESTDIR:-${PWD}} -PREFIX="${PREFIX:-/opt/kata}" - -[ -n "${tdshim_repo}" ] || die "Failed to get TD-shim repo" -[ -n "${tdshim_version}" ] || die "Failed to get TD-shim version or commit" - -info "Build ${tdshim_repo} version: ${tdshim_version}" - -source ${HOME}/.cargo/env - -build_root=$(mktemp -d) -pushd ${build_root} -git clone --single-branch "${tdshim_repo}" -pushd td-shim -git checkout "${tdshim_version}" -bash sh_script/build_final.sh boot_kernel - -install_dir="${DESTDIR}/${PREFIX}/share/td-shim" -mkdir -p ${install_dir} -install target/x86_64-unknown-uefi/release/final-boot-kernel.bin ${install_dir}/td-shim.bin -popd #td-shim -popd #${build_root} - -local_dir=${PWD} -pushd ${DESTDIR} -tar -czvf "${local_dir}/td-shim.tar.gz" "./$PREFIX" -rm -rf $(dirname ./$PREFIX) -popd #${DESTDIR} diff --git a/tools/packaging/static-build/td-shim/build.sh b/tools/packaging/static-build/td-shim/build.sh deleted file mode 100755 index 457059a8d0..0000000000 --- a/tools/packaging/static-build/td-shim/build.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2022 Intel -# -# SPDX-License-Identifier: Apache-2.0 - -set -o errexit -set -o nounset -set -o pipefail - -script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -readonly tdshim_builder="${script_dir}/build-td-shim.sh" - -source "${script_dir}/../../scripts/lib.sh" - -DESTDIR=${DESTDIR:-${PWD}} -PREFIX=${PREFIX:-/opt/kata} -kata_version="${kata_version:-}" -tdshim_repo="${tdshim_repo:-}" -tdshim_version="${tdshim_version:-}" -tdshim_toolchain="${tdshim_toolchain:-}" -package_output_dir="${package_output_dir:-}" - -[ -n "${tdshim_repo}" ] || tdshim_repo=$(get_from_kata_deps "externals.td-shim.url") -[ -n "${tdshim_version}" ] || tdshim_version=$(get_from_kata_deps "externals.td-shim.version") -[ -n "${tdshim_toolchain}" ] || tdshim_toolchain=$(get_from_kata_deps "externals.td-shim.toolchain") - -[ -n "${tdshim_repo}" ] || die "Failed to get TD-shim repo" -[ -n "${tdshim_version}" ] || die "Failed to get TD-shim version or commit" -[ -n "${tdshim_toolchain}" ] || die "Failed to get TD-shim toolchain to be used to build the project" - -container_image="${TDSHIM_CONTAINER_BUILDER:-${BUILDER_REGISTRY}:td-shim-${tdshim_toolchain}-$(get_last_modification ${script_dir})-$(uname -m)}" - -sudo docker pull ${container_image} || (sudo docker build \ - --build-arg RUST_TOOLCHAIN="${tdshim_toolchain}" \ - -t "${container_image}" \ - "${script_dir}" && \ - # No-op unless PUSH_TO_REGISTRY is exported as "yes" - push_to_registry "${container_image}") - -sudo docker run --rm -i -v "${repo_root_dir}:${repo_root_dir}" \ - -w "${PWD}" \ - --env DESTDIR="${DESTDIR}" \ - --env PREFIX="${PREFIX}" \ - --env tdshim_repo="${tdshim_repo}" \ - --env tdshim_version="${tdshim_version}" \ - "${container_image}" \ - bash -c "${tdshim_builder}" diff --git a/versions.yaml b/versions.yaml index e7ca137303..8a60b11101 100644 --- a/versions.yaml +++ b/versions.yaml @@ -333,12 +333,6 @@ externals: package: "OvmfPkg/AmdSev/AmdSevX64.dsc" package_output_dir: "AmdSev" - td-shim: - description: "Confidential Containers Shim Firmware" - url: "https://github.com/confidential-containers/td-shim" - version: "cf9592ef70bd6ba4c7ab1330d278a743f5ba3133" - toolchain: "nightly-2022-05-15" - virtiofsd: description: "vhost-user virtio-fs device backend written in Rust" url: "https://gitlab.com/virtio-fs/virtiofsd"