mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 12:14:48 +00:00
local-build: Add support for building virtiofsd
As done for the other binaries we release, let's add support for "building" (or pulling down) the static binary we ship as part of the kata-containers static tarball (the same one used by kata-deploy). Right now the virtiofsd is installed in /opt/kata/libexec/virtiofsd, a different path than the virtiofsd that comes with QEMU. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
c7ac55b6d7
commit
71f59f3a7b
@ -27,7 +27,8 @@ all: cloud-hypervisor-tarball \
|
||||
qemu-tarball \
|
||||
rootfs-image-tarball \
|
||||
rootfs-initrd-tarball \
|
||||
shim-v2-tarball
|
||||
shim-v2-tarball \
|
||||
virtiofsd-tarball
|
||||
|
||||
%-tarball-build: $(MK_DIR)/dockerbuild/install_yq.sh
|
||||
$(call BUILD,$*)
|
||||
@ -57,6 +58,9 @@ rootfs-initrd-tarball:
|
||||
shim-v2-tarball:
|
||||
${MAKE} $@-build
|
||||
|
||||
virtiofsd-tarball:
|
||||
${MAKE} $@-build
|
||||
|
||||
merge-builds:
|
||||
$(MK_DIR)/kata-deploy-merge-builds.sh build
|
||||
|
||||
|
@ -26,6 +26,7 @@ readonly firecracker_builder="${static_build_dir}/firecracker/build-static-firec
|
||||
readonly kernel_builder="${static_build_dir}/kernel/build.sh"
|
||||
readonly qemu_builder="${static_build_dir}/qemu/build-static-qemu.sh"
|
||||
readonly shimv2_builder="${static_build_dir}/shim-v2/build.sh"
|
||||
readonly virtiofsd_builder="${static_build_dir}/virtiofsd/build-static-virtiofsd.sh"
|
||||
|
||||
readonly rootfs_builder="${repo_root_dir}/tools/packaging/guest-image/build_image.sh"
|
||||
|
||||
@ -76,6 +77,7 @@ options:
|
||||
rootfs-image
|
||||
rootfs-initrd
|
||||
shim-v2
|
||||
virtiofsd
|
||||
EOF
|
||||
|
||||
exit "${return_code}"
|
||||
@ -140,6 +142,15 @@ install_clh() {
|
||||
sudo install -D --owner root --group root --mode 0744 cloud-hypervisor/cloud-hypervisor "${destdir}/opt/kata/bin/cloud-hypervisor"
|
||||
}
|
||||
|
||||
# Install static virtiofsd asset
|
||||
install_virtiofsd() {
|
||||
info "build static virtiofsd"
|
||||
"${virtiofsd_builder}"
|
||||
info "Install static virtiofsd"
|
||||
mkdir -p "${destdir}/opt/kata/libexec/"
|
||||
sudo install -D --owner root --group root --mode 0744 virtiofsd/virtiofsd "${destdir}/opt/kata/libexec/virtiofsd"
|
||||
}
|
||||
|
||||
#Install all components that are not assets
|
||||
install_shimv2() {
|
||||
GO_VERSION="$(yq r ${versions_yaml} languages.golang.meta.newest-version)"
|
||||
@ -166,6 +177,7 @@ handle_build() {
|
||||
install_kernel
|
||||
install_qemu
|
||||
install_shimv2
|
||||
install_virtiofsd
|
||||
;;
|
||||
|
||||
cloud-hypervisor) install_clh ;;
|
||||
@ -184,6 +196,8 @@ handle_build() {
|
||||
|
||||
shim-v2) install_shimv2 ;;
|
||||
|
||||
virtiofsd) install_virtiofsd ;;
|
||||
|
||||
*)
|
||||
die "Invalid build target ${build_target}"
|
||||
;;
|
||||
@ -221,6 +235,7 @@ main() {
|
||||
rootfs-image
|
||||
rootfs-initrd
|
||||
shim-v2
|
||||
virtiofsd
|
||||
)
|
||||
silent=false
|
||||
while getopts "hs-:" opt; do
|
||||
|
Loading…
Reference in New Issue
Block a user