nemu: add virtiofsd to nemu static binary

add virtiofsd as part of the nemu static build

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
This commit is contained in:
Eric Ernst
2019-05-08 18:44:45 -07:00
parent 924bda0c61
commit 255bae1515
2 changed files with 8 additions and 3 deletions

View File

@@ -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 *

View File

@@ -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