Skip to content

Commit

Permalink
Merge pull request #126 from mariux64/update-qemu-5.1.0
Browse files Browse the repository at this point in the history
Qemu: Add version 5.1.0
  • Loading branch information
pmenzel authored Sep 10, 2020
2 parents 83651c5 + 20aa93f commit b394d59
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions qemu-5.1.0-0.build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#! /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=5.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.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}

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

exit

0 comments on commit b394d59

Please sign in to comment.