From 255bae15150ce382d769a9d7866f9bee07e6f742 Mon Sep 17 00:00:00 2001 From: Eric Ernst Date: Wed, 8 May 2019 18:44:45 -0700 Subject: [PATCH] nemu: add virtiofsd to nemu static binary add virtiofsd as part of the nemu static build Signed-off-by: Eric Ernst --- static-build/nemu/Dockerfile | 3 +++ static-build/nemu/build-static-nemu.sh | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/static-build/nemu/Dockerfile b/static-build/nemu/Dockerfile index 186e77bfc5..1691a2a753 100644 --- a/static-build/nemu/Dockerfile +++ b/static-build/nemu/Dockerfile @@ -7,6 +7,8 @@ from ubuntu:18.04 ARG NEMU_REPO ARG NEMU_VERSION ARG NEMU_OVMF +ARG VIRTIOFSD_RELEASE +ARG VIRTIOFSD WORKDIR /root/nemu RUN apt-get update @@ -52,5 +54,6 @@ RUN make install DESTDIR=/tmp/nemu-static RUN wget "${NEMU_OVMF}" && mv OVMF.fd /tmp/nemu-static/opt/kata/share/kata-nemu/ RUN mv /tmp/nemu-static/opt/kata/bin/qemu-system-x86_64 /tmp/nemu-static/opt/kata/bin/nemu-system-x86_64 +RUN wget "${VIRTIOFSD_RELEASE}/${VIRTIOFSD}" && chmod +x ${VIRTIOFSD} && mv ${VIRTIOFSD} /tmp/nemu-static/opt/kata/bin/ RUN cd /tmp/nemu-static && tar -czvf kata-nemu-static.tar.gz * diff --git a/static-build/nemu/build-static-nemu.sh b/static-build/nemu/build-static-nemu.sh index 339bbe3273..c8c3049618 100755 --- a/static-build/nemu/build-static-nemu.sh +++ b/static-build/nemu/build-static-nemu.sh @@ -21,9 +21,7 @@ nemu_ovmf_version="${nemu_ovmf_version:-}" if [ -z "$nemu_repo" ]; then info "Get nemu information from runtime versions.yaml" - nemu_url=$(get_from_kata_deps "assets.hypervisor.nemu.url") - [ -n "$nemu_url" ] || die "failed to get nemu url" - nemu_repo="${nemu_url}.git" + nemu_repo=$(get_from_kata_deps "assets.hypervisor.nemu.url") fi [ -n "$nemu_repo" ] || die "failed to get nemu repo" @@ -41,6 +39,8 @@ if [ -z "$nemu_ovmf_version" ]; then [ -n "$nemu_ovmf_version" ] || die "failed to get nemu ovmf version" fi +nemu_virtiofsd_binary="virtiofsd-x86_64" +nemu_virtiofsd_release="${nemu_repo}/releases/download/${nemu_version}" nemu_ovmf_release="${nemu_ovmf_repo}/releases/download/${nemu_ovmf_version}/OVMF.fd" info "Build ${nemu_repo} version: ${nemu_version}" @@ -53,6 +53,8 @@ docker build \ --build-arg NEMU_REPO="${nemu_repo}" \ --build-arg NEMU_VERSION="${nemu_version}" \ --build-arg NEMU_OVMF="${nemu_ovmf_release}" \ + --build-arg VIRTIOFSD_RELEASE="${nemu_virtiofsd_release}" \ + --build-arg VIRTIOFSD="${nemu_virtiofsd_binary}" \ "${config_dir}" \ -f "${script_dir}/Dockerfile" \ -t nemu-static