feat: enable more qemu features

This commit is contained in:
Lance R. Vick 2024-09-09 23:09:52 -07:00
parent 724faaeeb3
commit 5eee952cd7
No known key found for this signature in database
GPG key ID: 8E47A1EC35A1551D
2 changed files with 57 additions and 1 deletions

View file

@ -0,0 +1,50 @@
FROM scratch AS base
ARG ARCH=x86_64
ENV VERSION=4.8.0
ENV SRC_HASH=378216c88c021c9ed7de9006db291127d30a0da94a23dffefdb26b26a5849bf7
ENV SRC_FILE=libslirp-${VERSION}.tar.gz
ENV SRC_SITE=https://gitlab.freedesktop.org/slirp/libslirp/-/archive/v${VERSION}/${SRC_FILE}
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} ${SRC_FILE}
FROM fetch AS build
COPY --from=stagex/python . /
COPY --from=stagex/zlib . /
COPY --from=stagex/bzip2 . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/ncurses . /
COPY --from=stagex/meson . /
COPY --from=stagex/busybox . /
COPY --from=stagex/musl . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/cmake . /
COPY --from=stagex/pcre2 . /
COPY --from=stagex/python . /
COPY --from=stagex/bison . /
COPY --from=stagex/flex . /
COPY --from=stagex/py-packaging . /
COPY --from=stagex/xz . /
COPY --from=stagex/ninja . /
COPY --from=stagex/glib . /
COPY --from=stagex/linux-headers . /
RUN tar -xf ${SRC_FILE}
WORKDIR /libslirp-v${VERSION}-ce314e39458223c2c42245fe536fbe1bcd94e9b1
RUN --network=none <<-EOF
set -eux
meson setup \
--default-library=shared \
--prefix=/usr \
. output
meson compile -C output
meson install --no-rebuild -C output
EOF
FROM build AS install
RUN DESTDIR=/rootfs meson install --no-rebuild -C output
RUN find /rootfs -exec touch -hcd "@0" "{}" +
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

View file

@ -48,6 +48,7 @@ COPY --from=stagex/libaio . /
COPY --from=stagex/libzstd . /
COPY --from=stagex/libseccomp . /
COPY --from=stagex/libcap-ng . /
COPY --from=stagex/libslirp . /
COPY --from=stagex/alsa-lib . /
COPY --from=stagex/ncurses . /
COPY --from=stagex/curl . /
@ -99,6 +100,12 @@ RUN --network=none <<-EOF
--enable-curses \
--enable-modules \
--enable-tpm \
--enable-vhost-net \
--enable-attr \
--enable-linux-user \
--enable-slirp \
--enable-tcg \
--disable-install-blobs \
--disable-docs \
--disable-sdl \
--disable-gtk \
@ -115,7 +122,6 @@ RUN --network=none <<-EOF
--disable-spice \
--disable-usb-redir \
--disable-vde \
--disable-vhost-net \
--disable-virglrenderer \
--disable-virtfs \
--disable-vnc \