Rework QEMU build script.

This commit is contained in:
Mid Favila 2022-02-06 06:29:53 -04:00
parent a3497c0a3d
commit d4ebec3353
2 changed files with 67 additions and 33 deletions

View File

@ -20,8 +20,7 @@ patch -p1 < python3-always-pip.patch
--with-system-expat \ --with-system-expat \
--with-system-ffi \ --with-system-ffi \
--with-ensurepip=yes \ --with-ensurepip=yes \
--without-doc-strings \ --without-doc-strings
--ax_cv_v_float_words_bigendian=no
make make
make DESTDIR="$1" install make DESTDIR="$1" install

View File

@ -1,5 +1,8 @@
#!/bin/sh -e #!/bin/sh -e
TARGETS='i386-softmmu i386-linux-user riscv32-softmmu riscv32-linux-user riscv64-softmmu riscv64-linux-user x86_64-softmmu x86_64-linux-user'
for patch in *.patch; do for patch in *.patch; do
patch -p1 < "$patch" patch -p1 < "$patch"
done done
@ -12,38 +15,70 @@ sed -i 's/#include <sys\/sysinfo.h>//' linux-user/syscall.c
# Remove bash dependency # Remove bash dependency
sed -i 's/env bash/env sh/g' Makefile sed -i 's/env bash/env sh/g' Makefile
# Build qemu-system* binaries dynamically linked
./configure \ ./configure \
--prefix=/usr \ --prefix=/usr \
--localstatedir=/var \ --localstatedir=/var \
--sysconfdir=/etc \ --sysconfdir=/etc \
--disable-debug-info \ --without-default-features \
--disable-gtk \ --disable-user \
--disable-docs \ --disable-debug-info \
--enable-sdl \ --disable-gtk \
--enable-kvm \ --disable-plugins \
--enable-pie \ --disable-guest-agent \
--enable-curses \ --disable-gnutls \
--disable-user \ --disable-nettle \
--disable-linux-user \ --disable-gcrypt \
--enable-system --disable-curl \
--disable-fuse \
make --disable-tpm \
make DESTDIR="$1" PREFIX=/usr install --enable-sdl \
make clean --enable-curses \
--enable-kvm \
# Build qemu Linux user binaries statically linked. --enable-pie \
./configure \ --enable-linux-user \
--prefix=/usr \ --enable-system \
--localstatedir=/var \ --enable-sanitizers \
--sysconfdir=/etc \ --enable-slirp \
--disable-debug-info \ --enable-tools \
--disable-gtk \ --enable-avx2 \
--disable-docs \ --enable-multiprocess \
--disable-user \ --enable-membarrier \
--enable-linux-user \ --enable-coroutine-pool \
--disable-system \ --target-list="$TARGETS"
--static
# # Build qemu-system* binaries dynamically linked
# ./configure \
# --prefix=/usr \
# --localstatedir=/var \
# --sysconfdir=/etc \
# --disable-debug-info \
# --disable-gtk \
# --disable-docs \
# --enable-sdl \
# --enable-kvm \
# --enable-pie \
# --enable-curses \
# --disable-user \
# --disable-linux-user \
# --enable-system
# make
# make DESTDIR="$1" PREFIX=/usr install
# make clean
# # Build qemu Linux user binaries statically linked.
# ./configure \
# --prefix=/usr \
# --localstatedir=/var \
# --sysconfdir=/etc \
# --disable-debug-info \
# --disable-gtk \
# --disable-docs \
# --disable-user \
# --enable-linux-user \
# --disable-system \
# --static
make make
make DESTDIR="$1" PREFIX=/usr install make DESTDIR="$1" PREFIX=/usr install