From ecd846f34c90a7fbfcfd85bd553412fab917a113 Mon Sep 17 00:00:00 2001 From: Edward Koenig Date: Tue, 29 Apr 2014 08:55:57 +0700 Subject: [PATCH] system/qemu: Updated for version 2.0.0. Signed-off-by: Willy Sudiarto Raharjo --- system/qemu/README | 10 +++++++ system/qemu/qemu.SlackBuild | 59 +++++++++++++++++++++++++++---------- system/qemu/qemu.info | 6 ++-- 3 files changed, 57 insertions(+), 18 deletions(-) diff --git a/system/qemu/README b/system/qemu/README index b7fbe8ae26..57a463a867 100644 --- a/system/qemu/README +++ b/system/qemu/README @@ -14,6 +14,10 @@ for qemu; if you prefer to build all supported targets, do this: TARGETS=all ./qemu.SlackBuild +Add optional vnc support via: + + ENABLE_VNC=yes ./qemu.SlackBuild + We patch the installed udev rules to require membership in "users" group instead of a custom "kvm" group to uses /dev/kvm. If you prefer something different, then run the build script like this: @@ -27,3 +31,9 @@ to qemu-system-ARCH at /usr/bin/qemu-kvm. spice, usbredir, and device-tree-compiler are optional dependencies. If you wish to emulate ARM, you will want device-tree-compiler. + +NOTES: + This version breaks some backward compatibility with earlier versions. + Consult the official changelogs for details. + + To enable USB passthrough, you will need libusb >= 1.0.13 diff --git a/system/qemu/qemu.SlackBuild b/system/qemu/qemu.SlackBuild index 7db1e03ff8..7b90e754b0 100644 --- a/system/qemu/qemu.SlackBuild +++ b/system/qemu/qemu.SlackBuild @@ -3,7 +3,7 @@ # Slackware build script for qemu # Copyright 2009, 2010 Andrew Brouwers -# Copyright 2013 Edward Koenig, Vancouver, USA +# Copyright 2013, 2014 Edward Koenig, Vancouver, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -31,12 +31,18 @@ # add missing --libdir (patched in qemu-trivial upstream) # 1.2 22-SEP-2013 updated to 1.6 # 1.3 03-NOV-2013 updated to 1.6.1 +# 1.4 28-APR-2014 updated to 2.0.0 (thanks Callum Davies ), added useful options, +# clean ups, libusb version check. PRGNAM=qemu -VERSION=${VERSION:-1.6.1} +VERSION=${VERSION:-2.0.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +KVMGROUP=${KVMGROUP:-users} +TARGETS=${TARGETS:-some} +$VNC_ENABLE=${VNC_ENABLE:-no} + if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i486 ;; @@ -67,16 +73,6 @@ else LIBDIRSUFFIX="" fi -# Enable only x86* and arm emulation for qemu: if you want to build -# all the targets available use TARGETS=all -if [ "${TARGETS:-}" = "all" ]; then - targets="" -else - targets="--target-list=i386-softmmu,x86_64-softmmu,i386-linux-user,x86_64-linux-user,arm-softmmu,arm-linux-user,armeb-linux-user" -fi - -KVMGROUP=${KVMGROUP:-users} - # Needed to build man pages if built after plain "su" export PATH=$PATH:/usr/share/texmf/bin @@ -96,7 +92,30 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; # Remove double CFLAGS -sed -i "s|^\ \ CFLAGS=\"-O2\ | CFLAGS=\"|" configure || exit 1 +sed -i "s|^\ \ CFLAGS=\"-O2\ | CFLAGS=\"|" configure + +# Enable only x86* and arm emulation for qemu: if you want to build +# all the targets available use TARGETS=all +if [ "$TARGETS" = "all" ]; then + targets="" +else + targets="--target-list=i386-softmmu,x86_64-softmmu,i386-linux-user,x86_64-linux-user,arm-softmmu,arm-linux-user,armeb-linux-user" +fi + +# Optional VNC support for those who want it (adjust options as needed); use VNC_ENABLE=yes +if [ "$VNC_ENABLE" = "yes" ]; then + with_vnc="--enable-vnc --enable-vnc-tls --enable-vnc-jpeg" +else + with_vnc="--disable-vnc" +fi + +# Slackware-14.1 ships with an ancient libusb. Check for updates to enable. +if pkg-config --atleast-version=1.0.13 libusb-1.0 ; then + with_libusb="--enable-libusb" + echo +else + with_libusb="--disable-libusb" +fi # check if spice is there if pkg-config --exists spice-server ; then @@ -112,12 +131,11 @@ else with_usbredir="--disable-usb-redir" fi -# check if device-tree-compiler is installed +# check if device-tree-compiler is installed. Some targets need this so consider installing it from SBo. if ls /var/log/packages/device-tree-compiler-* 1>/dev/null 2>/dev/null ; then with_fdt="--enable-fdt" fi -# --libdir is recognized but not advertised in --help CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -131,12 +149,23 @@ CXXFLAGS="$SLKCFLAGS" \ --enable-system \ --enable-kvm \ --disable-debug-info \ + --enable-virtfs \ + --enable-sdl \ --audio-drv-list=alsa,oss,sdl,esd \ + $with_libusb \ + $with_vnc \ $targets \ $with_spice \ $with_usbredir \ $with_fdt +#usb passthrough may fail since Slackware's libusb is too old. +# other useful options: +# --enable-vde enable support for vde network +# --enable-libnfs enable nfs support +# --enable-vde enable support for vde network +# --enable-bluez enable bluez stack connectivity + make V=1 OS_CFLAGS="$SLKCFLAGS" make install DESTDIR=$PKG diff --git a/system/qemu/qemu.info b/system/qemu/qemu.info index 1bcd662e37..bb09be33f9 100644 --- a/system/qemu/qemu.info +++ b/system/qemu/qemu.info @@ -1,8 +1,8 @@ PRGNAM="qemu" -VERSION="1.6.1" +VERSION="2.0.0" HOMEPAGE="http://wiki.qemu.org/Main_Page" -DOWNLOAD="http://wiki.qemu.org/download/qemu-1.6.1.tar.bz2" -MD5SUM="3a897d722457c5a895cd6ac79a28fda0" +DOWNLOAD="http://wiki.qemu.org/download/qemu-2.0.0.tar.bz2" +MD5SUM="2790f44fd76da5de5024b4aafeb594c2" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES=""