Skip to content

Commit

Permalink
qemu: copy commit for version 7.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
niclas committed Sep 21, 2022
1 parent 42324ff commit 2bb1ee1
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions qemu-7.1.0.build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#! /bin/bash

# COOKIE=$(mcookie|cut -c-8); grep -v V_GREP_ME $0 > /dev/shm/runme-$COOKIE.sh ; sleep 1; exec bash /dev/shm/runme-$COOKIE.sh
# TESTING=1

PKG=qemu
VERSION=7.1.0
BUILD=0

URL=https://download.qemu.org/qemu-$VERSION.tar.xz

PREFIX=/pkg/$PKG-$VERSION-$BUILD
if [ -n "$TESTING" ]; then PREFIX=/dev/shm/$PKG-$VERSION-$BUILD ; fi

set -xe
umask 022

BUILD_TMPDIR=/dev/shm/$PKG-$VERSION-$BUILD.$USER.build.tmp
test -d $BUILD_TMPDIR && ( chmod -R u+rwx $BUILD_TMPDIR || true ; rm -rf $BUILD_TMPDIR )
mkdir -p $BUILD_TMPDIR/home
export TMPDIR=$BUILD_TMPDIR
export HOME=$BUILD_TMPDIR/home

exec </dev/null

mkdir -p $PREFIX
cat >$PREFIX/profile <<-EOF
PATH=$PREFIX/bin:\$PATH
if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} ; fi
EOF
. $PREFIX/profile

BUILDDIR=$PREFIX/build

mkdir -p $BUILDDIR
cd $BUILDDIR

AUDIODRIVERS=${AUDIODRIVERS:-alsa,oss,pa}
targets="--target-list=aarch64-linux-user,aarch64-softmmu,arm-linux-user,arm-softmmu,armeb-linux-user,i386-linux-user,i386-softmmu,ppc-linux-user,ppc-softmmu,ppc64-linux-user,ppc64-softmmu,x86_64-linux-user,x86_64-softmmu"

test -e qemu-${VERSION}.tar.xz || wget --no-verbose $URL
test -d qemu-$VERSION || tar -xf qemu-${VERSION}.tar.xz
cd qemu-$VERSION

./configure --prefix=${PREFIX} \
$targets \
--enable-system \
--enable-jemalloc \
--audio-drv-list=${AUDIODRIVERS} \
--enable-virtiofsd

make -j $(($(nproc)*4/5+1)) V=1
make install



exit

0 comments on commit 2bb1ee1

Please sign in to comment.