mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-26 07:22:20 +00:00
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:
parent
08361c5948
commit
f751c98da3
@ -83,7 +83,6 @@ QEMUBINDIR := $(PREFIXDEPS)/bin
|
|||||||
CLHBINDIR := $(PREFIXDEPS)/bin
|
CLHBINDIR := $(PREFIXDEPS)/bin
|
||||||
FCBINDIR := $(PREFIXDEPS)/bin
|
FCBINDIR := $(PREFIXDEPS)/bin
|
||||||
ACRNBINDIR := $(PREFIXDEPS)/bin
|
ACRNBINDIR := $(PREFIXDEPS)/bin
|
||||||
VIRTIOFSDBINDIR := $(PREFIXDEPS)/bin
|
|
||||||
SYSCONFDIR := /etc
|
SYSCONFDIR := /etc
|
||||||
LOCALSTATEDIR := /var
|
LOCALSTATEDIR := /var
|
||||||
|
|
||||||
@ -184,7 +183,7 @@ DEFENTROPYSOURCE := /dev/urandom
|
|||||||
DEFDISABLEBLOCK := false
|
DEFDISABLEBLOCK := false
|
||||||
DEFSHAREDFS := virtio-9p
|
DEFSHAREDFS := virtio-9p
|
||||||
DEFSHAREDFS_QEMU_VIRTIOFS := virtio-fs
|
DEFSHAREDFS_QEMU_VIRTIOFS := virtio-fs
|
||||||
DEFVIRTIOFSDAEMON := $(VIRTIOFSDBINDIR)/virtiofsd
|
DEFVIRTIOFSDAEMON := $(LIBEXECDIR)/kata-qemu/virtiofsd
|
||||||
DEFVALIDVIRTIOFSDAEMONPATHS := [\"$(DEFVIRTIOFSDAEMON)\"]
|
DEFVALIDVIRTIOFSDAEMONPATHS := [\"$(DEFVIRTIOFSDAEMON)\"]
|
||||||
# Default DAX mapping cache size in MiB
|
# Default DAX mapping cache size in MiB
|
||||||
#if value is 0, DAX is not enabled
|
#if value is 0, DAX is not enabled
|
||||||
|
@ -262,7 +262,6 @@ generate_qemu_options() {
|
|||||||
qemu_options+=(size:--disable-snappy)
|
qemu_options+=(size:--disable-snappy)
|
||||||
|
|
||||||
# Disable unused security options
|
# Disable unused security options
|
||||||
qemu_options+=(security:--disable-seccomp)
|
|
||||||
qemu_options+=(security:--disable-tpm)
|
qemu_options+=(security:--disable-tpm)
|
||||||
|
|
||||||
# Disable userspace network access ("-net user")
|
# Disable userspace network access ("-net user")
|
||||||
@ -404,7 +403,9 @@ generate_qemu_options() {
|
|||||||
# operations safer.
|
# operations safer.
|
||||||
qemu_options+=(functionality:--enable-virtfs)
|
qemu_options+=(functionality:--enable-virtfs)
|
||||||
qemu_options+=(functionality:--enable-attr)
|
qemu_options+=(functionality:--enable-attr)
|
||||||
|
# virtio-fs needs cap-ng and seccomp
|
||||||
qemu_options+=(functionality:--enable-cap-ng)
|
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
|
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
|
# AVX2 is enabled by default by x86_64, make sure it's enabled only
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
# Copyright (c) 2019 Intel Corporation
|
||||||
|
# Copyright (c) 2020 Ant Group
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
from ubuntu:20.04
|
from ubuntu:20.04
|
||||||
|
|
||||||
ARG QEMU_VIRTIOFS_REPO
|
ARG QEMU_VIRTIOFS_REPO
|
||||||
@ -68,5 +72,5 @@ RUN make -j$(nproc)
|
|||||||
RUN make -j$(nproc) virtiofsd
|
RUN make -j$(nproc) virtiofsd
|
||||||
RUN make install DESTDIR=/tmp/qemu-virtiofs-static
|
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 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}" *
|
RUN cd /tmp/qemu-virtiofs-static && tar -czvf "${QEMU_TARBALL}" *
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
qemu_black_list=(
|
qemu_black_list=(
|
||||||
*/bin/qemu-pr-helper
|
*/bin/qemu-pr-helper
|
||||||
*/bin/virtfs-proxy-helper
|
*/bin/virtfs-proxy-helper
|
||||||
*/libexec/
|
*/libexec/kata-qemu/qemu*
|
||||||
*/share/*/applications/
|
*/share/*/applications/
|
||||||
*/share/*/*.dtb
|
*/share/*/*.dtb
|
||||||
*/share/*/efi-e1000e.rom
|
*/share/*/efi-e1000e.rom
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
# Copyright (c) 2019 Intel Corporation
|
||||||
|
# Copyright (c) 2020 Ant Group
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
from ubuntu:20.04
|
from ubuntu:20.04
|
||||||
|
|
||||||
ARG QEMU_REPO
|
ARG QEMU_REPO
|
||||||
@ -36,7 +40,8 @@ RUN apt-get --no-install-recommends install -y \
|
|||||||
libtool \
|
libtool \
|
||||||
make \
|
make \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
pkg-config \
|
libseccomp-dev \
|
||||||
|
libseccomp2 \
|
||||||
python \
|
python \
|
||||||
python-dev \
|
python-dev \
|
||||||
rsync \
|
rsync \
|
||||||
@ -56,5 +61,6 @@ RUN PREFIX="${PREFIX}" /root/configure-hypervisor.sh -s kata-qemu | xargs ./conf
|
|||||||
--with-pkgversion=kata-static
|
--with-pkgversion=kata-static
|
||||||
|
|
||||||
RUN make -j$(nproc)
|
RUN make -j$(nproc)
|
||||||
|
RUN make -j$(nproc) virtiofsd
|
||||||
RUN make install DESTDIR=/tmp/qemu-static
|
RUN make install DESTDIR=/tmp/qemu-static
|
||||||
RUN cd /tmp/qemu-static && tar -czvf "${QEMU_TARBALL}" *
|
RUN cd /tmp/qemu-static && tar -czvf "${QEMU_TARBALL}" *
|
||||||
|
Loading…
Reference in New Issue
Block a user