packaging: install virtiofsd for normal qemu build as well

For experimental-virtiofs, we use it to test virtiofs with DAX. Let's
rename its virtiofsd to virtiofsd-dax.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
Peng Tao 2020-10-13 15:03:54 +08:00
parent 08361c5948
commit f751c98da3
5 changed files with 16 additions and 6 deletions

View File

@ -83,7 +83,6 @@ QEMUBINDIR := $(PREFIXDEPS)/bin
CLHBINDIR := $(PREFIXDEPS)/bin
FCBINDIR := $(PREFIXDEPS)/bin
ACRNBINDIR := $(PREFIXDEPS)/bin
VIRTIOFSDBINDIR := $(PREFIXDEPS)/bin
SYSCONFDIR := /etc
LOCALSTATEDIR := /var
@ -184,7 +183,7 @@ DEFENTROPYSOURCE := /dev/urandom
DEFDISABLEBLOCK := false
DEFSHAREDFS := virtio-9p
DEFSHAREDFS_QEMU_VIRTIOFS := virtio-fs
DEFVIRTIOFSDAEMON := $(VIRTIOFSDBINDIR)/virtiofsd
DEFVIRTIOFSDAEMON := $(LIBEXECDIR)/kata-qemu/virtiofsd
DEFVALIDVIRTIOFSDAEMONPATHS := [\"$(DEFVIRTIOFSDAEMON)\"]
# Default DAX mapping cache size in MiB
#if value is 0, DAX is not enabled

View File

@ -262,7 +262,6 @@ generate_qemu_options() {
qemu_options+=(size:--disable-snappy)
# Disable unused security options
qemu_options+=(security:--disable-seccomp)
qemu_options+=(security:--disable-tpm)
# Disable userspace network access ("-net user")
@ -404,7 +403,9 @@ generate_qemu_options() {
# operations safer.
qemu_options+=(functionality:--enable-virtfs)
qemu_options+=(functionality:--enable-attr)
# virtio-fs needs cap-ng and seccomp
qemu_options+=(functionality:--enable-cap-ng)
qemu_options+=(functionality:--enable-seccomp)
if [[ "${qemu_version_major}" -ge 4 || ( "${qemu_version_major}" -eq 3 && "${qemu_version_minor}" -ge 1 ) ]]; then
# AVX2 is enabled by default by x86_64, make sure it's enabled only

View File

@ -1,3 +1,7 @@
# Copyright (c) 2019 Intel Corporation
# Copyright (c) 2020 Ant Group
#
# SPDX-License-Identifier: Apache-2.0
from ubuntu:20.04
ARG QEMU_VIRTIOFS_REPO
@ -68,5 +72,5 @@ RUN make -j$(nproc)
RUN make -j$(nproc) virtiofsd
RUN make install DESTDIR=/tmp/qemu-virtiofs-static
RUN mv /tmp/qemu-virtiofs-static/"${PREFIX}"/bin/qemu-system-x86_64 /tmp/qemu-virtiofs-static/"${PREFIX}"/bin/qemu-virtiofs-system-x86_64
RUN chmod +x virtiofsd && mv virtiofsd /tmp/qemu-virtiofs-static/opt/kata/bin/
RUN mv /tmp/qemu-virtiofs-static/"${PREFIX}"/libexec/kata-qemu/virtiofsd /tmp/qemu-virtiofs-static/opt/kata/bin/virtiofsd-dax
RUN cd /tmp/qemu-virtiofs-static && tar -czvf "${QEMU_TARBALL}" *

View File

@ -5,7 +5,7 @@
qemu_black_list=(
*/bin/qemu-pr-helper
*/bin/virtfs-proxy-helper
*/libexec/
*/libexec/kata-qemu/qemu*
*/share/*/applications/
*/share/*/*.dtb
*/share/*/efi-e1000e.rom

View File

@ -1,3 +1,7 @@
# Copyright (c) 2019 Intel Corporation
# Copyright (c) 2020 Ant Group
#
# SPDX-License-Identifier: Apache-2.0
from ubuntu:20.04
ARG QEMU_REPO
@ -36,7 +40,8 @@ RUN apt-get --no-install-recommends install -y \
libtool \
make \
pkg-config \
pkg-config \
libseccomp-dev \
libseccomp2 \
python \
python-dev \
rsync \
@ -56,5 +61,6 @@ RUN PREFIX="${PREFIX}" /root/configure-hypervisor.sh -s kata-qemu | xargs ./conf
--with-pkgversion=kata-static
RUN make -j$(nproc)
RUN make -j$(nproc) virtiofsd
RUN make install DESTDIR=/tmp/qemu-static
RUN cd /tmp/qemu-static && tar -czvf "${QEMU_TARBALL}" *