--- qemu-0.9.1+svn20081112.orig/build-jaunty-20081123-2159.uJzmm8.log +++ qemu-0.9.1+svn20081112/build-jaunty-20081123-2159.uJzmm8.log @@ -0,0 +1,2 @@ +Invalid source: qemu_0.9.1+svn20081112-1ubuntu1.dsc +Skipping qemu --- qemu-0.9.1+svn20081112.orig/debian/copyright +++ qemu-0.9.1+svn20081112/debian/copyright @@ -0,0 +1,53 @@ +This package was debianized by Paul Russell on +Wed, 3 Mar 2004 02:18:54 +0100. + +Then maintained as part of the team by: + + Guilherme de S. Pastore + Elrond + Guillem Jover + +Now maintained as a team by: + + Aurelien Jarno + Josh Triplett + Riku Voipio + +The upstream source was downloaded from: + + + + All the binary blobs without sources contained in the pc-bios/ directory + in the original upstream tarball have been removed starting from Debian + package version 0.6.0.dfsg.1-1. Those roms which are free can be found + in split packages of their own, represented accordingly in the dependecy + relationships. + +Upstream Author: + + Fabrice Bellard + +Copyright: + + Copyright (C) 2003, 2004, 2005, 2006, 2007 Fabrice Bellard + +License: + + QEMU as a whole is released under the GNU General Public License. + On Debian systems, the complete text of the GNU General Public License + can be found in the file /usr/share/common-licenses/GPL. + + Parts of QEMU have specific licenses which are compatible with the + GNU General Public License. Hence each source file contains its own + licensing information. + + In particular, the QEMU virtual CPU core library (libqemu.a) is + released under the GNU Lesser General Public License. On Debian systems, + the complete text of the GNU Lesser General Public License can be found + in the file /usr/share/common-licenses/LGPL. + + Many hardware device emulation sources are released under the BSD license. + On Debian systems, the complete text of the BSD license be found in the + file /usr/share/common-licenses/BSD. + + --- qemu-0.9.1+svn20081112.orig/debian/libqemu-dev.dirs +++ qemu-0.9.1+svn20081112/debian/libqemu-dev.dirs @@ -0,0 +1,47 @@ +usr/include/qemu/audio/ +usr/include/qemu/fpu/ +usr/include/qemu/hw/ + +usr/include/qemu/target-alpha/ +usr/include/qemu/target-arm/ +usr/include/qemu/target-cris/ +usr/include/qemu/target-i386/ +usr/include/qemu/target-m68k/ +usr/include/qemu/target-mips/ +usr/include/qemu/target-ppc/ +usr/include/qemu/target-sh4/ +usr/include/qemu/target-sparc/ + +usr/include/qemu/arm-softmmu/ +usr/include/qemu/cris-softmmu/ +usr/include/qemu/i386-softmmu/ +usr/include/qemu/m68k-softmmu/ +usr/include/qemu/mips-softmmu/ +usr/include/qemu/mips64-softmmu/ +usr/include/qemu/mips64el-softmmu/ +usr/include/qemu/mipsel-softmmu/ +usr/include/qemu/ppc-softmmu/ +usr/include/qemu/ppc64-softmmu/ +usr/include/qemu/ppcemb-softmmu/ +usr/include/qemu/sh4-softmmu/ +usr/include/qemu/sh4eb-softmmu/ +usr/include/qemu/sparc-softmmu/ +usr/include/qemu/sparc64-softmmu/ +usr/include/qemu/x86_64-softmmu/ + +usr/lib/qemu/arm-softmmu/ +usr/lib/qemu/cris-softmmu/ +usr/lib/qemu/i386-softmmu/ +usr/lib/qemu/m68k-softmmu/ +usr/lib/qemu/mips-softmmu/ +usr/lib/qemu/mips64-softmmu/ +usr/lib/qemu/mips64el-softmmu/ +usr/lib/qemu/mipsel-softmmu/ +usr/lib/qemu/ppc-softmmu/ +usr/lib/qemu/ppc64-softmmu/ +usr/lib/qemu/ppcemb-softmmu/ +usr/lib/qemu/sh4-softmmu/ +usr/lib/qemu/sh4eb-softmmu/ +usr/lib/qemu/sparc-softmmu/ +usr/lib/qemu/sparc64-softmmu/ +usr/lib/qemu/x86_64-softmmu/ --- qemu-0.9.1+svn20081112.orig/debian/watch +++ qemu-0.9.1+svn20081112/debian/watch @@ -0,0 +1,3 @@ +version=3 + +http://bellard.org/qemu/download.html qemu-([\d.]*).tar.gz debian uupdate --- qemu-0.9.1+svn20081112.orig/debian/TODO +++ qemu-0.9.1+svn20081112/debian/TODO @@ -0,0 +1,9 @@ +Just a small list of things not to forget for any new (upstream) release: + +* Make sure it works with the BIOS files in testing or otherwise raise the + dependency versions + +* If adding support for a new (host, not guest) arch: + Make sure to add it to the gpm Build-Dep (if that arch has gpm of course) + until Bug#267174 is solved. + --- qemu-0.9.1+svn20081112.orig/debian/qemu-make-debian-root +++ qemu-0.9.1+svn20081112/debian/qemu-make-debian-root @@ -0,0 +1,155 @@ +#! /bin/sh +# +# $Id: qemu-make-debian-root 353 2008-10-16 20:28:22Z aurel32 $ +# +# Script to make a debian root image. +# + +set -e + +which uudecode >/dev/null || { + echo "error: missing sharutils package" >&2 + exit 1 +} + +which debootstrap >/dev/null || { + echo "error: missing debootstrap package" >&2 + exit 1 +} + +KEEPFS=0 +if [ "$1" = "-k" ] || [ "$2" = "-k" ]; then + KEEPFS=1 + shift +fi + +SPARSE=0 +if [ "$1" = "-s" ] || [ "$2" = "-s" ]; then + SPARSE=1 + shift +fi + +if [ $# -lt 4 ]; then + echo Usage: "$0 [-k] size-in-MB distrib deburl image [files_to_copy_in_/root]" >&2 + echo "eg $0 150 sid http://proxy:10000/debian qemu" >&2 + exit 1 +fi + +SIZE=$1 +DISTRO=$2 +URL=$3 +IMAGE=$4 +shift 4 + +# now files to copy are in "$@". We don't put them in a variable +# because that would coufuse spaces-in-filenames with +# whitespace-separation. + + +if [ $SIZE -lt 130 ]; then + echo 'Size must be at least 130 megabytes (Debian unstable takes 100)' >&2 + exit 1 +fi + +cleanup() +{ + echo Cleaning up... >&2 + umount -d $TMP_DIR || true + rm -f $IMAGE.ext2 $IMAGE +} + +trap cleanup EXIT + +HEADS=16 +SECTORS=63 +# 512 bytes in a sector: cancel the 512 with one of the 1024s... +CYLINDERS=$(( $SIZE * 1024 * 2 / ($HEADS * $SECTORS) )) + +# Create a filesystem: one track for partition table. +if [ "$SPARSE" = "1" ]; then + dd bs=$(($SECTORS * 512)) if=/dev/zero of=$IMAGE.ext2 count=1 seek=$(($CYLINDERS * $HEADS - 2)) +else + dd bs=$(($SECTORS * 512)) if=/dev/zero of=$IMAGE.ext2 count=$(($CYLINDERS * $HEADS - 1)) +fi + +mke2fs -q -m1 -F $IMAGE.ext2 + +TMP_DIR="$(mktemp -d /tmp/mount.XXXXXX)" || \ + { echo >&2 "Failed to create temporary directory"; exit 1; } + +# Mount it. +mount -o loop $IMAGE.ext2 $TMP_DIR + +# Do debian install on it. +#debootstrap --exclude=syslinux,at,exim,mailx,libstdc++2.10-glibc2.2,mbr,setserial,fdutils,info,ipchains,lilo,pcmcia-cs,ppp,pppoe,pppoeconf,pppconfig $DISTRO $TMP_DIR $URL +debootstrap --exclude=syslinux,at,exim,mailx,libstdc++2.10-glibc2.2,mbr,setserial,fdutils,info,ipchains,iptables,lilo,pcmcia-cs,ppp,pppoe,pppoeconf,pppconfig,wget,telnet,cron,logrotate,exim4,exim4-base,exim4-config,exim4-daemon-light,pciutils,modconf,tasksel $DISTRO $TMP_DIR $URL + +# Final configuration. +cat > $TMP_DIR/etc/fstab < $TMP_DIR/etc/inittab.new +mv $TMP_DIR/etc/inittab.new $TMP_DIR/etc/inittab + +# Set hostname to base of image name. +basename $IMAGE > $TMP_DIR/etc/hostname + +# Create /etc/shadow +chroot $TMP_DIR pwconv + +# Set root password to "root" +sed 's/^root:[^:]*/root:$1$aybpiIGf$cB7iFDNZvViQtQjEZ5HFQ0/' < $TMP_DIR/etc/shadow > $TMP_DIR/etc/shadow.new +mv $TMP_DIR/etc/shadow.new $TMP_DIR/etc/shadow + +# Remove packages we don't need +chroot $TMP_DIR /usr/bin/dpkg --remove console-common console-tools console-data base-config man-db manpages +# Try to remove all libraries: some won't be removable. +chroot $TMP_DIR dpkg --remove `chroot $TMP_DIR dpkg --get-selections | sed -n 's/^\(lib[^ \t]*\)[\t ]*install/\1/p'` 2>/dev/null || true + + +# Copy wanted files to /root if asked to +if [ $# -gt 0 ]; then + cp -a "$@" $TMP_DIR/root/ +fi +umount -d $TMP_DIR + +# Create file with partition table. +uudecode -o- << "EOF" | gunzip > $IMAGE +begin 664 partition-table.gz +M'XL("*_<##\"`W!A insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +qemu\-make\-debian\-root \- Create a debian root image for qemu +.SH SYNOPSIS +.B qemu\-make\-debian\-root +.RI [ -k "] " +.RI [ -s "] " +.I size-in-MiB distrib deburl image +.RI [ files-to-copy-in-/root ] +.SH DESCRIPTION +.B qemu\-make\-debian\-root +is a command to ease the creation of a debian root image for qemu. +The generated image is not bootable by itself, and an external kernel +is needed. It can be run with a command like: +.IP +.nf +.B qemu disk.img -kernel /boot/vmlinuz +.fi +.PP +.SH OPTIONS +.TP +.BR \-k +Keep file system. +.TP +.BR \-s +Create a sparse image. +.SH SEE ALSO +.BR qemu (1), +.BR qemu\-img (1). +.SH AUTHOR +This manual page was written by Guillem Jover . --- qemu-0.9.1+svn20081112.orig/debian/libqemu-dev.install +++ qemu-0.9.1+svn20081112/debian/libqemu-dev.install @@ -0,0 +1,14 @@ +*.h usr/include/qemu/ +audio/*.h usr/include/qemu/audio/ +fpu/*.h usr/include/qemu/fpu/ +hw/*.h usr/include/qemu/hw/ + +target-alpha/*.h usr/include/qemu/target-alpha/ +target-arm/*.h usr/include/qemu/target-arm +target-cris/*.h usr/include/qemu/target-cris +target-i386/*.h usr/include/qemu/target-i386 +target-m68k/*.h usr/include/qemu/target-m68k +target-mips/*.h usr/include/qemu/target-mips +target-ppc/*.h usr/include/qemu/target-ppc +target-sh4/*.h usr/include/qemu/target-sh4 +target-sparc/*.h usr/include/qemu/target-sparc --- qemu-0.9.1+svn20081112.orig/debian/qemu.install +++ qemu-0.9.1+svn20081112/debian/qemu.install @@ -0,0 +1,3 @@ +debian/qemu-ifup etc/ +debian/qemu-make-debian-root usr/sbin/ +debian/overrides/qemu usr/share/lintian/overrides/ --- qemu-0.9.1+svn20081112.orig/debian/tundev.c +++ qemu-0.9.1+svn20081112/debian/tundev.c @@ -0,0 +1,90 @@ +/* + * $Id: tundev.c 325 2008-08-09 21:39:16Z aurel32 $ + */ + +#define _GNU_SOURCE /* asprintf */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* Tiny code to open tap/tun device, and hand the fd to qemu. + Run as root, drops to given user. */ +int main(int argc, char *argv[]) +{ + struct ifreq ifr; + struct passwd *p; + unsigned int i; + char *newargs[argc + 1]; + int fd; + + if (argc < 4) { + fprintf(stderr, + "Usage: tundev user logfile qemu ...\n"); + exit(1); + } + + fd = open("/dev/net/tun", O_RDWR); + if (fd < 0) { + perror("Could not open /dev/net/tun"); + exit(1); + } + + memset(&ifr, 0, sizeof(ifr)); + ifr.ifr_flags = IFF_TAP | IFF_NO_PI; + strncpy(ifr.ifr_name, "tun%d", IFNAMSIZ); + if (ioctl(fd, TUNSETIFF, (void *) &ifr) != 0) { + perror("Could not get tun device"); + exit(1); + } + + /* Set userid. */ + p = getpwnam(argv[1]); + if (!p) { + fprintf(stderr, "No user '%s'\n", argv[1]); + exit(1); + } + setgroups(0, NULL); + setgid(p->pw_gid); + if (setuid(p->pw_uid) != 0) { + perror("setting uid"); + exit(1); + } + + /* Insert -tun-fd */ + newargs[0] = argv[3]; + newargs[1] = "-tun-fd"; + asprintf(&newargs[2], "%d", fd); + for (i = 4; i <= argc; i++) + newargs[i-1] = argv[i]; + + if (strcmp(argv[2], "-") == 0) { + execvp(newargs[0], newargs); + exit(1); + } + + switch (fork()) { + case 0: { + close(1); + close(2); + open(argv[2], O_WRONLY|O_APPEND); + open(argv[2], O_WRONLY|O_APPEND); + close(0); + execvp(newargs[0], newargs); + exit(1); + } + case -1: + perror("fork failed"); + exit(1); + } + printf("%s\n", ifr.ifr_name); + exit(0); +} --- qemu-0.9.1+svn20081112.orig/debian/qemu.links +++ qemu-0.9.1+svn20081112/debian/qemu.links @@ -0,0 +1,40 @@ +usr/share/man/man1/qemu-user.1 usr/share/man/man1/qemu-alpha.1 +usr/share/man/man1/qemu-user.1 usr/share/man/man1/qemu-cris.1 +usr/share/man/man1/qemu-user.1 usr/share/man/man1/qemu-arm.1 +usr/share/man/man1/qemu-user.1 usr/share/man/man1/qemu-armeb.1 +usr/share/man/man1/qemu-user.1 usr/share/man/man1/qemu-i386.1 +usr/share/man/man1/qemu-user.1 usr/share/man/man1/qemu-m68k.1 +usr/share/man/man1/qemu-user.1 usr/share/man/man1/qemu-mips.1 +usr/share/man/man1/qemu-user.1 usr/share/man/man1/qemu-mipsel.1 +usr/share/man/man1/qemu-user.1 usr/share/man/man1/qemu-ppc.1 +usr/share/man/man1/qemu-user.1 usr/share/man/man1/qemu-ppc64.1 +usr/share/man/man1/qemu-user.1 usr/share/man/man1/qemu-ppc64abi32.1 +usr/share/man/man1/qemu-user.1 usr/share/man/man1/qemu-sh4.1 +usr/share/man/man1/qemu-user.1 usr/share/man/man1/qemu-sh4eb.1 +usr/share/man/man1/qemu-user.1 usr/share/man/man1/qemu-sparc.1 +usr/share/man/man1/qemu-user.1 usr/share/man/man1/qemu-sparc32plus.1 +usr/share/man/man1/qemu-user.1 usr/share/man/man1/qemu-sparc64.1 +usr/share/man/man1/qemu-user.1 usr/share/man/man1/qemu-x86_64.1 +usr/share/man/man1/qemu.1 usr/share/man/man1/qemu-system-arm.1 +usr/share/man/man1/qemu.1 usr/share/man/man1/qemu-system-cris.1 +usr/share/man/man1/qemu.1 usr/share/man/man1/qemu-system-i386.1 +usr/share/man/man1/qemu.1 usr/share/man/man1/qemu-system-m68k.1 +usr/share/man/man1/qemu.1 usr/share/man/man1/qemu-system-mips.1 +usr/share/man/man1/qemu.1 usr/share/man/man1/qemu-system-mips64.1 +usr/share/man/man1/qemu.1 usr/share/man/man1/qemu-system-mips64el.1 +usr/share/man/man1/qemu.1 usr/share/man/man1/qemu-system-mipsel.1 +usr/share/man/man1/qemu.1 usr/share/man/man1/qemu-system-ppc.1 +usr/share/man/man1/qemu.1 usr/share/man/man1/qemu-system-ppc64.1 +usr/share/man/man1/qemu.1 usr/share/man/man1/qemu-system-ppcemb.1 +usr/share/man/man1/qemu.1 usr/share/man/man1/qemu-system-sh4.1 +usr/share/man/man1/qemu.1 usr/share/man/man1/qemu-system-sh4eb.1 +usr/share/man/man1/qemu.1 usr/share/man/man1/qemu-system-sparc.1 +usr/share/man/man1/qemu.1 usr/share/man/man1/qemu-system-sparc64.1 +usr/share/man/man1/qemu.1 usr/share/man/man1/qemu-system-x86_64.1 +usr/share/bochs/BIOS-qemu-latest usr/share/qemu/bios.bin +usr/share/vgabios/vgabios.bin usr/share/qemu/vgabios.bin +usr/share/vgabios/vgabios.cirrus.bin usr/share/qemu/vgabios-cirrus.bin +usr/share/proll/proll-qemu.elf usr/share/qemu/proll.elf +usr/share/openhackware/ppc_rom.bin usr/share/qemu/ppc_rom.bin +usr/share/openbios/openbios-sparc32 usr/share/qemu/openbios-sparc32 +usr/share/openbios/openbios-sparc64 usr/share/qemu/openbios-sparc64 --- qemu-0.9.1+svn20081112.orig/debian/compat +++ qemu-0.9.1+svn20081112/debian/compat @@ -0,0 +1 @@ +5 --- qemu-0.9.1+svn20081112.orig/debian/README.Debian +++ qemu-0.9.1+svn20081112/debian/README.Debian @@ -0,0 +1,25 @@ +qemu for Debian +--------------- + +The qemu debian package does not include the video.x file, which is +needed by qemu-system-ppc for some systems. The file is available from +the mac-on-linux project, and the sources are available on: + http://mac-on-linux.svn.sourceforge.net/viewvc/mac-on-linux/mac-drivers/video_driver/Makefile?revision=HEAD&view=markup + +They are not buildable on a Debian system though, hence video.x is not +present in the package. The qemu-system-ppc binary is still useful for +emulating a PReP platform, which does not need video.x. + + -- Aurelien Jarno Sun, 16 Mar 2008 19:17:39 +0100 + + +The qemu debian package includes a simple script called qemu-make-debian-root +under /usr/sbin, which uses debootstrap to create an image suitable for qemu +with a fresh Debian installation inside. + +If you just want a test system, not wanting to go through any installation +process, that might be just ideal. Take a look at the manual page +qemu-make-debian-root (8) for further usage instructions. + + -- Guilherme de S. Pastore , Sun May 15 09:49:11 2005 + --- qemu-0.9.1+svn20081112.orig/debian/qemu-user.1 +++ qemu-0.9.1+svn20081112/debian/qemu-user.1 @@ -0,0 +1,38 @@ +.\" $Id: qemu-user.1 325 2008-08-09 21:39:16Z aurel32 $ +.TH qemu\-user 1 2007-02-08 "0.9.0" Debian +.SH NAME +qemu\-user \- QEMU User Emulator +.SH SYNOPSIS +.B qemu\-user +.RI [ options ] +.I program +.RI [ program-arguments... ] +.SH DESCRIPTION +The +.B qemu\-user +emulator can run binaries for other architectures but with the same operating +system as the current one. +.SH OPTIONS +.TP +.BR \-h +Print this help. +.TP +.BR \-g +Wait gdb connection to port 1234. +.TP +.BR \-L " \fI\fP" +Set the elf interpreter prefix (default=\fI/usr/gnemul/qemu\-arm\fP). +.TP +.BR \-s " \fI\fP" +Set the stack size in bytes (default=\fI524288\fP). +.TP +.BR \-d " \fI\fP" +Activate log (logfile=\fI/tmp/qemu.log\fP) +.TP +.BR \-p " \fI\fP" +Set the host page size to 'pagesize'. +.SH SEE ALSO +.BR qemu (1), +.BR qemu\-img (1). +.SH AUTHOR +This manual page was written by Guillem Jover . --- qemu-0.9.1+svn20081112.orig/debian/qemu.dirs +++ qemu-0.9.1+svn20081112/debian/qemu.dirs @@ -0,0 +1 @@ +usr/share/qemu/ --- qemu-0.9.1+svn20081112.orig/debian/qemu.docs +++ qemu-0.9.1+svn20081112/debian/qemu.docs @@ -0,0 +1,4 @@ +README +TODO +qemu-doc.html +debian/tundev.c --- qemu-0.9.1+svn20081112.orig/debian/qemu-ifup +++ qemu-0.9.1+svn20081112/debian/qemu-ifup @@ -0,0 +1,2 @@ +#!/bin/sh +sudo -p "Password for $0:" /sbin/ifconfig $1 172.20.0.1 --- qemu-0.9.1+svn20081112.orig/debian/README.source +++ qemu-0.9.1+svn20081112/debian/README.source @@ -0,0 +1,57 @@ +This package uses quilt to manage all modifications to the upstream +source. Changes are stored in the source package as diffs in +debian/patches and applied during the build. + +To configure quilt to use debian/patches instead of patches, you want +either to export QUILT_PATCHES=debian/patches in your environment +or use this snippet in your ~/.quiltrc: + + for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do + if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then + export QUILT_PATCHES=debian/patches + fi + done + +To get the fully patched source after unpacking the source package, cd to +the root level of the source package and run: + + quilt push -a + +The last patch listed in debian/patches/series will become the current +patch. + +To add a new set of changes, first run quilt push -a, and then run: + + quilt new + +where is a descriptive name for the patch, used as the filename in +debian/patches. Then, for every file that will be modified by this patch, +run: + + quilt add + +before editing those files. You must tell quilt with quilt add what files +will be part of the patch before making changes or quilt will not work +properly. After editing the files, run: + + quilt refresh + +to save the results as a patch. + +Alternately, if you already have an external patch and you just want to +add it to the build system, run quilt push -a and then: + + quilt import -P /path/to/patch + quilt push -a + +(add -p 0 to quilt import if needed). as above is the filename to +use in debian/patches. The last quilt push -a will apply the patch to +make sure it works properly. + +To remove an existing patch from the list of patches that will be applied, +run: + + quilt delete + +You may need to run quilt pop -a to unapply patches first before running +this command. --- qemu-0.9.1+svn20081112.orig/debian/qemu.doc-base +++ qemu-0.9.1+svn20081112/debian/qemu.doc-base @@ -0,0 +1,12 @@ +Document: qemu-doc +Title: QEMU User Manual +Author: Fabrice Bellard +Abstract: The QEMU user manual intends to make the user understand what + qemu is/does, and to guide them through the first steps of getting + the emulator to work, documenting parameters and commands, among other + useful things. +Section: Emulators + +Format: HTML +Index: /usr/share/doc/qemu/qemu-doc.html +Files: /usr/share/doc/qemu/qemu-doc.html --- qemu-0.9.1+svn20081112.orig/debian/qemu.manpages +++ qemu-0.9.1+svn20081112/debian/qemu.manpages @@ -0,0 +1,2 @@ +debian/qemu-make-debian-root.8 +debian/qemu-user.1 --- qemu-0.9.1+svn20081112.orig/debian/rules +++ qemu-0.9.1+svn20081112/debian/rules @@ -0,0 +1,138 @@ +#!/usr/bin/make -f +# +# $Id: rules 348 2008-10-12 16:55:44Z aurel32 $ +# + +# WARNING: Removing no-strict-aliasing will make qemu insta-segfault. +CFLAGS = -Wall -g -fno-strict-aliasing + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +# Support multiple makes at once +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +NJOBS := -j $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +endif + +# Architecture/system specific configuration +DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH) +DEB_HOST_ARCH_OS = $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) +DEB_HOST_ARCH_CPU = $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) + +TARGET_SYSTEM_TCG = arm-softmmu cris-softmmu i386-softmmu m68k-softmmu mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu sh4-softmmu sh4eb-softmmu sparc-softmmu sparc64-softmmu x86_64-softmmu +TARGET_SYSTEM_DYNGEN = ppc-softmmu ppcemb-softmmu ppc64-softmmu +TARGET_LINUX_TCG = alpha-linux-user arm-linux-user armeb-linux-user cris-linux-user i386-linux-user m68k-linux-user mips-linux-user mipsel-linux-user sh4-linux-user sh4eb-linux-user sparc-linux-user sparc64-linux-user sparc32plus-linux-user x86_64-linux-user +TARGET_LINUX_DYNGEN = ppc-linux-user ppc64-linux-user ppc64abi32-linux-user + +target_system_list += $(TARGET_SYSTEM_TCG) + +ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 powerpc kfreebsd-i386)) + target_system_list += $(TARGET_SYSTEM_DYNGEN) +else + conf_arch += --cc=gcc --disable-gcc-check +endif + +ifeq ($(DEB_HOST_ARCH_OS),linux) + conf_arch += --audio-drv-list=oss,alsa,sdl,esd,pa + target_linux_list += $(TARGET_LINUX_TCG) +endif +ifeq ($(DEB_HOST_ARCH_OS),kfreebsd) + conf_arch += --audio-drv-list=oss,sdl,esd,pa +endif + +ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 powerpc)) + target_linux_list += $(TARGET_LINUX_DYNGEN) +endif + +ifeq ($(DEB_HOST_ARCH_CPU),i386) + conf_arch += --cpu=i386 +endif +ifeq ($(DEB_HOST_ARCH_CPU),sparc) + conf_arch += --cpu=sparc +endif + +include /usr/share/quilt/quilt.make + +qemu_docs = \ + qemu-doc.html \ + qemu-tech.html \ + qemu.1 \ + qemu-img.1 + +config-host.mak: configure + dh_testdir + + CFLAGS="$(CFLAGS)" ./configure \ + --prefix=/usr \ + --target-list="$(target_system_list) $(target_linux_list)" \ + $(conf_arch) + +setup-source: patch + $(MAKE) -f debian/rules config-host.mak + +build: setup-source + dh_testdir + + $(MAKE) $(NJOBS) + $(MAKE) -C pc-bios + +clean: unpatch + dh_testdir + dh_testroot + + [ ! -f config-host.mak ] || $(MAKE) distclean + + rm -f $(qemu_docs) + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs -a + + $(MAKE) DESTDIR=$(CURDIR)/debian/qemu install + + zcat /usr/share/etherboot/e1000-82540em.zrom.gz > $(CURDIR)/debian/qemu/usr/share/qemu/pxe-e1000.bin + zcat /usr/share/etherboot/rtl8029.zrom.gz > $(CURDIR)/debian/qemu/usr/share/qemu/pxe-ne2k_pci.bin + zcat /usr/share/etherboot/pcnet32.zrom.gz > $(CURDIR)/debian/qemu/usr/share/qemu/pxe-pcnet.bin + zcat /usr/share/etherboot/rtl8139.zrom.gz > $(CURDIR)/debian/qemu/usr/share/qemu/pxe-rtl8139.bin + + for target in $(target_system_list) ; do \ + cp $(CURDIR)/$$target/libqemu.a $(CURDIR)/debian/libqemu-dev/usr/lib/qemu/$$target/ ; \ + cp $(CURDIR)/$$target/*.h $(CURDIR)/debian/libqemu-dev/usr/include/qemu/$$target/ ; \ + done + +binary-indep: +# Nothing to do. + +binary-arch: install + dh_testdir + dh_testroot + dh_install -a + dh_installdebconf -a + dh_installdocs -a + dh_installexamples -a + dh_installlogrotate -a + dh_installman -a + dh_installinfo -a + dh_installchangelogs -a Changelog + dh_link -a + dh_strip -a + dh_compress -a + dh_fixperms -a + chmod a+x $(CURDIR)/debian/qemu/etc/qemu-ifup + dh_installdeb -a + dh_shlibdeps -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +binary: binary-indep binary-arch + +.PHONY: build clean binary-indep binary-arch binary install + --- qemu-0.9.1+svn20081112.orig/debian/control +++ qemu-0.9.1+svn20081112/debian/control @@ -0,0 +1,54 @@ +Source: qemu +Section: misc +Priority: optional +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Debian QEMU Team +Uploaders: Aurelien Jarno , Riku Voipio , + Josh Triplett +Build-Depends: debhelper (>= 5), quilt (>= 0.40), binutils (>= 2.16), nasm, + libx11-dev, libsdl1.2-dev (>> 1.2.1), libncurses5-dev, zlib1g-dev, + texi2html, sharutils, libgnutls-dev, libesd0-dev, libbrlapi-dev, etherboot, + libpulse-dev, gcc-3.4 [amd64 i386 powerpc kfreebsd-i386], + libvdeplug2-dev [!kfreebsd-i386 !kfreebsd-amd64], + libfreebsd-dev [kfreebsd-i386 kfreebsd-amd64], + libasound2-dev [!kfreebsd-i386 !kfreebsd-amd64], + libbluetooth-dev [!kfreebsd-i386 !kfreebsd-amd64], + libgpmg1-dev [amd64 arm armel hppa i386 powerpc sparc ppc64] +Standards-Version: 3.8.0 +Homepage: http://www.qemu.org/ +XS-Debian-Vcs-Browser: http://svn.debian.org/wsvn/pkg-qemu/ +XS-Debian-Vcs-Svn: svn://svn.debian.org/pkg-qemu/trunk/ + +Package: qemu +Architecture: amd64 arm armel hppa i386 powerpc sparc kfreebsd-i386 kfreebsd-amd64 ppc64 lpia +Depends: ${shlibs:Depends}, vgabios (>= 0.5a-1), bochsbios-qemu (>= 2.3.5-1ubuntu1) | bochsbios (>= 2.3.6-2ubuntu1), +Recommends: debootstrap, sharutils, vde2, proll, openhackware, openbios-sparc (>= 1.0~alpha2+20081109) +Suggests: sudo, samba, kqemu-source +Description: fast processor emulator + QEMU is a fast processor emulator: currently the package supports + ARM, CRIS, i386, M68k (ColdFire), MIPS, PowerPC, SH4, SPARc and x86-64 + emulation. By using dynamic translation it achieves reasonable speed + while being easy to port on new host CPUs. QEMU has two operating modes: + . + * User mode emulation: QEMU can launch Linux processes compiled for + one CPU on another CPU. + * Full system emulation: QEMU emulates a full system, including a + processor and various peripherals. It enables easier testing and + debugging of system code. It can also be used to provide virtual + hosting of several virtual PC on a single server. + . + As QEMU requires no host kernel patches to run, it is very safe and + easy to use. + +Package: libqemu-dev +Architecture: amd64 arm armel hppa i386 powerpc sparc kfreebsd-i386 kfreebsd-amd64 ppc64 +Section: libdevel +Depends: ${shlibs:Depends} +Description: static libraries and headers for QEMU + QEMU is a fast processor emulator: currently the package supports + ARM, CRIS, i386, M68k (ColdFire), MIPS, PowerPC, SH4, SPARc and x86-64 + emulation. By using dynamic translation it achieves reasonable speed + while being easy to port on new host CPUs. + . + This package provides header files and static libraries suitable to + emulate the various CPU supported by QEMU directly in an application. --- qemu-0.9.1+svn20081112.orig/debian/changelog +++ qemu-0.9.1+svn20081112/debian/changelog @@ -0,0 +1,1236 @@ +qemu (0.9.1+svn20081112-1ubuntu1) jaunty; urgency=low + + * Merge from debian unstable, remaining changes: + - debian/control: add lpia to the Architectures list; + move proll, openhackware, and openbios-sparc from Depends to Recommends + - debian/patches/91_vmdk_compat6_scsi: add support for scsi disks to + vmdk images + - debian/patches/95_evdev_keycode_map.patch: ported the + gtk-vnc patch that fixes evdev keycode mapping + + -- Soren Hansen Sun, 23 Nov 2008 21:55:46 +0100 + +qemu (0.9.1+svn20081112-1) experimental; urgency=low + + [ Aurelien Jarno ] + * New upstream snapshot. + - does not need a disk image anymore (Closes: bug#260935). + - 53_openbios_size.patch: drop (merged upstream). + - 90_security: update. + * debian/control: depend on openbios-sparc (>= 1.0~alpha2+20081109) + (Closes: bug#502411, bug#502414). + + -- Aurelien Jarno Sun, 09 Nov 2008 14:42:37 +0100 + +qemu (0.9.1+svn20081101-1) experimental; urgency=low + + [ Aurelien Jarno ] + * New upstream snapshot. + - fix a heap overflow in Cirrus emulation (CVE-2008-4539). + - 50_linuxbios_isa_bios_ram.patch: update. + - 90_security.patch: update. + + -- Aurelien Jarno Sat, 01 Nov 2008 09:26:45 +0100 + +qemu (0.9.1+svn20081023-1) experimental; urgency=low + + [ Aurelien Jarno ] + * New upstream snapshot. + - 12_signal_powerpc_support.patch: update. + - 50_linuxbios_isa_bios_ram.patch: update. + + -- Aurelien Jarno Thu, 23 Oct 2008 21:34:26 +0200 + +qemu (0.9.1+svn20081016-1) experimental; urgency=low + + [ Aurelien Jarno ] + * New upstream snapshot. + * patches/31_syscalls.patch: remove parts merged upstream. + * debian/qemu-make-debian-root: + - Fix bug introduced when fixing bug#496394 (Closes: bug#502325). + + -- Aurelien Jarno Mon, 13 Oct 2008 23:11:15 +0200 + +qemu (0.9.1+svn20081012-1) experimental; urgency=low + + [ Riku Voipio ] + * Add a bunch of patches from scratchbox + - 44_socklen_t_check work better with badbehavin net apps + - 48_signal_terminate make qemu binary terminate on signals as expected + - 49_null_checks don't bother some syscalls when null/zero is passed + + [ Aurelien Jarno ] + * New upstream snapshot. + - alpha is now a TCG target. + - comma has been added to sendkey (closes: bug#414342). + * patches/31_syscalls.patch: remove parts merged upstream. + * patches/39_syscall_fadvise64.patch: remove (merged upstream). + * patches/90_security.patch: remove parts merged upstream. + * debian/control: build-depends on libbluetooth-dev. + + -- Aurelien Jarno Sun, 12 Oct 2008 18:46:54 +0200 + +qemu (0.9.1+svn20080905-1) experimental; urgency=low + + * New upstream snapshot. + - SH4 is now a TCG target. + * debian/watch: update URL location. + + -- Aurelien Jarno Tue, 02 Sep 2008 01:43:24 +0200 + +qemu (0.9.1+svn20080826-1) experimental; urgency=low + + * New upstream snapshot. + * debian/qemu-make-debian-root: + - Use mktemp instead of $$ to create temporary directories (Closes: + bug#496394). + * Ship a libqemu-dev package (Closes: bug#451618). + + -- Aurelien Jarno Tue, 26 Aug 2008 09:55:36 +0200 + +qemu (0.9.1+svn20080822-1) experimental; urgency=low + + * New upstream snapshot. + - Focus to monitor to ask password (Closes: bug#473240). + - TCG SPARC host support (Closes: bug#450817). + - Check KQEMU availability before allocating memory (Closes: bug#414566). + - Fix dead keys (Closes: bug#489594). + - Fix ES1370 emulation (Closes: bug#494462). + - New USB UHCI implemnation (Closes: bug#457651). + - Add debian/patches/00_bios.patch. + - Remove debian/patches/02_snapshot_use_tmpdir.patch (merged). + - Remove debian/patches/04_do_not_print_rtc_freq_if_ok.patch (merged). + - Remove patches/05_non-fatal_if_linux_hd_missing.patch (merged). + - Update debian/patches/07_i386_exec_name.patch + - Update debian/patches/12_signal_powerpc_support.patch + - Remove debian/patches/33_syscall_ppc_clone.patch (merged differently). + - Remove debian/patches/41_arm_fpa_sigfpe.patch (merged). + - Remove debian/patches/42_arm_tls.patch (merged differently). + - Update debian/patches/55_unmux_socketcall.patch. + - Remove debian/patches/63_sparc_build.patch (useless). + - Update debian/patches/65_kfreebsd.patch. + - Update debian/patches/66_tls_ld.patch. + - Remove debian/patches/70_manpage.patch (merged). + - Remove debian/patches/71_doc.patch (merged). + - Remove debian/patches/80_ui_curses.patch (merged). + - Remove debian/patches/81_mips32r2_fpu.patch (merged). + - Remove debian/patches/82_mips_abs.patch (merged). + - Remove debian/patches/83_usb-serial.patch (merged). + - Remove debian/patches/84_rtl8139.patch (merged). + - Remove debian/patches/85_vvfat.patch (merged). + - Remove debian/patches/86_df.patch (merged). + - Remove debian/patches/87_eoi.patch (merged). + - Remove debian/patches/88_dma.patch (merged). + - Remove debian/patches/89_braille.patch (merged). + - Remove debian/patches/92_no_shutdown.patch (merged). + - Remove debian/patches/93_tmpfs.patch (merged). + - Remove debian/patches/94_security.patch (merged). + * debian/README.source: new file. + * debian/patches/*: convert to patchlevel 1 (Closes: bug#484963). + * debian/control: + - Add build-depends on libesd0-dev. + - Add build-depends on libpulse-dev. + - Add build-depends on libvdeplug2-dev. + - Add build-depends on etherboot. + - Update list of supported targets (Closes: bug#488339). + - Suggests kqemu-source. + - Bump Standards-Version to 3.8.0. + * debian/links: + - Add missing manpage symlinks. + * debian/rules: + - Enable audio drivers depending on the system. + - Enable DYNGEN targets depending on the system. + - Install PXE bios from etherboot (Closes: bug#412010). + - Don't ignore make clean errors. + - Don't build DYNGEN targets on kfreebsd-amd64 (Closes: bug#494353). + * debian/patches/22_net_tuntap_stall.patch: remove (outdated). + + -- Aurelien Jarno Fri, 22 Aug 2008 01:00:54 +0200 + +qemu (0.9.1-7ubuntu1) jaunty; urgency=low + + * Merge from debian unstable, remaining changes: + - debian/control: add lpia to the Architectures list; + move proll, openhackware, and openbios-sparc from Depends to Recommends + - debian/patches/91_vmdk_compat6_scsi: add support for multiple + compatiblity levels and scsi disks to vmdk images + - debian/patches/95_evdev_keycode_map.patch: ported the + gtk-vnc patch that fixes evdev keycode mapping + - debian/patches/96_dirent.patch: fix FTBFS error, including the wrong + dirent.h, matches qemu SVN + + -- Dustin Kirkland Thu, 20 Nov 2008 18:10:36 -0600 + +qemu (0.9.1-5ubuntu3) intrepid; urgency=low + + * debian/patches/95_evdev_keycode_map.patch: ported the + gtk-vnc patch that fixes evdev keycode mapping (LP: #258389) + * debian/patches/96_dirent.patch: fix FTBFS error, including the wrong + dirent.h, matches qemu SVN + * debian/patches/series: added 95_evdev_keycode_map.patch and + 96_dirent.patch + + -- Dustin Kirkland Wed, 24 Sep 2008 20:00:59 -0500 + +qemu (0.9.1-5ubuntu2) intrepid; urgency=low + + * Added lpia to the Architectures list (LP: #232062) + + -- Emmet Hikory Mon, 11 Aug 2008 13:01:16 +0900 + +qemu (0.9.1-5ubuntu1) intrepid; urgency=low + + * Merge from debian unstable, remaining changes: + - debian/control: + + Depend on bochsbios-qemu >= 2.3.5-1ubuntu1 or bochsbios >= + 2.3.6-2ubuntu1 to get the proper BIOS image. + + Move proll, openhackware, and openbios-sparc from Depends to Recommends + + Add support for generating SCSI vmdk images. + * Rename Vcs-* to XS-Debian-Vcs-* + + -- Nicolas Valcárcel Wed, 23 Jul 2008 02:32:58 -0500 + +qemu (0.9.1-5) unstable; urgency=high + + [ Guillem Jover ] + * Add Homepage field. + * Add Vcs-Browser and Vcs-Svn fields. + * Remove packaging repository information from debian/copyright. + * Add former package co-maintainers to debian/copyright. + * Serialize patch and configure steps in debian/rules to support parallel + builds, as we are patching configure. + * Remove myself from Uploaders. + + [ Aurelien Jarno ] + * debian/patches/70_manpage.patch: remove curses documentation, it is already + in debian/patches/80_ui_curses.patch (Closes: bug#477369). + * debian/patches/94_security.patch: add format= to drive options + (CVE-2008-2004). + + -- Aurelien Jarno Mon, 28 Apr 2008 21:54:12 +0200 + +qemu (0.9.1-4) unstable; urgency=high + + * debian/patches/52_ne2000_return.patch: drop, the patch is wrong. + * Backports from upstream: + - Typo in curses_keys.h + - Documentation for the -curses option + - Fix broken absoluteness check for cabs.d.*. + - USB-to-serial device. + - rtl8139: fix endianness on big endian targets + - restore rw support for vvfat + - x86-64: recompute DF after eflags has been modified when emulating + SYSCALL + - ignore reads to the EOI register + - IDE: Improve DMA transfers by increasing the buffer size + - Braille device support + - Add -no-shutdown option (Closes: #326406) + - Ask to use "mount -o remount" instead of "umount" and "mount" + /dev/shm (Closes: #476539). + * debian/qemu.doc-base: fix section. + + -- Aurelien Jarno Sun, 20 Apr 2008 23:29:42 +0200 + +qemu (0.9.1-3) unstable; urgency=low + + [ Aurelien Jarno ] + * debian/patches/42_arm_tls.patch: fix to get qemu-system-arm working + again. (Closes: #471722). + * debian/patches/56_dhcp.patch: fix DHCP server to correctly support + MS-Windows guests. (Closes: #471452). + + -- Aurelien Jarno Wed, 19 Mar 2008 18:58:29 +0100 + +qemu (0.9.1-2) unstable; urgency=low + + [ Aurelien Jarno ] + * debian/patches/80_ui_curses.patch: pull new patch from upstream CVS + (Closes: #442274). + * debian/patches/65_kfreebsd.patch: link with -lfreebsd. (Closes: + #465932). + * debian/patches/81_mips32r2_fpu.patch: patch pulled from upstream + to fix FPU issue on MIPS32R2. + * debian/patches/42_arm_tls.patch: reenable, mistakenly disabled in the + previous upload. (Closes: #469743). + * debian/rules: fix parallel building. (Closes: #469981). + * debian/patches/07_i386_exec_name.patch: install the i386 emulator as + qemu-system-i386, and change qemu into a link pointing to the i386 + version. + * debian/README.Debian: add notes about qemu-system-ppc and video.x + (Closes: #388735). + * debian/patches/70_manpage.patch: describe the -curses option. + (Closes: #433658). + * debian/patches/71_doc.patch: fix the monitor change option. (Closes: + #467106). + * debian/patches/35_syscall_sockaddr.patch: fix sockaddr (Closes: + #469351). + * debian/patches/43_arm_cpustate.patch: disable (Closes: #444171). + + -- Aurelien Jarno Mon, 17 Mar 2008 01:29:03 +0100 + +qemu (0.9.1-1ubuntu1) hardy; urgency=low + + * Merge from debian unstable (LP: #190681), remaining changes: + - debian/control: + + Depend on bochsbios-qemu >= 2.3.5-1ubuntu1 or bochsbios >= + 2.3.6-2ubuntu1 to get the proper BIOS image. + + Move proll, openhackware, and openbios-sparc from Depends to Recommends. + + Add support for generating SCSI vmdk images. + + DebianMaintainerField. + + -- Soren Hansen Wed, 13 Feb 2008 02:13:56 +0100 + +qemu (0.9.1-1) unstable; urgency=low + + [ Aurelien Jarno ] + * New upstream version. (Closes: #459801) + - Supports s390 host. (Closes: #441119) + - Fix PCI bar allocation. (Closes: #413315) + - Fix typo in keys name. (Closes: #426181) + - Fix segfault of qemu-i386 (Closes: #446868). + - debian/control: bump depends on openbios-sparc to + >= 1.0~alpha2+20080106. + - debian/patches/02_snapshot_use_tmpdir.patch: Refreshed. + - debian/patches/04_do_not_print_rtc_freq_if_ok.patch: Likewise. + - debian/patches/05_non-fatal_if_linux_hd_missing.patch: Likewise. + - debian/patches/06_exit_segfault.patch: Likewise. + - debian/patches/10_signal_jobs.patch: Likewise. + - debian/patches/11_signal_sigaction.patch: Likewise. + - debian/patches/12_signal_powerpc_support.patch: Likewise. + - debian/patches/21_net_soopts.patch: Likewise. + - debian/patches/30_syscall_ipc.patch: Likewise. + - debian/patches/31_syscalls.patch: Likewise. + - debian/patches/32_syscall_sysctl.patch: Likewise. + - debian/patches/33_syscall_ppc_clone.patch: Likewise. + - debian/patches/35_syscall_sockaddr.patch: Likewise. + - debian/patches/41_arm_fpa_sigfpe.patch: Likewise. + - debian/patches/42_arm_tls.patch: Likewise. + - debian/patches/50_linuxbios_isa_bios_ram.patch: Likewise + - debian/patches/51_linuxbios_piix_ram_size.patch: Likewise + - debian/patches/61_safe_64bit_int.patch: Removed, merged upstream. + - debian/patches/63_sparc_build.patch: Refreshed. + - debian/patches/80_ui_curses.patch: Likewise. + * debian/patches/90_security.patch: fix 64-bit overflow. (Closes: + #425634) + * debian/qemu-make-debian-root: add a -s option to create sparse + image. (Closes: #322325) + * debian/control: bump depends on bochsbios to >= 2.3.5-1. Use + BIOS-qemu-latest instead of BIOS-bochs-latest. (Closes: #402289, + #442822) + * debian/rules: build the non-dyngen part with default gcc. + * debian/rules: support DEB_BUILD_OPTIONS="parallel=n". + * debian/patches/70_manpage.patch: describe the arguments of the + -usbdevice option in the manpage. (Closes: #443801) + * debian/control: now using Standards-Version 3.7.3 (no changes needed). + * debian/control: build-depends on libgnutls-dev to enable TLS support + in VNC. + * debian/patches/01_nostrip.patch: don't strip binaries during make + install. (Closes: #437866) + * debian/patches/53_openbios_size.patch: increase maximum prom size to + support latest openbios. + + -- Aurelien Jarno Mon, 28 Jan 2008 21:24:14 +0100 + +qemu (0.9.0+20070816-1ubuntu3) hardy; urgency=low + + * Updated bios symlink to match new bochsbios-qemu package. + * Added versioned dependency on bochsbios-qemu to make sure the + image has been renamed. + + -- Soren Hansen Mon, 10 Dec 2007 12:35:43 +0100 + +qemu (0.9.0+20070816-1ubuntu2) hardy; urgency=low + + * Use new qemu specific bios from bochsbios. (LP: #123185) + + -- Soren Hansen Fri, 23 Nov 2007 17:27:03 +0100 + +qemu (0.9.0+20070816-1ubuntu1) hardy; urgency=low + + * Merge from debian unstable, remaining changes: + - debian/patches/91_vmdk_compat6_scsi: + + Add support for multiple compatiblity levels and scsi disks to + vmdk images. + - debian/control: + + Move proll and openhackware from Depends to Recommends. + * Move openbios-sparc from Depends to Recommends. + + -- Soren Hansen Mon, 22 Oct 2007 17:07:29 +0200 + +qemu (0.9.0+20070816-1) unstable; urgency=low + + [ Guillem Jover ] + * New upstream snapshot. + - Fix hang on ARM during Etch installation. (Closes: #430164) + - Fix data corruption with qcow 2. (Closes: #440296) + - Fix errors with raw images > 4 GiB. (Closes: #425634) + - debian/patches/01_typo_qemu-img.patch: Removed, merged upstream. + - debian/patches/03_machines_list_no_error.patch: Likewise. + - debian/patches/36_syscall_prctl.patch: Likewise. + - debian/patches/37_syscall_mount.patch: Likewise. + - debian/patches/38_syscall_semctl.patch: Likewise. + - debian/patches/40_sparc_fp_to_int.patch: Likewise. + - debian/patches/44_arm_eabi_built_on_64bit_arches.patch: Likewise. + - debian/patches/62_linux_boot_nasm.patch: Likewise. + - debian/patches/04_do_not_print_rtc_freq_if_ok.patch: Synced. + - debian/patches/05_non-fatal_if_linux_hd_missing.patch: Likewise. + - debian/patches/31_syscalls.patch: Likewise. + - debian/patches/35_syscall_sockaddr.patch: Likewise. + - debian/patches/42_arm_tls.patch: Likewise. + - debian/patches/43_arm_cpustate.patch: Likewise. + - debian/patches/51_linuxbios_piix_ram_size.patch: Likewise. + - debian/patches/55_unmux_socketcall.patch: Likewise. + - debian/patches/60_ppc_ld.patch: Likewise. + - debian/patches/65_kfreebsd.patch: Likewise. + - debian/patches/80_ui_curses.patch: Likewise. + - debian/patches/90_security.patch: Likewise. + * Remove Elrond and Guilherme de S. Pastore from Uploaders, with their + permission, and add Aurelien Jarno and Riku Voipio. + * Remove Tag field, this is better maintained outside of the package. + * Add openbios-sparc64 to qemu_bios_files in debian/rules. + + [ Aurelien Jarno ] + * Fix FTBFS on amd64. (Closes: #434296) + - Drop debian/patches/34_syscalls_types.patch + * debian/control: + - Suggest samba. (Closes: #430368) + * Add OpenBIOS for sparc. (Closes: #407076) + - debian/control: depends on openbios-sparc. + - debian/links: provide symlinks in /usr/share/qemu. + + -- Guillem Jover Tue, 04 Sep 2007 04:04:47 +0300 + +qemu (0.9.0-2ubuntu4) gutsy; urgency=low + + * Renamed debian/patches/91_compat6.patch to + debian/patches/91_vmdk_compat6_scsi.patch and added support for creating + SCSI type vmdk images. + + -- Soren Hansen Tue, 25 Sep 2007 11:15:26 +0200 + +qemu (0.9.0-2ubuntu3) gutsy; urgency=low + + * Fix typo in debian/patches/91_compat6.patch that broke qemu-img convert. + + -- Soren Hansen Fri, 21 Sep 2007 19:54:32 +0200 + +qemu (0.9.0-2ubuntu2) gutsy; urgency=low + + * debian/patches/91_compat6.patch: + - Add support for VMWare Workstation 6 virtual disks. + + -- Soren Hansen Fri, 14 Sep 2007 10:44:05 +0200 + +qemu (0.9.0-2ubuntu1) gutsy; urgency=low + + * Merge from Debian unstable. Remaining Ubuntu changes: + - Remove 34_syscalls_types.patch from debian/patches/series: add an + unnecessary kernel header breaking compilation of linux-user/syscall.c. + - Move proll and openhackware from Depends to Recommends. + + -- Andrea Veri Mon, 21 May 2007 04:24:55 +0200 + +qemu (0.9.0-2) unstable; urgency=high + + [ Guillem Jover ] + * Fix several security issues. (Closes: #424070) + Thanks to Tavis Ormandy . + - Cirrus LGD-54XX "bitblt" heap overflow. CVE-2007-1320 + - NE2000 "mtu" heap overflow. + - QEMU "net socket" heap overflow. + - QEMU NE2000 "receive" integer signedness error. CVE-2007-1321 + - Infinite loop in the emulated SB16 device. + - Unprivileged "aam" instruction does not correctly handle the + undocumented divisor operand. CVE-2007-1322 + - Unprivileged "icebp" instruction will halt emulation. CVE-2007-1322 + - debian/patches/90_security.patch: New file. + * Enable adlib audio emulation. (Closes: #419170) + * Fix structure padding for target_eabi_flock64 when built for a 64 bit + architecture. (Closes: #414799) + Thanks to Stuart Anderson . + - debian/patches/44_arm_eabi_built_on_64bit_arches.patch: New file. + * Fix qemu to be able to use LinuxBios. (Closes: #412212) + Thanks to Ed Swierk . + - debian/patches/50_linuxbios_isa_bios_ram.patch: New file. + - 51_linuxbios_piix_ram_size.patch: Likewise. + * Fix segfault when booting a Linux kernel w/o a disk image, by exiting but + clarifying the message, as to use '/dev/null'. (Closes: #409817, #411780) + Thanks to Robert Millan . + - debian/patches/05_non-fatal_if_linux_hd_missing.patch: Updated. + * Fix segfault by using addrlen instead of target_addrlen in + do_getpeername()/do_getsockname(). (Closes: #411910) + Thanks to Stuart Anderson . + - debian/patches/35_syscall_sockaddr.patch: Updated. + * Fix semctl() for 32 bit targets on 64 bit hosts. (Closes: #414809) + Thanks to Stuart Anderson . + - debian/patches/38_syscall_semctl.patch: New file. + * Remove Elrond from Uploaders with consent, always welcome to join + back anytime. + + -- Guillem Jover Wed, 16 May 2007 08:08:31 +0300 + +qemu (0.9.0-1ubuntu1) gutsy; urgency=low + + * merged from Debian/experimental + * Merge from debian unstable, remaining changes: + - Remove 34_syscalls_types.patch from debian/patches/series: add an + unnecessary kernel header breaking compilation of linux-user/syscall.c. + - Move proll and openhackware from Depends to Recommends. + - set Maintainer field to MOTU + + -- Michael Vogt Wed, 2 May 2007 11:55:16 +0200 + +qemu (0.9.0-1) experimental; urgency=low + + [ Guillem Jover ] + * New upstream release. (Closes: #409989) + - Support for relative paths in backing files for disk images. + (Closes: #390446) + - debian/patches/01_doc_typos.patch: Removed, merged upstream. + - debian/patches/38_syscall_arm_statfs64.patch: Likewise. + - debian/patches/51_serial_small_divider.patch: Likewise. + - debian/patches/67_ppc_ftbfs.patch: Likewise. + - debian/patches/21_net_soopts.patch: Synced. + - debian/patches/30_syscall_ipc.patch: Likewise. + - debian/patches/31_syscalls.patch: Likewise. + - debian/patches/35_syscall_sockaddr.patch: Likewise. + - debian/patches/39_syscall_fadvise64.patch: Likewise. + - debian/patches/42_arm_tls.patch: Likewise. + - debian/patches/55_unmux_socketcall.patch: Likewise. + - debian/patches/80_ui_curses.patch: Likewise. + * Update the copyright information. + * The ACPI initialization code has been moved to bochsbios. + - debian/patches/acpi-dsdt.hex: Removed. + - debian/rules: Do not install acpi-dsdt.hex. + * Add more files to the list of roms removed from the tarball needed to + be touched so that upstream 'make install' does not fail. + * Added armeb and armel to Architecture fields and libgpmg1-dev + Build-Depends. + * Recommend vde2 instead of the transitional vde package. (Closes: #407251) + * Fix typo in qemu-img output. (Closes: #408542) + - debian/patches/01_typo_qemu-img.patch: New file. + Thanks to Adam Buchbinder . + * Symlink qemu-user(1) to qemu-m68k(1). + * Reduce redundancy in qemu-user(1) synopsis. + * Fix rounding in sparc floating point to integer conversions. + - debian/patches/40_sparc_fp_to_int.patch: New file. + Thanks to Aurelien Jarno . + + -- Guillem Jover Thu, 8 Feb 2007 01:01:29 +0200 + +qemu (0.8.2+dfsg-0ubuntu1) feisty; urgency=low + + * Bump package version number to +dfsg-0ubuntu1 to get rid of binary blobs + that were left in the orig tarball with 0.8.2-0ubuntu1. + * Merge from debian unstable, remaining changes: + - 90_no_linux_compiler_h.patch: remove unnecessary kernel header + breaking compilation of linux-usb.c. + - Remove 34_syscalls_types.patch from debian/patches/series: add an + unnecessary kernel header breaking compilation of linux-user/syscall.c. + - Move proll and openhackware from Depends to Recommends. + + -- Jeremie Corbier Mon, 22 Jan 2007 17:27:33 -0800 + +qemu (0.8.2-5) unstable; urgency=low + + [ Guillem Jover ] + * Added a missing part to the ARM NPTL support patch, initially lost. + - debian/patches/42_arm_tls.patch: Updated. + + -- Guillem Jover Tue, 16 Jan 2007 11:44:00 +0200 + +qemu (0.8.2-4ubuntu1) feisty; urgency=low + + * Merge from debian unstable, remaining changes: + - 90_no_linux_compiler_h.patch: remove unnecessary kernel header + breaking compilation of linux-usb.c. + - Remove 34_syscalls_types.patch from debian/patches/series: add an + unnecessary kernel header breaking compilation of linux-user/syscall.c. + - Move proll and openhackware from Depends to Recommends. + + -- Jeremie Corbier Fri, 22 Dec 2006 12:06:33 -0800 + +qemu (0.8.2-4) unstable; urgency=medium + + [ Guillem Jover ] + * Disable using iasl for now until it's ported to big-endian systems and + include a locally built acpi-dsdt.hex file. + + -- Guillem Jover Sun, 3 Dec 2006 21:10:23 +0200 + +qemu (0.8.2-3) unstable; urgency=low + + [ Guillem Jover ] + * Hopefully really fix powerpc FTBFS. + + -- Guillem Jover Sun, 5 Nov 2006 17:09:53 +0200 + +qemu (0.8.2-2) unstable; urgency=low + + [ Guillem Jover ] + * Update Tag field to match new debtags vocabulary. + * Clean properly. (Closes: #390166) + - Remove the acpi generated files and the docs. + - Revert the docs regeneration forcing logic. + Thanks to Anderson Lizardo . + * On install use DESTDIR instead of specifying all paths. (Closes: #396139) + Thanks to Anderson Lizardo . + * Port to GNU/kFreeBSD. (Closes: #327622) + - Disable ALSA on non-linux systems. + - Add a Build-Depends on libfreebsd-dev on kfreebsd systems. + - Add kfreebsd-i386 and kfreebsd-amd64 to the Architecture field. + - debian/patches/65_kfreebsd.patch: New file. + Thanks Petr Salinger . + * In qemu-make-debian-root do not explicitely install in aptitude and + libsigc++-1.2-5c102, they are pulled now by default. And do not remove + aptitude afterwards. (Closes: #392481) + Thanks to Ted Percival . + * Add experimental ncurses ui support. (Closes: #369462) + - debian/patches/80_ui_curses.patch: New file. + Thanks to Andrzej Zaborowski . + * Add SO_PEERCRED and SO_SNDTIMEO support, and fix accept syscall when + being passed NULL pointers. + - debian/patches/21_net_sockopts.patch: Renamed to ... + - debian/patches/21_net_soopts.patch: ... here. Modify. + Thanks to Pablo Virolainen. + * Add a fadvise64 syscall stub. + - debian/patches/39_syscall_fadvise64.patch: New file. + Thanks to Pablo Virolainen. + * Add EABI unmuxed socket syscalls. + - debian/patches/55_unmux_socketcall.patch: New file. + Thanks to Riku Voipio. + * Add TLS sections to the ARM and x86 linker scripts so that qemu user + emulators can be linked statically. + - debian/patches/66_tls_ld.patch: New file. + * Move the documentation of the binary blob removals from the original + upstream tarball from README.Debian to debian/copyright. + * Reword the emphasis on "FAST!" from the package description. + * Fix FTBFS on powerpc by adding the missing fp_status variable to the + int32_to_float32 function calls. + - debian/patches/67_ppc_ftbfs.patch: New file. + + -- Guillem Jover Sun, 5 Nov 2006 08:48:27 +0200 + +qemu (0.8.2-1) unstable; urgency=low + + [ Guillem Jover ] + * New upstream release. (Closes: #379461, #385029, #388810) + - Add ACPI BIOS emulation support. (Closes: #372533) + - Fix mouse invisible wall when using Windows XP. (Closes: #384666) + - debian/patches/01_doc_typos.patch: Sync. + - debian/patches/03_machines_list_no_error.patch: Likewise. + - debian/patches/04_do_not_print_rtc_freq_if_ok.patch: Likewise. + - debian/patches/05_non-fatal_if_linux_hd_missing.patch: Likewise. + - debian/patches/06_exit_segfault.patch: Likewise. + - debian/patches/12_signal_powerpc_support.patch: Likewise. + - debian/patches/21_net_sockopt.patch: Likewise. + - debian/patches/22_net_tuntap_stall.patch: Likewise. + - debian/patches/30_syscall_ipc.patch: Likewise. + - debian/patches/31_syscalls.patch: Likewise. + - debian/patches/32_syscall_sysctl.patch: Likewise. + - debian/patches/33_syscall_ppc_clone.patch: Likewise. + - debian/patches/35_syscall_sockaddr.patch: Likewise. + - debian/patches/36_syscall_prctl.patch: Likewise. + - debian/patches/37_syscall_mount.patch: Likewise. + - debian/patches/41_arm_fpa_sigfpe.patch: Likewise. + - debian/patches/42_arm_tls.patch: Likewise. + - debian/patches/61_safe_64bit_int.patch: Likewise. + - debian/patches/63_sparc_build.patch: Likewise. + - debian/patches/50_missing_keycodes.patch: Removed, integrated upstream. + * Switch to quilt: + - debian/control: Add quilt (>= 0.40) to Build-Depends. + - debian/patches/series: New file. + - debian/patch.mk: Removed. + - debian/rules: Include '/usr/share/quilt/quilt.make' instead of + 'debian/patch.mk'. + * Build the ACPI Source Language files with iasl. + * Add a Tag field to the binary package, using data from debtags. + * Add 2006 to the debian/copyright years. + * Add a Recommends on vde. (Closes: #386780) + * Fix spelling error in package description (peripherials -> peripherals). + (Closes: #388700) + Thanks to Rakesh 'arky' Ambati . + * Fix ne2000_can_receive return code to 0 when the command is STOP. + (Closes: #386209) + - debian/patches/52_ne2000_return.patch: New file. + Thanks to Samuel Thibault . + * Document the binary blob removals from the original upstream tarball in + README.Debian. (Closes: #388740) + + -- Guillem Jover Mon, 25 Sep 2006 04:16:25 +0300 + +qemu (0.8.2-0ubuntu1) edgy; urgency=low + + * Merged with Debian unstable + * New Upstream release + * Dropped debian/patches/12_signal_powerpc_support.patch (broken for qemu + 0.8.2) + * Redid debian/patches/21_net_sockopt.patch + * Redid debian/patches/35_syscall_sockaddr.patch + * Redid debian/patches/42_arm_tls.patch + * Dropped debian/patches/50_missing_keycodes.patch (applied upstream) + * Redid debian/patches/61_safe_64bit_int.patch + * Dropped debian/patches/63_sparc_build.patch (applied upstream) + * Added new patch 65_no-linux_types_h.patch (unnecessary kernel header + breaking compilation of linux-user/syscall.c) + * Added new patch 66_no-linux_compiler_h.patch (unnecessary kernel header + breaking compilation of linux-usb.c) + + -- Rodrigo Parra Novo Fri, 4 Aug 2006 22:50:15 -0300 + +qemu (0.8.1-1) unstable; urgency=low + + [ Guillem Jover ] + * New upstream release. (Closes: #366955, #366637) + - debian/patches/01_doc_typos.patch: Sync. + - debian/patches/04_do_not_print_rtc_freq_if_ok.patch: Likewise. + - debian/patches/05_non-fatal_if_linux_hd_missing.patch: Likewise. + - debian/patches/12_signal_powerpc_support.patch: Likewise. + - debian/patches/21_net_sockopt.patch: Likewise. + - debian/patches/22_net_tuntap_stall.patch: Likewise. + - debian/patches/30_syscall_ipc.patch: Likewise. + - debian/patches/31_syscalls.patch: Likewise. + - debian/patches/32_syscall_sysctl.patch: Likewise. + - debian/patches/33_syscall_ppc_clone.patch: Likewise. + - debian/patches/35_syscall_sockaddr.patch: Likewise. + - debian/patches/36_syscall_prctl.patch: Likewise. + - debian/patches/37_syscall_mount.patch: Likewise. + - debian/patches/41_arm_fpa_sigfpe.patch: Likewise. + - debian/patches/42_arm_tls.patch: Likewise. + - debian/patches/43_arm_cpustate.patch: Likewise. + - debian/patches/50_missing_keycodes.patch: Likewise. + - debian/patches/51_serial_small_divider.patch: Likewise. + - debian/patches/61_safe_64bit_int.patch: Likewise. + - debian/patches/63_sparc_build.patch: Likewise. + - debian/patches/40_arm_nwfpe_cpsr.patch: Removed, integrated upstream. + * Make the patch system apply the patch on the first run. + - debian/patches/64_ppc_asm_constraints.patch: Add DPATCHLEVEL. + * Document how to use the images created with qemu-make-debian-root in the + man page. Thanks to Jacobo . (Closes: #343450) + * Add support for the -snapshot option to use the TMPDIR evironment + variable. (Closes: #353880) + - debian/patches/02_snapshot_use_tmpdir.patch: New file. + * Do not exit with an error when using '-M ?'. (Closes: #365209) + - debian/patches/03_machines_list_no_error.patch: New file. + * Added symlink for system-mipsel emulator man page. + * Build and clean the pc-bios directory. + * Avoid segfaulting by using _exit(2) instead of exit(3) in qemu user + emulators. (Closes: #338289) + - debian/patches/06_exit_segfault.patch: New file. + * Enable ALSA audio support and add libasound2-dev to the Build-Depends. + * Now using Standards-Version 3.7.2 (no changes needed). + + -- Guillem Jover Sun, 28 May 2006 20:51:10 +0300 + +qemu (0.8.0-3ubuntu1) dapper; urgency=low + + * moved proll and openhackware from Depends to Recommends. These are + needed for sparc emulation, so this may be broken in ubuntu. + + -- Reinhard Tartler Fri, 14 Apr 2006 20:30:04 +0200 + +qemu (0.8.0-3) unstable; urgency=low + + [ Josh Triplett ] + * Fix FTBFS on PowerPC caused by asm constraint problem. (Closes: #361727) + - debian/patches/64_ppc_asm_constraints.patch. + + [ Guillem Jover ] + * Clamp addrlen from host to target when using AF_UNIX. This fixes + socket problems when using EABI. + - debian/patches/35_syscall_sockaddr.patch: New file. + * Fix floating point comparison on ARM NWFPE, due to glue code missmatch. + (Closes: #356287) + - debian/patches/40_arm_nwfpe_cpsr.patch: New file. + - debian/patches/40_fpu_arm_sigfpe.patch: Rename to ... + - debian/patches/41_arm_fpa_sigfpe.patch: ... this. Resync. + Thanks to Ulrich Hecht. + * Fix POSIX threads creation on ARM hanging when initializing the cpu + structure being it cyclic. + - debian/patches/43_arm_cpustate.patch: New file. + * Add TLS support for ARM. Stolen from Scratchbox. + - debian/patches/42_arm_tls.patch: New file. + * Fix sysctl endian problem. + - debian/patches/32_syscall_sysctl.patch: Update. + Thanks to Timo Savola . + * Remove now default '--enable-slirp' build option. (Closes: #356284) + Thanks to Anderson Lizardo . + * Remove unused sharedir to 'make install'. (Closes: #356418) + Thanks to Anderson Lizardo . + * Fix package not cleaning properly. (Closes: #356279) + Thanks to Anderson Lizardo for the initial + patch. + * Add needed syscalls to make debootstrap work. (Closes: #356291) + - debian/patches/36_syscall_prctl.patch: New file. + - debian/patches/37_syscall_mount.patch: Likewise. + - debian/patches/38_syscall_arm_statfs64.patch: Likewise. + Thanks to Anderson Lizardo . + * Remove obsolete Build-Dependency xlibs-dev. + + -- Guillem Jover Thu, 13 Apr 2006 11:53:00 +0300 + +qemu (0.8.0-2) unstable; urgency=low + + [ Guillem Jover ] + * Switch away from cdbs to plain debhelper. + * Upgrade to debhelper compat level 5. + * Allow overriding CC compiler variable. (Closes: #345772) + * Do not redefine 64 bit types on 64 bit arches. + - debian/patches/61_safe_64bit_int.patch: New file. + * Allow linux_boot.bin to be built on any arch by switching to nasm, + and Build-Depending on it. + - debian/patches/62_linux_boot_nasm.patch: New file. + * The serial hw driver uses a small divider that gets zeroed when shifting + bits to the right. (Closes: #276276, #348098) + - debian/patches/51_serial_small_divider.patch: New file. + Thanks to Samuel Thibault . + * Escaped hyphens in qemu-user manpage, use italics for filenames and + parameters and bold for options. + * Partial build failure fix for Sparc. (Bugs: #317145, #336970) + Thanks to Jurij Smakov . + + -- Guillem Jover Mon, 20 Feb 2006 09:17:46 +0200 + +qemu (0.8.0-1) unstable; urgency=low + + [ Guillem Jover ] + * New upstream release. (Closes: #344339) + - Added support for Virtual FAT. (Closes: #313123) + - Emulate repeated keystrokes when holding a key. (Closes: #298864) + - debian/patches/01_doc_typos.patch: Sync. + - debian/patches/04_do_not_print_rtc_freq_if_ok.patch: Likewise. + - debian/patches/05_non-fatal_if_linux_hd_missing.patch: Likewise. + - debian/patches/12_signal_powerpc_support.patch: Likewise. + - debian/patches/21_net_sockopt.patch: Likewise. + - debian/patches/22_net_tuntap_stall.patch: Likewise. + - debian/patches/30_syscall_ipc.patch: Likewise. + - debian/patches/31_syscalls.patch: Likewise. + - debian/patches/32_syscall_sysctl.patch: Likewise. + - debian/patches/33_syscall_ppc_clone.patch: Likewise. + - debian/patches/40_fpu_arm_sigfpe.patch: Likewise. + - debian/patches/50_missing_keycodes.patch: Likewise. + * Added mips and mipsel to the lintian overrides for the user emulators + being shlib-with-non-pic-code. + * Added symlinks for mips, mipsel and system-arm emulator manpages. + + -- Guillem Jover Fri, 30 Dec 2005 05:44:53 +0200 + +qemu (0.7.2-2) unstable; urgency=low + + [ Josh Triplett ] + * Add support for signal handling on PowerPC. (Closes: #335509) + - debian/patches/12_signal_powerpc_support.patch: New file. + + [ Guillem Jover ] + * Add Josh Triplett to Uploaders and packaging team. + * Fix PowerPC build failure by reintroducing the ppc linker script and + adding the missing _SDA_BASE_ and _SDA2_BASE_ symbols. (Closes: #336983) + * Remove invalid patch making X11 fail at runtime. + - debian/patches/20_net_socket.patch: Remove. + - debian/patches/32_syscall_sysctl.patch: Sync. + Thanks to Daniel Gimpelevich . + * Avoid the patch system to try until it applies. + - debian/patches/05_non-fatal_if_linux_hd_missing.patch: Added patch level. + - debian/patches/12_signal_powerpc_support.patch: Likewise. + + -- Guillem Jover Wed, 21 Dec 2005 22:11:34 +0200 + +qemu (0.7.2-1) unstable; urgency=low + + [ Guillem Jover ] + * New upstream release. (Closes: #321232, #327168) + - debian/patches/12_signal_silent.patch: Integrated upstream, remove. + - debian/patches/50_ppc_ldscript.patch: Likewise. + - debian/patches/33_syscall_truncate64.patch: Likewise. + - debian/patches/01_doc_typos.patch: Resync with upstream. + - debian/patches/04_do_not_print_rtc_freq_if_ok.patch: Likewise. + - debian/patches/05_non-fatal_if_linux_hd_missing.patch: Likewise. + - debian/patches/10_signal_jobs.patch: Likewise. + - debian/patches/11_signal_sigaction.patch: Likewise. + - debian/patches/20_net_socket.patch: Likewise. + - debian/patches/21_net_sockopt.patch: Likewise. + - debian/patches/22_net_tuntap_stall.patch: Likewise. + - debian/patches/30_syscall_ipc.patch: Likewise. + - debian/patches/31_syscalls.patch: Likewise. + - debian/patches/32_syscall_sysctl.patch: Likewise. + - debian/patches/40_fpu_arm_sigfpe.patch: Likewise. + * Repackaged upstream source to deal with binaries w/o sources. + - pc-bios/video.x: New file removed. + * Create a new qemu-user(1) manpage and link all user emulator manpages + to it. (Closes: #335163) + * Add missing '-' and '=' keycodes for sendkey command. + - debian/patches/50_missing_keycodes.patch: New file. (Closes: #334071) + Thanks to Robert Millan . + * Add manpage link for qemu-system-mips. + * Make sysctl byte-swap the name values. + - debian/patches/32_syscall_sysctl.patch: Merge patch. (Closes: #334458) + Thanks to Josh Triplett . + * Change documentation menu section to "Apps/Emulators". (Closes: #335062) + Thanks to Frans Pop . + * On PowerPC, do not zero registers r7-r31 in do_fork and zero register r3. + Fixing segfaults on programs using the clone syscall. + - debian/patches/33_syscall_ppc_clone.patch: New file. (Closes: #335159) + Thanks to Josh Triplett + and Paul Brook . + * Tighten vgabios and bochsbios versioned Depends. + * Add video.x to the list of roms to touch to make qemu Makefile happy. + * Add lintian overrides for the user emulators being shlib-with-non-pic-code. + * Wrap lines in debian/control fields (knowingly breaking policy). + + [ Guilherme de S. Pastore ] + * debian/control: + - Updated my e-mail address. + * debian/copyright: + - Dropped AndrĂ© from team members list, not a single contribution ever. + + -- Guillem Jover Mon, 31 Oct 2005 05:01:45 +0200 + +qemu (0.7.0-4) unstable; urgency=low + + [ Guillem Jover ] + * Rebuild source with locally deborked dpkg-source. (Closes: #321019) + * Added the location of the Subversion repo used for the packages and + fixed the upstream URL in debian/copyright. + * Lower case title header in qemu-make-debian-root man page. + * Use dd instead of cat to generate the qemu debian root image. + (Closes: #315952) + + -- Guillem Jover Wed, 3 Aug 2005 05:53:30 +0300 + +qemu (0.7.0-3) unstable; urgency=low + + [ Guillem Jover ] + * Update watch file to version 3, use perlre and new upstream site. + * Now using Standards-Version 3.6.2 (no changes needed). + * Fix TUN/TAP network interface stalling the connection. (Closes: #290569) + Thanks to Vitaly Belostotsky . + * Link against librt, needed by the new clock_gettime syscall. + - debian/patches/31_syscalls.patch: Update. (Closes: #315388) + Thanks to Timo Savola for noticing. + * Force Build-Dependency on binutils >= 2.16-1 needed by the amd64 and + powerpc linker scripts. (Closes: #262655) + * Force usage of gcc-3.4. (Closes: #319527) + * Add missing Build-Dependency on zlib1g-dev. + Thanks to Reinhard Tartler . + * Include in syscall.c to avoid the broken headers in + linux-kernel-headers 2.6.12. + - debian/patches/34_syscalls_types.patch: New file. + Thanks to Octavian Cerna . + * Fix powerpc linker script. + - debian/patches/50_ppc_ldscript.patch: New file. + Thanks to Octavian Cerna . + + -- Guillem Jover Mon, 1 Aug 2005 02:48:09 +0300 + +qemu (0.7.0-2) unstable; urgency=low + + [ Guillem Jover ] + * Add alpha, sparc, arm and s390 to Architectures (and to the + libgpmg1-dev Build-Depends). + + * Forward SIGSTOP and SIGCONT sent to QEMU to the emulated application. + - debian/patches/10_signal_jobs.patch: New file. + Thanks to Ulrich Hecht. + * Return EINVAL on emulated sigaction when given invalid signal + parameters SIGKILL and SIGSTOP. + - debian/patches/11_signal_sigaction.patch: New fle. + Thanks to Valtteri Rahkonen. + * Do not print messsages for uncaught signal, thus fixing the case + were some applications want to kill their siblings. + - debian/patches/12_signal_silent.patch: New file. + Thanks to Valtteri Rahkonen + + * Fix Unix sockets by handling correctly AF_UNIX socket address + structure length. + - debian/patches/20_net_socket.patch: New file. + Thanks to Timo Savola. + * Implement SO_LINGER, SO_RCVTIMEO, SO_SNDTIMEO, SO_PEERNAME and + SO_PEERCRED getsockoptions. + - debian/patches/21_net_sockopt.patch: New file. + Thanks to Valtteri Rahkonen. + + * Implement SysV IPC message and semaphore syscalls. + - debian/patches/30_syscall_ipc.patch: New file. + Thanks to Valtteri Rahkonen. + * Implement acct, umount2, uselib, swapon, syslog, ftruncate64, + mincore, madvise, readahead and clock_gettime syscalls. + - debian/patches/31_syscalls.patch: New file. + Thanks to Ulrich Hecht. + * Implement sysctl CTL_KERN/KERN_VERSION + - debian/patches/32_syscall_sysctl.patch: New file. + Thanks to Timo Savola. + * Implement truncate64 syscall. + - debian/patches/33_syscall_truncate64.patch: New file. + Thanks to Valtteri Rahkonen. + + * Implement ARM floating point exeption emulation. + - debian/patches/40_fpu_arm_sigfpe.patch: New file. + Thanks to Ulrich Hecht. + + -- Guillem Jover Sun, 19 Jun 2005 15:05:37 +0300 + +qemu (0.7.0-1) experimental; urgency=low + + [ Guillem Jover ] + * New upstream release. (Closes: #308459, #308494) + * Do not require a disk image when booting a Linux kernel. (Closes: #260935) + Thanks to Jonas Smedegaard . + + [ Guilherme de S. Pastore ] + * Rewrote README.Debian for more clarity + * Add support for amd64 as a host architecture. (Closes: #262655) + - Add build-depend on libgpmg1-dev on amd64. + * Fixed qemu-make-debian-root so that it shows the name by which + it was called on the usage notice, not "%s". (Closes: #303507) + Thanks to Micah Anderson . + + [ Elrond ] + * Clean up more files, so they don't end up in the final .diff.gz + * Switch to external proll and openhackware: + - Instead of patching qemu's Makefile, trick it by giving it empty + files to install and remove them straight after install. + - Don't ship the roms in debian/roms any more! + - Instead add more symlinks. + - Update Depends: apropiately. + + -- Guillem Jover Fri, 27 May 2005 02:06:20 +0300 + +qemu (0.6.1+20050407-1) unstable; urgency=low + + [ Guillem Jover ] + * New upstream snapshot. + - Fix -user-net. (Closes: #295019) + - Fix win2k and winxp image booting. (Closes: #285170, #292707) + - Fix installation of outdated documentation. (Closes: #286931) + - Provide qemu-img instead of qemu-mkcow. (Closes: #290713) + - Remove debian/patches/05_fix_openpic_timer_test.patch, integrated + upstream. + - Remove debian/patches/02_selectable_sdl_keyboard.patch, superseded + by new keyboard implementation. (Closes: #284510, #299432) + - Remove debian/patches/01_mkcow_section_and_hyphens.patch. + - Conditionalize qemu -g option for some architectures. (Closes: #298988) + * Added new copyright year to debian/copyright. + * Added initial qemu-make-debian-root man page. (Closes: #286932) + * Fixed typos in qemu documentation. (Closes: #301933) + Thanks to A Costa . + * Added Elrond to Uploaders and packaging team. + * Use the default target list: + - Do not build qemu-fast anymore as it is deprecated upstream anyway. + (Closes: #278602, #281510) + - New targets armeb and system-x86_64. + * Updated ROM images under debian/roms/: + - OpenHackWare 0.4. + - Proll 18 with qemu specific patches. + * Remove uudecoded files from pc-bios/ on clean. + * Fix qemu-make-debian-root to behave correctly even if the needed + Recommends are not installed. + + [ Guilherme de S. Pastore ] + * Create a doc-base entry for the package (Closes: #290669) + * debian/control: + - Add debootstrap to the 'Recommends: ' line, as needed by + qemu-make-debian-root (Closes: #302848) + - Moved sharutils from dependency to recommendation, as it is only + needed by qemu-make-debian-root + * debian/docs: + - Do not include README.distrib in the binary package (Closes: #302853) + + [ Elrond ] + * Replace "libgpmg1-dev | not+linux-gnu" by "libgpmg1-dev [i386 powerpc]" + in Build-Depends. qemu should not need to build-depend on it anyway, the + real problem is described in Bug#267174. When it is solved, we can + remove our dependency. Until then please remember to add any arch, which + we will build on and that has gpm. This change hopefully calms: + + * Add versions to the dependencies on bochsbios and vgabios + (Closes: #288997): + - vgabios: Use the current version from testing/unstable (0.4c+20041014-1), + according to Frans Pop , this fixed those + "blank screen" problems. + - bochsbios: Use the current version from unstable (2.1.1+20041109-3), as + Guillem Jover fixed the networking in that version. + + -- Guillem Jover Thu, 7 Apr 2005 01:26:01 +0300 + +qemu (0.6.1-1) unstable; urgency=low + + [ Guillem Jover ] + * New upstream release. (Closes: #281626) + - Booting from drive b is not supported anymore. (Closes: #275679) + - Fix ne2k network interface that was not working in some situations. + (Closes: #281862) + - Remove debian/patches/06_build_gcc3.4.patch, fixed upstream. + - Remove debian/patches/04_lfs.patch, fixed upstream. + - Remove debian/patches/02_fix_powerpc_FTBFS.patch, fixed upstream. + - Remove debian/patches/00_escape_manpage_hyphens.patch, not needed. + - Sync debian/patches/03_use_external_bios.patch. + * Include uuencoded source for proll 18, some build fixes and its binary + proll.bin on debian/roms/. + * Suggests sudo to be used by the qemu-ifup script. + Thanks to Elrond . + * Make sudo in qemu-ifup explain what the password is for. (Closes: #281380) + * Add an option to select the method to convert keyevent to keycode + in the SDL keyboard handling code. Added support for Right Shift in the + generic handler. (Closes: #282658) + Thanks to Elrond . + * Do not set RTC frequency to 1024 or warn about this if it has already + the correct value. (Closes: #281403) + * Enabled sparc-softmmu support. + + -- Guillem Jover Sat, 27 Nov 2004 23:23:49 +0100 + +qemu (0.6.0.dfsg.2-1) unstable; urgency=low + + [ Guillem Jover ] + * Repackaged upstream source to remove external included files. + - pc-bios/ppc-rom.bin: Removed. + - pc-bios/OpenHackWare_0.3.tar.bz2: Likewise. + - pc-bios/vgabios.bin: Likewise. + - pc-bios/vgabios-cirrus.bin: Likewise. + - pc-bios/vgabios-cvs-2004-06-17.tgz: Likewise. + * Include uuencoded source for OpenHackWare 0.3.1 and its binary + ppc-rom.bin on debian/roms/. Add a Build-Depends on sharutils. + * Update tundev.c. Pass -tun-dev to qemu without the equal sign. + Thanks to Isaac Clerencia . + * Fix README.Debian to point to the renamed qemu-make-debian-root. + * Add Depends on sharutils needed by qemu-make-debian-root. + (Closes: #272130) + * Use and depend on vgabios package, which is in sync with bochsbios + that checks for rom bios checksums. (Closes: #281202) + * Enable LFS globally, thus fixing problems with qemu-mkcow when using + an existing large image. + (Closes: #279925) + * Fix openpic timer write test, catched from a warning about a constant + value larger than the type it was casted to. + * Fix build failure with gcc 3.4. Patch stolen from Gentoo BTS. + + -- Guillem Jover Mon, 15 Nov 2004 10:46:54 +0100 + +qemu (0.6.0.dfsg.1-1) unstable; urgency=high + + [ Guillem Jover ] + * Repackaged upstream source to deal with binaries w/o sources. + (Closes: #268780) + - pc-bios/bios.bin: Removed binary without source. Now using + bochsbios package. + - pc-bios/vgabios.bin: Rebuilt from vgabios cvs 2004-06-17 snapshot, + source included. + - pc-bios/vgabios-cirrus.bin: Likewise. + - pc-bios/ppc-rom.bin: Rebuilt on voltaire, source included. + - pc-bios/linux_boot.bin: Rebuilt from source. + * Move make-debian-root.sh to /usr/sbin/qemu-make-debian-root. + (Closes: #268705) + + -- Guillem Jover Mon, 13 Sep 2004 01:28:54 +0200 + +qemu (0.6.0-2) unstable; urgency=high + + [ Guilherme de S. Pastore ] + * Fixed dangling symlinks under /usr/share/man/man1. (Closes: #264764) + + [ Guillem Jover ] + * Fix FTBFS on powerpc. + - debian/patches/02_fix_powerpc_FTBFS.patch: New file. + + -- Guillem Jover Wed, 18 Aug 2004 15:50:43 +0200 + +qemu (0.6.0-1) unstable; urgency=medium + + * New maintainers. (Closes: #258900) + * New upstream release. (Closes: #258732) + - Installs ppc BIOS ROM file. (Closes: #257492) + - Builds with -fno-strict-aliasing. (Closes: #257123) + + [ Guilherme de S. Pastore ] + * debian/rules: + - Cleaned up. + - Ported to use CDBS. + * 00_escape_manpage_hyphens.patch: + - Correct a little typo and escape hyphens in upstream manpage. + * 01_mkcow_section_and_hyphens.patch: + - Fix section mismatch and escape hyphens in the qemu-mkcow manpage. + * Added simple /etc/qemu-ifup helper script. (Closes: #245281) + Thanks to Martin Michlmayr . + * Cleaned debian/watch. + * UTF-8'ed debian/changelog. + * Updated Standards-Version to 3.6.1.1. + * Removed outdated and unnecessary debian/qemu-i386.sgml. + - Removed build dependency on docbook-to-man. + * Removed "x86" part from the description (hey, qemu is not x86-only + in any way). Deserves a complete rewrite, shall be done soon. + + [ Guillem Jover ] + * Lower-case package short description. + * Added missing CPU emulations to the description. + * Cleaned and updated debian/copyright. + * Removed manually added libx11-6 dependency. + * Only Build-Depends on libgpmg1-dev on GNU/Linux systems. + * Cosmetic unification to debian/changelog. + * debian/rules: + - Remove generated files. + - Give exec perms to qemu-ifup. + + -- Guillem Jover Sun, 8 Aug 2004 17:24:08 +0200 + +qemu (0.5.5-2) unstable; urgency=low + + * Re-enable SDL disabled while I was bugchasing. (Closes: #255014) + * Yes, this is really 0.5.5. (Closes: #254655) + * Enable slirp networking. (Closes: #253573) + * Add Build-Depends on libgpmg1-dev (found by Bastian Blank, probably breaks + Hurd but that's a problem for another day). + + -- Paul Russell Thu, 24 Jun 2004 06:26:42 +0200 + +qemu (0.5.5-1) unstable; urgency=low + + * New upstream release. (Closes: #237556, #237556) + * Applied patch to add options to make_debian_root.sh. (Closes: #238787) + * Applied patch for other archs: hmmm... (Closes: #251420) + * Do umount -d in make_debian_root.sh. (Closes: #251775) + + -- Paul Russell Tue, 1 Jun 2004 03:50:05 +0200 + +qemu (0.5.4-1) unstable; urgency=low + + * New upstream release. (Closes: #246634) + * qemu-mkcow included in upstream. + * Added tundev program source in doc, to see if people find it useful. + + -- Paul Russell Mon, 3 May 2004 08:14:49 +0200 + +qemu (0.5.3-1) unstable; urgency=low + + * New upstream release. (Closes: #237556) + * Use aalib-config --static-libs. (Closes: #243325) + * Document Control-Shift to release mouse pointer. (Closes: #238074) + + -- Paul Russell Tue, 13 Apr 2004 02:58:49 +0200 + +qemu (0.5.2-4) unstable; urgency=low + + * Fix PPC install (Michel Daenzer patch). (Closes: #238431) + * Simplify deps (might be wrong, but it's neater). (Closes: #238430) + + -- Paul Russell Wed, 17 Mar 2004 01:35:47 +0100 + +qemu (0.5.2-3) unstable; urgency=low + + * Make compile on woody. (Closes: #238163) + * Include qemu-doc.html. (Closes: #238076) + * Wrote qemu-i386 man page. (Closes: #238077) + + -- Paul Russell Mon, 15 Mar 2004 23:56:25 +0100 + +qemu (0.5.2-2) unstable; urgency=low + + * Fix build problem so bios.bin etc. can be found. (Closes: #237553) + + -- Paul Russell Fri, 12 Mar 2004 05:43:00 +0100 + +qemu (0.5.2-1) unstable; urgency=low + + * Initial Release. (Closes: #187407) + + -- Paul Russell Wed, 3 Mar 2004 02:18:54 +0100 + --- qemu-0.9.1+svn20081112.orig/debian/overrides/qemu +++ qemu-0.9.1+svn20081112/debian/overrides/qemu @@ -0,0 +1,7 @@ +qemu: shlib-with-non-pic-code usr/bin/qemu-ppc +qemu: shlib-with-non-pic-code usr/bin/qemu-sparc +qemu: shlib-with-non-pic-code usr/bin/qemu-i386 +qemu: shlib-with-non-pic-code usr/bin/qemu-arm +qemu: shlib-with-non-pic-code usr/bin/qemu-armeb +qemu: shlib-with-non-pic-code usr/bin/qemu-mips +qemu: shlib-with-non-pic-code usr/bin/qemu-mipsel --- qemu-0.9.1+svn20081112.orig/debian/patches/00_bios.patch +++ qemu-0.9.1+svn20081112/debian/patches/00_bios.patch @@ -0,0 +1,15 @@ +--- a/Makefile ++++ b/Makefile +@@ -232,12 +232,6 @@ + ifneq ($(TOOLS),) + $(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(bindir)" + endif +- mkdir -p "$(DESTDIR)$(datadir)" +- set -e; for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \ +- video.x openbios-sparc32 openbios-sparc64 pxe-ne2k_pci.bin \ +- pxe-rtl8139.bin pxe-pcnet.bin pxe-e1000.bin; do \ +- $(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \ +- done + ifndef CONFIG_WIN32 + mkdir -p "$(DESTDIR)$(datadir)/keymaps" + set -e; for x in $(KEYMAPS); do \ --- qemu-0.9.1+svn20081112.orig/debian/patches/64_ppc_asm_constraints.patch +++ qemu-0.9.1+svn20081112/debian/patches/64_ppc_asm_constraints.patch @@ -0,0 +1,13 @@ +Index: qemu-0.9.1+svn20081012/cpu-all.h +=================================================================== +--- qemu-0.9.1+svn20081012.orig/cpu-all.h 2008-10-12 19:13:00.000000000 +0200 ++++ qemu-0.9.1+svn20081012/cpu-all.h 2008-10-12 19:13:07.000000000 +0200 +@@ -286,7 +286,7 @@ + static inline void stl_le_p(void *ptr, int v) + { + #ifdef __powerpc__ +- __asm__ __volatile__ ("stwbrx %1,0,%2" : "=m" (*(uint32_t *)ptr) : "r" (v), "r" (ptr)); ++ __asm__ __volatile__ ("stwbrx %0,0,%1" : : "r" (v), "r" (ptr) : "memory"); + #else + uint8_t *p = ptr; + p[0] = v; --- qemu-0.9.1+svn20081112.orig/debian/patches/90_security.patch +++ qemu-0.9.1+svn20081112/debian/patches/90_security.patch @@ -0,0 +1,127 @@ +Index: qemu-0.9.1+svn20081101/block.c +=================================================================== +diff -Nurd qemu-0.9.1+svn20081112.orig/block.c qemu-0.9.1+svn20081112/block.c +--- qemu-0.9.1+svn20081112.orig/block.c 2008-11-08 17:27:07.000000000 +0100 ++++ qemu-0.9.1+svn20081112/block.c 2008-11-12 11:29:28.000000000 +0100 +@@ -559,10 +559,18 @@ + return -ENOMEDIUM; + if (bs->read_only) + return -EACCES; ++ if (sector_num < 0) ++ return -EINVAL; + if (drv->bdrv_pwrite) { + int ret, len; ++ int64_t ns; ++ + len = nb_sectors * 512; +- ret = drv->bdrv_pwrite(bs, sector_num * 512, buf, len); ++ ns = sector_num * 512; ++ if (ns < 0) ++ return -EINVAL; ++ ++ ret = drv->bdrv_pwrite(bs, ns, buf, len); + if (ret < 0) + return ret; + else if (ret != len) +Index: qemu-0.9.1+svn20081101/hw/pc.c +=================================================================== +--- qemu-0.9.1+svn20081101.orig/hw/pc.c 2008-11-01 09:30:17.000000000 +0100 ++++ qemu-0.9.1+svn20081101/hw/pc.c 2008-11-01 11:04:55.000000000 +0100 +@@ -382,7 +382,8 @@ + case 0x400: + case 0x401: + fprintf(stderr, "BIOS panic at rombios.c, line %d\n", val); +- exit(1); ++ /* according to documentation, these can be safely ignored */ ++ break; + case 0x402: + case 0x403: + #ifdef DEBUG_BIOS +@@ -405,8 +406,9 @@ + /* LGPL'ed VGA BIOS messages */ + case 0x501: + case 0x502: ++ /* according to documentation, these can be safely ignored */ + fprintf(stderr, "VGA BIOS panic, line %d\n", val); +- exit(1); ++ break; + case 0x500: + case 0x503: + #ifdef DEBUG_BIOS +Index: qemu-0.9.1+svn20081101/slirp/slirp.c +=================================================================== +--- qemu-0.9.1+svn20081101.orig/slirp/slirp.c 2008-10-17 19:31:57.000000000 +0200 ++++ qemu-0.9.1+svn20081101/slirp/slirp.c 2008-11-01 11:04:55.000000000 +0100 +@@ -654,6 +654,10 @@ + if (!m) + return; + /* Note: we add to align the IP header */ ++ /* taviso: large values in ne2k TCNT register may exceed msize on transmit */ ++ if (M_FREEROOM(m) < pkt_len + 2) { ++ m_inc(m, pkt_len + 2); ++ } + m->m_len = pkt_len + 2; + memcpy(m->m_data + 2, pkt, pkt_len); + +Index: qemu-0.9.1+svn20081101/target-i386/translate.c +=================================================================== +--- qemu-0.9.1+svn20081101.orig/target-i386/translate.c 2008-10-04 13:33:52.000000000 +0200 ++++ qemu-0.9.1+svn20081101/target-i386/translate.c 2008-11-01 11:04:55.000000000 +0100 +@@ -6564,6 +6564,7 @@ + gen_jmp_im(pc_start - s->cs_base); + tcg_gen_helper_0_1(helper_into, tcg_const_i32(s->pc - pc_start)); + break; ++#ifdef WANT_ICEBP + case 0xf1: /* icebp (undocumented, exits to external debugger) */ + gen_svm_check_intercept(s, pc_start, SVM_EXIT_ICEBP); + #if 1 +@@ -6574,6 +6575,7 @@ + cpu_set_log(CPU_LOG_INT | CPU_LOG_TB_IN_ASM); + #endif + break; ++#endif /* icebp */ + case 0xfa: /* cli */ + if (!s->vm86) { + if (s->cpl <= s->iopl) { +Index: qemu-0.9.1+svn20081101/net.c +=================================================================== +--- qemu-0.9.1+svn20081101.orig/net.c 2008-10-31 20:10:00.000000000 +0100 ++++ qemu-0.9.1+svn20081101/net.c 2008-11-01 11:04:55.000000000 +0100 +@@ -949,8 +949,8 @@ + VLANClientState *vc; + int fd; + int state; /* 0 = getting length, 1 = getting data */ +- int index; +- int packet_len; ++ unsigned int index; ++ unsigned int packet_len; + uint8_t buf[4096]; + struct sockaddr_in dgram_dst; /* contains inet host and port destination iff connectionless (SOCK_DGRAM) */ + } NetSocketState; +@@ -981,7 +981,8 @@ + static void net_socket_send(void *opaque) + { + NetSocketState *s = opaque; +- int l, size, err; ++ int size, err; ++ unsigned l; + uint8_t buf1[4096]; + const uint8_t *buf; + +@@ -1020,7 +1021,15 @@ + l = s->packet_len - s->index; + if (l > size) + l = size; +- memcpy(s->buf + s->index, buf, l); ++ if (s->index + l <= sizeof(s->buf)) { ++ memcpy(s->buf + s->index, buf, l); ++ } else { ++ fprintf(stderr, "serious error: oversized packet received," ++ "connection terminated.\n"); ++ s->state = 0; ++ goto eoc; ++ } ++ + s->index += l; + buf += l; + size -= l; --- qemu-0.9.1+svn20081112.orig/debian/patches/51_linuxbios_piix_ram_size.patch +++ qemu-0.9.1+svn20081112/debian/patches/51_linuxbios_piix_ram_size.patch @@ -0,0 +1,50 @@ +Index: qemu-0.9.1+svn20081012/hw/pc.c +=================================================================== +--- qemu-0.9.1+svn20081012.orig/hw/pc.c 2008-10-12 19:08:30.000000000 +0200 ++++ qemu-0.9.1+svn20081012/hw/pc.c 2008-10-12 19:08:30.000000000 +0200 +@@ -899,7 +899,7 @@ + ferr_irq = i8259[13]; + + if (pci_enabled) { +- pci_bus = i440fx_init(&i440fx_state, i8259); ++ pci_bus = i440fx_init(&i440fx_state, i8259, ram_size); + piix3_devfn = piix3_init(pci_bus, -1); + } else { + pci_bus = NULL; +Index: qemu-0.9.1+svn20081012/hw/pc.h +=================================================================== +--- qemu-0.9.1+svn20081012.orig/hw/pc.h 2008-09-28 02:42:12.000000000 +0200 ++++ qemu-0.9.1+svn20081012/hw/pc.h 2008-10-12 19:08:30.000000000 +0200 +@@ -100,7 +100,7 @@ + int pcspk_audio_init(AudioState *, qemu_irq *pic); + + /* piix_pci.c */ +-PCIBus *i440fx_init(PCIDevice **pi440fx_state, qemu_irq *pic); ++PCIBus *i440fx_init(PCIDevice **pi440fx_state, qemu_irq *pic, int ram_size); + void i440fx_set_smm(PCIDevice *d, int val); + int piix3_init(PCIBus *bus, int devfn); + void i440fx_init_memory_mappings(PCIDevice *d); +Index: qemu-0.9.1+svn20081012/hw/piix_pci.c +=================================================================== +--- qemu-0.9.1+svn20081012.orig/hw/piix_pci.c 2008-04-27 23:12:55.000000000 +0200 ++++ qemu-0.9.1+svn20081012/hw/piix_pci.c 2008-10-12 19:08:30.000000000 +0200 +@@ -169,7 +169,7 @@ + return 0; + } + +-PCIBus *i440fx_init(PCIDevice **pi440fx_state, qemu_irq *pic) ++PCIBus *i440fx_init(PCIDevice **pi440fx_state, qemu_irq *pic, int ram_size) + { + PCIBus *b; + PCIDevice *d; +@@ -200,6 +200,10 @@ + d->config[0x0a] = 0x00; // class_sub = host2pci + d->config[0x0b] = 0x06; // class_base = PCI_bridge + d->config[0x0e] = 0x00; // header_type ++ ram_size = ram_size / 8 / 1024 / 1024; ++ if (ram_size > 255) ++ ram_size = 255; ++ d->config[0x57] = ram_size; + + d->config[0x72] = 0x02; /* SMRAM */ + --- qemu-0.9.1+svn20081112.orig/debian/patches/60_ppc_ld.patch +++ qemu-0.9.1+svn20081112/debian/patches/60_ppc_ld.patch @@ -0,0 +1,19 @@ +--- a/ppc.ld ++++ b/ppc.ld +@@ -8,6 +8,7 @@ + SECTIONS + { + /* Read-only sections, merged into text segment: */ ++ PROVIDE (__executable_start = 0x60000000); + . = 0x60000000 + SIZEOF_HEADERS; + .interp : { *(.interp) } + .hash : { *(.hash) } +@@ -210,7 +211,7 @@ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + /* DWARF 2 */ +- .debug_info 0 : { *(.debug_info) } ++ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } --- qemu-0.9.1+svn20081112.orig/debian/patches/21_net_soopts.patch +++ qemu-0.9.1+svn20081112/debian/patches/21_net_soopts.patch @@ -0,0 +1,204 @@ +Index: qemu-0.9.1+svn20081012/linux-user/syscall.c +=================================================================== +--- qemu-0.9.1+svn20081012.orig/linux-user/syscall.c 2008-10-05 13:45:25.000000000 +0200 ++++ qemu-0.9.1+svn20081012/linux-user/syscall.c 2008-10-12 18:58:17.000000000 +0200 +@@ -828,6 +828,28 @@ + return 0; + } + ++static inline void copy_to_user_linger(target_ulong target_addr, ++ struct linger *host_l) ++{ ++ struct target_linger *target_l; ++ ++ lock_user_struct(VERIFY_WRITE, target_l, target_addr, 0); ++ target_l->l_onoff = tswapl(host_l->l_onoff); ++ target_l->l_linger = tswapl(host_l->l_linger); ++ unlock_user_struct(target_l, target_addr, 1); ++} ++ ++static inline void copy_from_user_linger(struct linger *host_l, ++ target_ulong target_addr) ++{ ++ struct target_linger *target_l; ++ ++ lock_user_struct(VERIFY_WRITE, target_l, target_addr, 1); ++ host_l->l_onoff = tswapl(target_l->l_onoff); ++ host_l->l_linger = tswapl(target_l->l_linger); ++ unlock_user_struct(target_l, target_addr, 0); ++} ++ + /* do_setsockopt() Must return target values and target errnos. */ + static abi_long do_setsockopt(int sockfd, int level, int optname, + abi_ulong optval_addr, socklen_t optlen) +@@ -878,7 +900,6 @@ + break; + case TARGET_SOL_SOCKET: + switch (optname) { +- /* Options with 'int' argument. */ + case TARGET_SO_DEBUG: + optname = SO_DEBUG; + break; +@@ -935,17 +956,48 @@ + case TARGET_SO_SNDTIMEO: + optname = SO_SNDTIMEO; + break; +- break; ++ case TARGET_SO_LINGER: ++ optname = SO_LINGER; ++ break; + default: + goto unimplemented; + } + if (optlen < sizeof(uint32_t)) + return -TARGET_EINVAL; ++ switch (optname) { ++ /* Options with non-'int' argument. */ ++ case SO_RCVTIMEO: ++ case SO_SNDTIMEO: ++ { ++ struct timeval tval; ++ if(optlen < sizeof(struct target_timeval)) ++ return -TARGET_EINVAL; ++ copy_from_user_timeval(&tval,optval_addr); ++ ret = get_errno(setsockopt(sockfd, level, optname, &tval,sizeof(tval))); ++ } ++ break; ++ case SO_LINGER: ++ { ++ struct linger tmp; ++ if (optlen < sizeof(struct target_linger)) ++ return -TARGET_EINVAL; ++ optname = SO_LINGER; ++ copy_from_user_linger(&tmp,optval_addr); ++ ret = get_errno(setsockopt(sockfd, level, optname, &tmp, sizeof(tmp))); ++ } ++ break; ++ /* All remaning options take an 'int' argument. */ ++ default: ++ { ++ if (optlen < sizeof(uint32_t)) ++ return -TARGET_EINVAL; + +- if (get_user_u32(val, optval_addr)) +- return -TARGET_EFAULT; +- ret = get_errno(setsockopt(sockfd, SOL_SOCKET, optname, &val, sizeof(val))); +- break; ++ if (get_user_u32(val, optval_addr)) ++ return -TARGET_EFAULT; ++ ret = get_errno(setsockopt(sockfd, SOL_SOCKET, optname, &val, sizeof(val))); ++ } ++ break; ++ } + default: + unimplemented: + gemu_log("Unsupported setsockopt level=%d optname=%d \n", level, optname); +@@ -966,13 +1018,57 @@ + case TARGET_SOL_SOCKET: + level = SOL_SOCKET; + switch (optname) { +- case TARGET_SO_LINGER: ++ case TARGET_SO_LINGER: { ++ if (get_user_u32(len, optlen)) ++ return -TARGET_EFAULT; ++ if(len < sizeof(struct target_linger)) ++ return -TARGET_EINVAL; ++ struct linger l; ++ len=sizeof(l); ++ ++ ret = get_errno(getsockopt(sockfd, level, optname, &l, &len)); ++ copy_to_user_linger(optval_addr,&l); ++ if (put_user_u32(optlen, sizeof(struct target_linger))) ++ return -TARGET_EFAULT; ++ } ++ break; ++ + case TARGET_SO_RCVTIMEO: +- case TARGET_SO_SNDTIMEO: +- case TARGET_SO_PEERCRED: ++ case TARGET_SO_SNDTIMEO: { ++ if (get_user_u32(len, optlen)) ++ return -TARGET_EFAULT; ++ if(len < sizeof(struct target_timeval)) ++ return -TARGET_EINVAL; ++ struct timeval tval; ++ len=sizeof(tval); ++ ++ ret = get_errno(getsockopt(sockfd, level, optname, &tval, &len)); ++ copy_to_user_timeval(optval_addr,&tval); ++ if (put_user_u32(optlen, sizeof(struct target_timeval))) ++ return -TARGET_EFAULT; ++ } ++ break; ++ + case TARGET_SO_PEERNAME: + /* These don't just return a single integer */ + goto unimplemented; ++ case TARGET_SO_PEERCRED: { ++ struct ucred caller; ++ socklen_t optlen = sizeof (caller); ++ ret = get_errno(getsockopt(sockfd, SOL_SOCKET, SO_PEERCRED, ++ &caller, &optlen)); ++ ++ if (optlen != 0 && optval_addr != 0) { ++ if (put_user_u32(optval_addr + 0, caller.pid)) ++ return -TARGET_EFAULT; ++ if (put_user_u32(optval_addr + 4, caller.uid)) ++ return -TARGET_EFAULT; ++ if (put_user_u32(optval_addr + 8, caller.gid)) ++ return -TARGET_EFAULT; ++ } ++ } ++ break; ++ + default: + goto int_case; + } +@@ -1220,16 +1316,23 @@ + void *addr; + abi_long ret; + +- if (get_user_u32(addrlen, target_addrlen_addr)) +- return -TARGET_EFAULT; +- +- addr = alloca(addrlen); ++ if (target_addrlen_addr != (target_ulong)NULL && ++ target_addr != (target_ulong)NULL) { ++ if (get_user_u32(addrlen, target_addrlen_addr)) ++ return -TARGET_EFAULT; ++ addr = alloca(addrlen); ++ ret = get_errno(accept(fd, addr, &addrlen)); ++ } else { ++ ret = get_errno(accept(fd, NULL, NULL)); ++ return ret; ++ } + +- ret = get_errno(accept(fd, addr, &addrlen)); + if (!is_error(ret)) { +- host_to_target_sockaddr(target_addr, addr, addrlen); +- if (put_user_u32(addrlen, target_addrlen_addr)) +- ret = -TARGET_EFAULT; ++ if (target_addr != (target_ulong)NULL) ++ host_to_target_sockaddr(target_addr, addr, addrlen); ++ if (target_addrlen_addr != (target_ulong)NULL) ++ if (put_user_u32(addrlen, target_addrlen_addr)) ++ ret = -TARGET_EFAULT; + } + return ret; + } +Index: qemu-0.9.1+svn20081012/linux-user/syscall_defs.h +=================================================================== +--- qemu-0.9.1+svn20081012.orig/linux-user/syscall_defs.h 2008-09-29 19:23:09.000000000 +0200 ++++ qemu-0.9.1+svn20081012/linux-user/syscall_defs.h 2008-10-12 18:54:50.000000000 +0200 +@@ -114,6 +114,11 @@ + abi_long tv_nsec; + }; + ++struct target_linger { ++ target_long l_onoff; ++ target_long l_linger; ++}; ++ + struct target_itimerval { + struct target_timeval it_interval; + struct target_timeval it_value; --- qemu-0.9.1+svn20081112.orig/debian/patches/12_signal_powerpc_support.patch +++ qemu-0.9.1+svn20081112/debian/patches/12_signal_powerpc_support.patch @@ -0,0 +1,475 @@ +Index: qemu-0.9.1+svn20081012/linux-user/signal.c +=================================================================== +--- qemu-0.9.1+svn20081012.orig/linux-user/signal.c 2008-10-12 18:54:50.000000000 +0200 ++++ qemu-0.9.1+svn20081012/linux-user/signal.c 2008-10-12 18:58:07.000000000 +0200 +@@ -2,6 +2,7 @@ + * Emulation of Linux signals + * + * Copyright (c) 2003 Fabrice Bellard ++ * Copyright (c) 2005 Josh Triplett + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -16,6 +17,12 @@ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * Various portions adapted from the Linux kernel: ++ * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) ++ * Derived from "arch/i386/kernel/signal.c" ++ * Copyright (C) 1991, 1992 Linus Torvalds ++ * 1997-11-28 Modified for POSIX.1b signals by Richard Henderson + */ + #include + #include +@@ -3046,6 +3053,369 @@ + return -TARGET_ENOSYS; + } + ++#elif defined(TARGET_PPC) ++/* Adapted from the Linux kernel: ++ * arch/ppc/kernel/signal.c ++ * include/asm-ppc/elf.h ++ * include/asm-ppc/ptrace.h ++ * include/asm-ppc/sigcontext.h ++ * include/asm-ppc/ucontext.h ++ */ ++ ++/* ++ * When we have signals to deliver, we set up on the ++ * user stack, going down from the original stack pointer: ++ * a sigregs struct ++ * a sigcontext struct ++ * a gap of __SIGNAL_FRAMESIZE bytes ++ * ++ * Each of these things must be a multiple of 16 bytes in size. ++ * ++ */ ++ ++#define TARGET_ELF_NGREG 48 /* includes nip, msr, lr, etc. */ ++#define TARGET_ELF_NFPREG 33 /* includes fpscr */ ++#define TARGET_ELF_NVRREG 33 /* includes vscr */ ++ ++/* General registers */ ++typedef unsigned long target_elf_greg_t; ++typedef target_elf_greg_t target_elf_gregset_t[TARGET_ELF_NGREG]; ++ ++/* Floating point registers */ ++typedef double target_elf_fpreg_t; ++typedef target_elf_fpreg_t target_elf_fpregset_t[TARGET_ELF_NFPREG]; ++ ++/* Altivec registers */ ++/* FIXME: Altivec not supported yet. */ ++/* typedef __vector128 elf_vrreg_t; */ ++typedef uint64_t target_elf_vrreg_t[2]; ++typedef target_elf_vrreg_t target_elf_vrregset_t[TARGET_ELF_NVRREG]; ++ ++struct target_mcontext { ++ target_elf_gregset_t mc_gregs; ++ target_elf_fpregset_t mc_fregs; ++ /* The kernel calls this mc_pad, but does #define tramp mc_pad */ ++ target_ulong tramp[2]; ++ target_elf_vrregset_t mc_vregs __attribute__((__aligned__(16))); ++}; ++ ++struct target_sigregs { ++ struct target_mcontext mctx; /* all the register values */ ++ /* Programs using the rs6000/xcoff abi can save up to 19 gp regs ++ and 18 fp regs below sp before decrementing it. */ ++ int abigap[56]; ++}; ++ ++struct target_sigcontext { ++ target_ulong _unused[4]; ++ uint32_t signal; ++ target_ulong handler; ++ target_ulong oldmask; ++ struct target_pt_regs *regs; ++}; ++ ++#define __SIGNAL_FRAMESIZE 64 ++ ++static int ++save_user_regs(CPUState *env, struct target_mcontext *frame, int sigret) ++{ ++ /* save general and floating-point registers */ ++#if 0 /* FIXME: handle floating-point, Altivec, SPE */ ++ CHECK_FULL_REGS(regs); ++ preempt_disable(); ++ if (regs->msr & MSR_FP) ++ giveup_fpu(current); ++#ifdef CONFIG_ALTIVEC ++ if (current->thread.used_vr && (regs->msr & MSR_VEC)) ++ giveup_altivec(current); ++#endif /* CONFIG_ALTIVEC */ ++#ifdef CONFIG_SPE ++ if (current->thread.used_spe && (regs->msr & MSR_SPE)) ++ giveup_spe(current); ++#endif /* CONFIG_ALTIVEC */ ++ preempt_enable(); ++#endif /* 0 */ ++ ++ /* Note: this needs to be in the same order as target_pt_regs */ ++ if(!memcpy(&frame->mc_gregs, env->gpr, ++ 32*sizeof(target_elf_greg_t)) ++ || __put_user(env->nip, &frame->mc_gregs[32]) ++ || __put_user(env->msr, &frame->mc_gregs[33]) ++ /* FIXME: || __put_user(orig_gpr3, &frame->mc_gregs[34]) */ ++ || __put_user(env->ctr, &frame->mc_gregs[35]) ++ || __put_user(env->lr, &frame->mc_gregs[36]) ++ || __put_user(env->xer, &frame->mc_gregs[37]) ++ || __put_user(ppc_load_cr(env), &frame->mc_gregs[38]) ++ || __put_user(env->spr[SPR_MQ], &frame->mc_gregs[39]) ++ /* FIXME: || __put_user(trap, &frame->mc_gregs[40]) */ ++ || __put_user(env->spr[SPR_DAR], &frame->mc_gregs[41]) ++ || __put_user(env->spr[SPR_DSISR], &frame->mc_gregs[42]) ++ /* FIXME: || __put_user(result, &frame->mc_gregs[43]) */) ++ return 1; ++ ++ if(!memcpy(&frame->mc_fregs, env->fpr, ++ 32*sizeof(target_elf_fpreg_t)) ++ || __put_user(ppc_load_fpscr(env), &frame->mc_fregs[32])) ++ ++ ppc_store_fpscr(env, 0, 0xFF); /* turn off all fp exceptions */ ++ ++#if 0 /* FIXME: handle Altivec, SPE */ ++#ifdef CONFIG_ALTIVEC ++ /* save altivec registers */ ++ if (current->thread.used_vr) { ++ if (!memcpy(&frame->mc_vregs, current->thread.vr, ++ ELF_NVRREG * sizeof(vector128))) ++ return 1; ++ /* set MSR_VEC in the saved MSR value to indicate that ++ frame->mc_vregs contains valid data */ ++ if (__put_user(regs->msr | MSR_VEC, &frame->mc_gregs[PT_MSR])) ++ return 1; ++ } ++ /* else assert((regs->msr & MSR_VEC) == 0) */ ++ ++ /* We always copy to/from vrsave, it's 0 if we don't have or don't ++ * use altivec. Since VSCR only contains 32 bits saved in the least ++ * significant bits of a vector, we "cheat" and stuff VRSAVE in the ++ * most significant bits of that same vector. --BenH ++ */ ++ if (__put_user(current->thread.vrsave, (u32 __user *)&frame->mc_vregs[32])) ++ return 1; ++#endif /* CONFIG_ALTIVEC */ ++ ++#ifdef CONFIG_SPE ++ /* save spe registers */ ++ if (current->thread.used_spe) { ++ if (!memcpy(&frame->mc_vregs, current->thread.evr, ++ ELF_NEVRREG * sizeof(u32))) ++ return 1; ++ /* set MSR_SPE in the saved MSR value to indicate that ++ frame->mc_vregs contains valid data */ ++ if (__put_user(regs->msr | MSR_SPE, &frame->mc_gregs[PT_MSR])) ++ return 1; ++ } ++ /* else assert((regs->msr & MSR_SPE) == 0) */ ++ ++ /* We always copy to/from spefscr */ ++ if (__put_user(current->thread.spefscr, (u32 *)&frame->mc_vregs + ELF_NEVRREG)) ++ return 1; ++#endif /* CONFIG_SPE */ ++#endif /* 0 */ ++ ++ if (sigret) { ++ /* Set up the sigreturn trampoline: li r0,sigret; sc */ ++ if (__put_user(0x38000000 + sigret, &frame->tramp[0]) ++ || __put_user(0x44000002, &frame->tramp[1])) ++ return 1; ++#if 0 ++ flush_icache_range((unsigned long) &frame->tramp[0], ++ (unsigned long) &frame->tramp[2]); ++#endif ++ } ++ ++ return 0; ++} ++ ++static int ++restore_user_regs(CPUState *env, struct target_mcontext *sr, int sig) ++{ ++ target_ulong save_r2 = 0; ++ target_ulong saved_cr; ++ target_ulong saved_xer; ++ double saved_fpscr; ++ ++#if 0 /* FIXME: handle Altivec, SPE */ ++#if defined(CONFIG_ALTIVEC) || defined(CONFIG_SPE) ++ unsigned long msr; ++#endif ++#endif /* 0 */ ++ ++ /* backup/restore the TLS as we don't want it to be modified */ ++ if (!sig) ++ save_r2 = env->gpr[2]; ++ ++ /* Copy all registers except MSR */ ++ /* Note: this needs to be in the same order as target_pt_regs */ ++ if(!memcpy(env->gpr, &sr->mc_gregs, ++ 32*sizeof(target_elf_greg_t)) ++ || __get_user(env->nip, &sr->mc_gregs[32]) ++ /* FIXME: || __get_user(orig_gpr3, &sr->mc_gregs[34]) */ ++ || __get_user(env->ctr, &sr->mc_gregs[35]) ++ || __get_user(env->lr, &sr->mc_gregs[36]) ++ || __get_user(env->xer, &sr->mc_gregs[37]) ++ || __get_user(saved_cr, &sr->mc_gregs[38]) ++ || __get_user(env->spr[SPR_MQ], &sr->mc_gregs[39]) ++ /* FIXME: || __get_user(trap, &sr->mc_gregs[40]) */ ++ || __get_user(env->spr[SPR_DAR], &sr->mc_gregs[41]) ++ || __get_user(env->spr[SPR_DSISR], &sr->mc_gregs[42]) ++ /* FIXME: || __get_user(result, &sr->mc_gregs[43]) */) ++ return 1; ++ ppc_store_cr(env, saved_cr, 0xFF); ++ ++ if (!sig) ++ env->gpr[2] = save_r2; ++ ++ /* The kernel delays restoring the floating-point registers until the ++ * thread uses floating-point again. For simplicity, just restore the ++ * registers now. */ ++ if(!memcpy(env->fpr, &sr->mc_fregs, ++ 32*sizeof(target_elf_fpreg_t)) ++ || __get_user(saved_fpscr, &sr->mc_fregs[32])) ++ return 1; ++ ppc_store_fpscr(env, saved_fpscr, 0xFF); ++ ++#if 0 /* FIXME: handle Altivec, SPE */ ++#ifdef CONFIG_ALTIVEC ++ /* force the process to reload the altivec registers from ++ current->thread when it next does altivec instructions */ ++ regs->msr &= ~MSR_VEC; ++ if (!__get_user(msr, &sr->mc_gregs[PT_MSR]) && (msr & MSR_VEC) != 0) { ++ /* restore altivec registers from the stack */ ++ if (!memcpy(current->thread.vr, &sr->mc_vregs, ++ sizeof(sr->mc_vregs))) ++ return 1; ++ } else if (current->thread.used_vr) ++ memset(¤t->thread.vr, 0, ELF_NVRREG * sizeof(vector128)); ++ ++ /* Always get VRSAVE back */ ++ if (__get_user(current->thread.vrsave, (u32 __user *)&sr->mc_vregs[32])) ++ return 1; ++#endif /* CONFIG_ALTIVEC */ ++ ++#ifdef CONFIG_SPE ++ /* force the process to reload the spe registers from ++ current->thread when it next does spe instructions */ ++ regs->msr &= ~MSR_SPE; ++ if (!__get_user(msr, &sr->mc_gregs[PT_MSR]) && (msr & MSR_SPE) != 0) { ++ /* restore spe registers from the stack */ ++ if (!memcpy(current->thread.evr, &sr->mc_vregs, ++ ELF_NEVRREG * sizeof(u32))) ++ return 1; ++ } else if (current->thread.used_spe) ++ memset(¤t->thread.evr, 0, ELF_NEVRREG * sizeof(u32)); ++ ++ /* Always get SPEFSCR back */ ++ if (__get_user(current->thread.spefscr, (u32 *)&sr->mc_vregs + ELF_NEVRREG)) ++ return 1; ++#endif /* CONFIG_SPE */ ++#endif /* 0 */ ++ ++#if 0 /* FIXME: handle floating-point, Altivec, SPE */ ++#ifndef CONFIG_SMP ++ preempt_disable(); ++ if (last_task_used_math == current) ++ last_task_used_math = NULL; ++ if (last_task_used_altivec == current) ++ last_task_used_altivec = NULL; ++ if (last_task_used_spe == current) ++ last_task_used_spe = NULL; ++ preempt_enable(); ++#endif ++#endif /* 0 */ ++ return 0; ++} ++ ++static void setup_frame(int sig, struct target_sigaction *ka, ++ target_sigset_t *oldset, CPUState *env) ++{ ++ struct target_sigcontext *sc; ++ struct target_sigregs *frame; ++ target_ulong origsp = env->gpr[1]; ++ target_ulong newsp = origsp; ++ ++ /* Set up Signal Frame */ ++ newsp -= sizeof(struct target_sigregs); ++ frame = (struct target_sigregs *) newsp; ++ ++ /* Put a sigcontext on the stack */ ++ newsp -= sizeof(*sc); ++ sc = (struct target_sigcontext *) newsp; ++ ++ /* create a stack frame for the caller of the handler */ ++ newsp -= __SIGNAL_FRAMESIZE; ++ ++ if (!access_ok(VERIFY_WRITE, (void *) newsp, origsp - newsp)) ++ goto badframe; ++ ++#if TARGET_NSIG != 64 ++#error "Please adjust handle_signal()" ++#endif ++ if (__put_user((target_ulong) ka->_sa_handler, &sc->handler) ++ || __put_user(oldset->sig[0], &sc->oldmask) ++ || __put_user(oldset->sig[1], &sc->_unused[3]) ++ || __put_user(frame, (target_ulong *)&sc->regs) ++ || __put_user(sig, &sc->signal)) ++ goto badframe; ++ ++ if (save_user_regs(env, &frame->mctx, TARGET_NR_sigreturn)) ++ goto badframe; ++ ++ if (__put_user(env->gpr[1], (unsigned long *)newsp)) ++ goto badframe; ++ env->gpr[1] = newsp; ++ env->gpr[3] = sig; ++ env->gpr[4] = (unsigned long) sc; ++ env->nip = (unsigned long) ka->_sa_handler; ++ env->lr = (unsigned long) frame->mctx.tramp; ++ /* FIXME: env->trap = 0; */ ++ ++ return; ++ ++badframe: ++#ifdef DEBUG_SIGNAL ++ fprintf(stderr, ++ "badframe in handle_signal, frame=%p newsp=%lx\n", ++ frame, newsp); ++#endif ++ force_sig(TARGET_SIGSEGV); ++} ++ ++static void setup_rt_frame(int sig, struct target_sigaction *ka, ++ target_siginfo_t *info, ++ target_sigset_t *set, CPUState *env) ++{ ++ fprintf(stderr, "setup_rt_frame: not implemented\n"); ++} ++ ++long do_sigreturn(CPUState *env) ++{ ++ struct target_sigcontext *sc; ++ struct target_sigcontext sigctx; ++ struct target_mcontext *sr; ++ target_sigset_t set; ++ sigset_t host_set; ++ ++ /* Always make any pending restarted system calls return -EINTR */ ++#if 0 /* FIXME */ ++ current_thread_info()->restart_block.fn = do_no_restart_syscall; ++#endif ++ ++ sc = (struct target_sigcontext *)(env->gpr[1] + __SIGNAL_FRAMESIZE); ++ if (!memcpy(&sigctx, sc, sizeof(sigctx))) ++ goto badframe; ++ ++ set.sig[0] = sigctx.oldmask; ++ set.sig[1] = sigctx._unused[3]; ++ target_to_host_sigset_internal(&host_set, &set); ++ sigprocmask(SIG_SETMASK, &host_set, NULL); ++ ++ sr = (struct target_mcontext *) tswapl((target_ulong)sigctx.regs); ++ if (!access_ok(VERIFY_READ, sr, sizeof(*sr)) ++ || restore_user_regs(env, sr, 1)) ++ goto badframe; ++ ++ return 0; ++ ++badframe: ++ force_sig(TARGET_SIGSEGV); ++ return 0; ++} ++ ++long do_rt_sigreturn(CPUState *env) ++{ ++ fprintf(stderr, "do_rt_sigreturn: not implemented\n"); ++ return -ENOSYS; ++} ++ + #else + + static void setup_frame(int sig, struct target_sigaction *ka, +Index: qemu-0.9.1+svn20081012/target-ppc/cpu.h +=================================================================== +--- qemu-0.9.1+svn20081012.orig/target-ppc/cpu.h 2008-09-20 10:07:15.000000000 +0200 ++++ qemu-0.9.1+svn20081012/target-ppc/cpu.h 2008-10-12 18:54:50.000000000 +0200 +@@ -728,6 +728,10 @@ + target_ulong ppc_load_xer (CPUPPCState *env); + void ppc_store_xer (CPUPPCState *env, target_ulong value); + void ppc_store_msr (CPUPPCState *env, target_ulong value); ++float64 ppc_load_fpscr(CPUPPCState *env); ++void ppc_store_fpscr(CPUPPCState *env, float64 f, uint32_t mask); ++uint32_t ppc_load_cr (CPUPPCState *env); ++void ppc_store_cr (CPUPPCState *env, uint32_t value, uint32_t mask); + + void cpu_ppc_reset (void *opaque); + +Index: qemu-0.9.1+svn20081012/target-ppc/helper.c +=================================================================== +--- qemu-0.9.1+svn20081012.orig/target-ppc/helper.c 2008-06-29 03:03:05.000000000 +0200 ++++ qemu-0.9.1+svn20081012/target-ppc/helper.c 2008-10-12 18:54:50.000000000 +0200 +@@ -2140,6 +2140,60 @@ + hreg_store_msr(env, value, 0); + } + ++#if defined(WORDS_BIGENDIAN) ++#define WORD0 0 ++#define WORD1 1 ++#else ++#define WORD0 1 ++#define WORD1 0 ++#endif ++float64 ppc_load_fpscr(CPUPPCState *env) ++{ ++ /* The 32 MSB of the target fpr are undefined. ++ * They'll be zero... ++ */ ++ union { ++ float64 d; ++ struct { ++ uint32_t u[2]; ++ } s; ++ } u; ++ ++ u.s.u[WORD0] = 0; ++ u.s.u[WORD1] = env->fpscr; ++ return u.d; ++} ++#undef WORD0 ++#undef WORD1 ++ ++void ppc_store_fpscr(CPUPPCState *env, float64 f, uint32_t mask) ++{ ++ env->ft0 = f; ++ do_store_fpscr(mask); ++} ++ ++uint32_t ppc_load_cr (CPUPPCState *env) ++{ ++ return (env->crf[0] << 28) | ++ (env->crf[1] << 24) | ++ (env->crf[2] << 20) | ++ (env->crf[3] << 16) | ++ (env->crf[4] << 12) | ++ (env->crf[5] << 8) | ++ (env->crf[6] << 4) | ++ (env->crf[7] << 0); ++} ++ ++void ppc_store_cr (CPUPPCState *env, uint32_t value, uint32_t mask) ++{ ++ int i, sh; ++ ++ for (i = 0, sh = 7; i < 8; i++, sh--) { ++ if (mask & (1 << sh)) ++ env->crf[i] = (value >> (sh * 4)) & 0xFUL; ++ } ++} ++ + /*****************************************************************************/ + /* Exception processing */ + #if defined (CONFIG_USER_ONLY) --- qemu-0.9.1+svn20081112.orig/debian/patches/91_security.patch +++ qemu-0.9.1+svn20081112/debian/patches/91_security.patch @@ -0,0 +1,220 @@ +Fix CVE-2008-0928 - insufficient block device address range checking + +Qemu 0.9.1 and earlier does not perform range checks for block device +read or write requests, which allows guest host users with root +privileges to access arbitrary memory and escape the virtual machine. + +diff -Nurd qemu-0.9.1.orig/block.c qemu-0.9.1/block.c +--- qemu-0.9.1.orig/block.c 2008-03-11 18:22:42.000000000 +0100 ++++ qemu-0.9.1/block.c 2008-03-11 18:24:56.000000000 +0100 +@@ -123,6 +123,60 @@ + } + } + ++static int bdrv_rd_badreq_sectors(BlockDriverState *bs, ++ int64_t sector_num, int nb_sectors) ++{ ++ return ++ nb_sectors < 0 || ++ sector_num < 0 || ++ nb_sectors > bs->total_sectors || ++ sector_num > bs->total_sectors - nb_sectors; ++} ++ ++static int bdrv_rd_badreq_bytes(BlockDriverState *bs, ++ int64_t offset, int count) ++{ ++ int64_t size = bs->total_sectors << SECTOR_BITS; ++ return ++ count < 0 || ++ size < 0 || ++ count > size || ++ offset > size - count; ++} ++ ++static int bdrv_wr_badreq_sectors(BlockDriverState *bs, ++ int64_t sector_num, int nb_sectors) ++{ ++ if (sector_num < 0 || ++ nb_sectors < 0) ++ return 1; ++ ++ if (sector_num > bs->total_sectors - nb_sectors) { ++ if (bs->autogrow) ++ bs->total_sectors = sector_num + nb_sectors; ++ else ++ return 1; ++ } ++ return 0; ++} ++ ++static int bdrv_wr_badreq_bytes(BlockDriverState *bs, ++ int64_t offset, int count) ++{ ++ int64_t size = bs->total_sectors << SECTOR_BITS; ++ if (count < 0 || ++ offset < 0) ++ return 1; ++ ++ if (offset > size - count) { ++ if (bs->autogrow) ++ bs->total_sectors = (offset + count + SECTOR_SIZE - 1) >> SECTOR_BITS; ++ else ++ return 1; ++ } ++ return 0; ++} ++ + + static void bdrv_register(BlockDriver *bdrv) + { +@@ -335,6 +389,10 @@ + bs->read_only = 0; + bs->is_temporary = 0; + bs->encrypted = 0; ++ bs->autogrow = 0; ++ ++ if (flags & BDRV_O_AUTOGROW) ++ bs->autogrow = 1; + + if (flags & BDRV_O_SNAPSHOT) { + BlockDriverState *bs1; +@@ -379,6 +437,7 @@ + } + bs->drv = drv; + bs->opaque = qemu_mallocz(drv->instance_size); ++ bs->total_sectors = 0; /* driver will set if it does not do getlength */ + if (bs->opaque == NULL && drv->instance_size > 0) + return -1; + /* Note: for compatibility, we open disk image files as RDWR, and +@@ -444,6 +503,7 @@ + bs->drv = NULL; + + /* call the change callback */ ++ bs->total_sectors = 0; + bs->media_changed = 1; + if (bs->change_cb) + bs->change_cb(bs->change_opaque); +@@ -509,6 +569,8 @@ + if (!drv) + return -ENOMEDIUM; + ++ if (bdrv_rd_badreq_sectors(bs, sector_num, nb_sectors)) ++ return -EDOM; + if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) { + memcpy(buf, bs->boot_sector_data, 512); + sector_num++; +@@ -549,8 +611,8 @@ + return -ENOMEDIUM; + if (bs->read_only) + return -EACCES; +- if (sector_num < 0) +- return -EINVAL; ++ if (bdrv_wr_badreq_sectors(bs, sector_num, nb_sectors)) ++ return -EDOM; + if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) { + memcpy(bs->boot_sector_data, buf, 512); + } +@@ -682,6 +744,8 @@ + return -ENOMEDIUM; + if (!drv->bdrv_pread) + return bdrv_pread_em(bs, offset, buf1, count1); ++ if (bdrv_rd_badreq_bytes(bs, offset, count1)) ++ return -EDOM; + return drv->bdrv_pread(bs, offset, buf1, count1); + } + +@@ -697,6 +761,8 @@ + return -ENOMEDIUM; + if (!drv->bdrv_pwrite) + return bdrv_pwrite_em(bs, offset, buf1, count1); ++ if (bdrv_wr_badreq_bytes(bs, offset, count1)) ++ return -EDOM; + return drv->bdrv_pwrite(bs, offset, buf1, count1); + } + +@@ -963,6 +1029,8 @@ + return -ENOMEDIUM; + if (!drv->bdrv_write_compressed) + return -ENOTSUP; ++ if (bdrv_wr_badreq_sectors(bs, sector_num, nb_sectors)) ++ return -EDOM; + return drv->bdrv_write_compressed(bs, sector_num, buf, nb_sectors); + } + +@@ -1109,6 +1177,8 @@ + + if (!drv) + return NULL; ++ if (bdrv_rd_badreq_sectors(bs, sector_num, nb_sectors)) ++ return NULL; + + /* XXX: we assume that nb_sectors == 0 is suppored by the async read */ + if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) { +@@ -1140,6 +1210,8 @@ + return NULL; + if (bs->read_only) + return NULL; ++ if (bdrv_wr_badreq_sectors(bs, sector_num, nb_sectors)) ++ return NULL; + if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) { + memcpy(bs->boot_sector_data, buf, 512); + } +diff -Nurd qemu-0.9.1.orig/block.h qemu-0.9.1/block.h +--- qemu-0.9.1.orig/block.h 2008-01-06 20:38:42.000000000 +0100 ++++ qemu-0.9.1/block.h 2008-03-11 18:23:38.000000000 +0100 +@@ -45,6 +45,7 @@ + it (default for + bdrv_file_open()) */ + #define BDRV_O_DIRECT 0x0020 ++#define BDRV_O_AUTOGROW 0x0040 /* Allow backing file to extend when writing past end of file */ + + #ifndef QEMU_IMG + void bdrv_info(void); +diff -Nurd qemu-0.9.1.orig/block_int.h qemu-0.9.1/block_int.h +--- qemu-0.9.1.orig/block_int.h 2008-01-06 20:38:42.000000000 +0100 ++++ qemu-0.9.1/block_int.h 2008-03-11 18:23:38.000000000 +0100 +@@ -97,6 +97,7 @@ + int locked; /* if true, the media cannot temporarily be ejected */ + int encrypted; /* if true, the media is encrypted */ + int sg; /* if true, the device is a /dev/sg* */ ++ int autogrow; /* if true, the backing store can auto-extend to allocate new extents */ + /* event callback when inserting/removing */ + void (*change_cb)(void *opaque); + void *change_opaque; +diff -Nurd qemu-0.9.1.orig/block-qcow2.c qemu-0.9.1/block-qcow2.c +--- qemu-0.9.1.orig/block-qcow2.c 2008-01-06 20:38:42.000000000 +0100 ++++ qemu-0.9.1/block-qcow2.c 2008-03-11 18:23:38.000000000 +0100 +@@ -191,7 +191,7 @@ + int len, i, shift, ret; + QCowHeader header; + +- ret = bdrv_file_open(&s->hd, filename, flags); ++ ret = bdrv_file_open(&s->hd, filename, flags | BDRV_O_AUTOGROW); + if (ret < 0) + return ret; + if (bdrv_pread(s->hd, 0, &header, sizeof(header)) != sizeof(header)) +diff -Nurd qemu-0.9.1.orig/block-qcow.c qemu-0.9.1/block-qcow.c +--- qemu-0.9.1.orig/block-qcow.c 2008-01-06 20:38:41.000000000 +0100 ++++ qemu-0.9.1/block-qcow.c 2008-03-11 18:23:38.000000000 +0100 +@@ -95,7 +95,7 @@ + int len, i, shift, ret; + QCowHeader header; + +- ret = bdrv_file_open(&s->hd, filename, flags); ++ ret = bdrv_file_open(&s->hd, filename, flags | BDRV_O_AUTOGROW); + if (ret < 0) + return ret; + if (bdrv_pread(s->hd, 0, &header, sizeof(header)) != sizeof(header)) +diff -Nurd qemu-0.9.1.orig/block-vmdk.c qemu-0.9.1/block-vmdk.c +--- qemu-0.9.1.orig/block-vmdk.c 2008-01-06 20:38:42.000000000 +0100 ++++ qemu-0.9.1/block-vmdk.c 2008-03-11 18:23:38.000000000 +0100 +@@ -376,7 +376,7 @@ + flags = BDRV_O_RDONLY; + fprintf(stderr, "(VMDK) image open: flags=0x%x filename=%s\n", flags, bs->filename); + +- ret = bdrv_file_open(&s->hd, filename, flags); ++ ret = bdrv_file_open(&s->hd, filename, flags | BDRV_O_AUTOGROW); + if (ret < 0) + return ret; + if (bdrv_pread(s->hd, 0, &magic, sizeof(magic)) != sizeof(magic)) --- qemu-0.9.1+svn20081112.orig/debian/patches/31_syscalls.patch +++ qemu-0.9.1+svn20081112/debian/patches/31_syscalls.patch @@ -0,0 +1,35 @@ +Index: qemu-0.9.1+svn20081012/linux-user/syscall.c +=================================================================== +--- qemu-0.9.1+svn20081012.orig/linux-user/syscall.c 2008-10-12 18:54:50.000000000 +0200 ++++ qemu-0.9.1+svn20081012/linux-user/syscall.c 2008-10-12 18:58:14.000000000 +0200 +@@ -296,6 +296,7 @@ + extern int setfsuid(int); + extern int setfsgid(int); + extern int setgroups(int, gid_t *); ++extern int uselib(const char*); + + #define ERRNO_TABLE_SIZE 1200 + +@@ -4437,7 +4438,8 @@ + #endif + #ifdef TARGET_NR_uselib + case TARGET_NR_uselib: +- goto unimplemented; ++ ret = get_errno(uselib(path((const char*)arg1))); ++ break; + #endif + #ifdef TARGET_NR_swapon + case TARGET_NR_swapon: +Index: qemu-0.9.1+svn20081012/Makefile.target +=================================================================== +--- qemu-0.9.1+svn20081012.orig/Makefile.target 2008-10-12 18:54:50.000000000 +0200 ++++ qemu-0.9.1+svn20081012/Makefile.target 2008-10-12 18:54:50.000000000 +0200 +@@ -165,7 +165,7 @@ + OP_CFLAGS+=$(OS_CFLAGS) $(ARCH_CFLAGS) + + CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE +-LIBS+=-lm ++LIBS+=-lm -lrt + ifdef CONFIG_WIN32 + LIBS+=-lwinmm -lws2_32 -liphlpapi + endif --- qemu-0.9.1+svn20081112.orig/debian/patches/01_nostrip.patch +++ qemu-0.9.1+svn20081112/debian/patches/01_nostrip.patch @@ -0,0 +1,26 @@ +Index: qemu-0.9.1+svn20081012/Makefile +=================================================================== +--- qemu-0.9.1+svn20081012.orig/Makefile 2008-10-12 18:54:50.000000000 +0200 ++++ qemu-0.9.1+svn20081012/Makefile 2008-10-12 18:54:50.000000000 +0200 +@@ -230,7 +230,7 @@ + install: all $(if $(BUILD_DOCS),install-doc) + mkdir -p "$(DESTDIR)$(bindir)" + ifneq ($(TOOLS),) +- $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)" ++ $(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(bindir)" + endif + ifndef CONFIG_WIN32 + mkdir -p "$(DESTDIR)$(datadir)/keymaps" +Index: qemu-0.9.1+svn20081012/Makefile.target +=================================================================== +--- qemu-0.9.1+svn20081012.orig/Makefile.target 2008-10-11 19:55:29.000000000 +0200 ++++ qemu-0.9.1+svn20081012/Makefile.target 2008-10-12 18:58:27.000000000 +0200 +@@ -694,7 +694,7 @@ + + install: all + ifneq ($(PROGS),) +- $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)" ++ $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)" + endif + + # Include automatically generated dependency files --- qemu-0.9.1+svn20081112.orig/debian/patches/35_syscall_sockaddr.patch +++ qemu-0.9.1+svn20081112/debian/patches/35_syscall_sockaddr.patch @@ -0,0 +1,69 @@ +Index: qemu-0.9.1+svn20081012/linux-user/syscall.c +=================================================================== +--- qemu-0.9.1+svn20081012.orig/linux-user/syscall.c 2008-10-12 18:57:43.000000000 +0200 ++++ qemu-0.9.1+svn20081012/linux-user/syscall.c 2008-10-12 18:58:10.000000000 +0200 +@@ -56,6 +56,7 @@ + //#include + #include + #include ++#include + #include + #include + +@@ -689,14 +690,17 @@ + + static inline abi_long target_to_host_sockaddr(struct sockaddr *addr, + abi_ulong target_addr, +- socklen_t len) ++ socklen_t *target_len) + { ++ const socklen_t len = sizeof (struct sockaddr_un); + struct target_sockaddr *target_saddr; + +- target_saddr = lock_user(VERIFY_READ, target_addr, len, 1); ++ target_saddr = lock_user(VERIFY_READ, target_addr, *target_len, 1); + if (!target_saddr) + return -TARGET_EFAULT; +- memcpy(addr, target_saddr, len); ++ if (target_saddr->sa_family == AF_UNIX && *target_len > len) ++ *target_len = len; ++ memcpy(addr, target_saddr, *target_len); + addr->sa_family = tswap16(target_saddr->sa_family); + unlock_user(target_saddr, target_addr, 0); + +@@ -1247,7 +1251,7 @@ + { + void *addr = alloca(addrlen); + +- target_to_host_sockaddr(addr, target_addr, addrlen); ++ target_to_host_sockaddr(addr, target_addr, &addrlen); + return get_errno(bind(sockfd, addr, addrlen)); + } + +@@ -1257,7 +1261,7 @@ + { + void *addr = alloca(addrlen); + +- target_to_host_sockaddr(addr, target_addr, addrlen); ++ target_to_host_sockaddr(addr, target_addr, &addrlen); + return get_errno(connect(sockfd, addr, addrlen)); + } + +@@ -1282,7 +1286,7 @@ + msg.msg_namelen = tswap32(msgp->msg_namelen); + msg.msg_name = alloca(msg.msg_namelen); + target_to_host_sockaddr(msg.msg_name, tswapl(msgp->msg_name), +- msg.msg_namelen); ++ &msg.msg_namelen); + } else { + msg.msg_name = NULL; + msg.msg_namelen = 0; +@@ -1414,7 +1418,7 @@ + return -TARGET_EFAULT; + if (target_addr) { + addr = alloca(addrlen); +- target_to_host_sockaddr(addr, target_addr, addrlen); ++ target_to_host_sockaddr(addr, target_addr, &addrlen); + ret = get_errno(sendto(fd, host_msg, len, flags, addr, addrlen)); + } else { + ret = get_errno(send(fd, host_msg, len, flags)); --- qemu-0.9.1+svn20081112.orig/debian/patches/07_i386_exec_name.patch +++ qemu-0.9.1+svn20081112/debian/patches/07_i386_exec_name.patch @@ -0,0 +1,27 @@ +Index: qemu-0.9.1+svn20081012/Makefile.target +=================================================================== +--- qemu-0.9.1+svn20081012.orig/Makefile.target 2008-10-12 18:54:50.000000000 +0200 ++++ qemu-0.9.1+svn20081012/Makefile.target 2008-10-12 18:58:15.000000000 +0200 +@@ -63,12 +63,8 @@ + QEMU_PROG=qemu-$(TARGET_ARCH2) + else + # system emulator name +-ifeq ($(TARGET_ARCH), i386) +-QEMU_PROG=qemu$(EXESUF) +-else + QEMU_PROG=qemu-system-$(TARGET_ARCH2)$(EXESUF) + endif +-endif + + PROGS=$(QEMU_PROG) + +@@ -696,6 +692,9 @@ + ifneq ($(PROGS),) + $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)" + endif ++ifeq ($(TARGET_ARCH), i386) ++ ln -sf qemu-system-i386$(EXESUF) "$(DESTDIR)$(bindir)/qemu$(EXESUF)" ++endif + + # Include automatically generated dependency files + -include $(wildcard *.d */*.d) --- qemu-0.9.1+svn20081112.orig/debian/patches/66_tls_ld.patch +++ qemu-0.9.1+svn20081112/debian/patches/66_tls_ld.patch @@ -0,0 +1,25 @@ +Index: qemu-0.9.1+svn20081012/i386.ld +=================================================================== +--- qemu-0.9.1+svn20081012.orig/i386.ld 2008-10-12 19:12:59.000000000 +0200 ++++ qemu-0.9.1+svn20081012/i386.ld 2008-10-12 19:13:07.000000000 +0200 +@@ -28,6 +28,10 @@ + { *(.rel.rodata) *(.rel.gnu.linkonce.r*) } + .rela.rodata : + { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } ++ .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } ++ .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } ++ .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } ++ .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } + .rel.got : { *(.rel.got) } + .rela.got : { *(.rela.got) } + .rel.ctors : { *(.rel.ctors) } +@@ -53,6 +57,9 @@ + _etext = .; + PROVIDE (etext = .); + .fini : { *(.fini) } =0x47ff041f ++ /* Thread Local Storage sections */ ++ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } ++ .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } + . = ALIGN(32 / 8); + PROVIDE (__preinit_array_start = .); + .preinit_array : { *(.preinit_array) } --- qemu-0.9.1+svn20081112.orig/debian/patches/65_kfreebsd.patch +++ qemu-0.9.1+svn20081112/debian/patches/65_kfreebsd.patch @@ -0,0 +1,12 @@ +Index: qemu-0.9.1+svn20081012/configure +=================================================================== +--- qemu-0.9.1+svn20081012.orig/configure 2008-10-12 19:12:59.000000000 +0200 ++++ qemu-0.9.1+svn20081012/configure 2008-10-12 19:13:07.000000000 +0200 +@@ -138,6 +138,7 @@ + if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then + kqemu="yes" + fi ++OS_LDFLAGS="-lfreebsd" + ;; + FreeBSD) + bsd="yes" --- qemu-0.9.1+svn20081112.orig/debian/patches/10_signal_jobs.patch +++ qemu-0.9.1+svn20081112/debian/patches/10_signal_jobs.patch @@ -0,0 +1,21 @@ +Index: qemu-0.9.1+svn20081012/linux-user/signal.c +=================================================================== +--- qemu-0.9.1+svn20081012.orig/linux-user/signal.c 2008-10-08 16:39:08.000000000 +0200 ++++ qemu-0.9.1+svn20081012/linux-user/signal.c 2008-10-12 18:58:23.000000000 +0200 +@@ -361,10 +361,15 @@ + k = &ts->sigtab[sig - 1]; + handler = sigact_table[sig - 1]._sa_handler; + if (handler == TARGET_SIG_DFL) { ++ if (sig == TARGET_SIGTSTP || sig == TARGET_SIGTTIN || sig == TARGET_SIGTTOU) { ++ kill(getpid(),SIGSTOP); ++ return 0; ++ } else + /* default handler : ignore some signal. The other are fatal */ + if (sig != TARGET_SIGCHLD && + sig != TARGET_SIGURG && +- sig != TARGET_SIGWINCH) { ++ sig != TARGET_SIGWINCH && ++ sig != TARGET_SIGCONT) { + force_sig(sig); + } else { + return 0; /* indicate ignored */ --- qemu-0.9.1+svn20081112.orig/debian/patches/50_linuxbios_isa_bios_ram.patch +++ qemu-0.9.1+svn20081112/debian/patches/50_linuxbios_isa_bios_ram.patch @@ -0,0 +1,30 @@ +Index: qemu-0.9.1+svn20081012/hw/pc.c +=================================================================== +--- qemu-0.9.1+svn20081012.orig/hw/pc.c 2008-10-07 22:39:39.000000000 +0200 ++++ qemu-0.9.1+svn20081012/hw/pc.c 2008-10-12 19:08:47.000000000 +0200 +@@ -785,6 +785,7 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size, + * and some bios areas, which will be registered later + */ + ram_addr = qemu_ram_alloc(0x100000 - 0xa0000); ++ cpu_register_physical_memory(0xa0000, 0x100000 - 0xa0000, ram_addr); + ram_addr = qemu_ram_alloc(below_4g_mem_size - 0x100000); + cpu_register_physical_memory(0x100000, + below_4g_mem_size - 0x100000, +@@ -841,15 +842,15 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size, + cpu_register_physical_memory(0xc0000, 0x10000, + vga_bios_offset | IO_MEM_ROM); + +- /* map the last 128KB of the BIOS in ISA space */ ++ /* copy the last 128KB of the BIOS to ISA space */ + isa_bios_size = bios_size; + if (isa_bios_size > (128 * 1024)) + isa_bios_size = 128 * 1024; +- cpu_register_physical_memory(0x100000 - isa_bios_size, +- isa_bios_size, +- (bios_offset + bios_size - isa_bios_size) | IO_MEM_ROM); ++ memcpy(phys_ram_base + 0x100000 - isa_bios_size, ++ phys_ram_base + bios_offset + bios_size - isa_bios_size, ++ isa_bios_size); + + { + ram_addr_t option_rom_offset; --- qemu-0.9.1+svn20081112.orig/debian/patches/49_null_check.patch +++ qemu-0.9.1+svn20081112/debian/patches/49_null_check.patch @@ -0,0 +1,60 @@ +Index: qemu-0.9.1+svn20081012/linux-user/path.c +=================================================================== +--- qemu-0.9.1+svn20081012.orig/linux-user/path.c 2008-06-03 21:51:57.000000000 +0200 ++++ qemu-0.9.1+svn20081012/linux-user/path.c 2008-10-12 19:08:30.000000000 +0200 +@@ -152,7 +152,7 @@ + { + /* Only do absolute paths: quick and dirty, but should mostly be OK. + Could do relative by tracking cwd. */ +- if (!base || name[0] != '/') ++ if (!base || !name || name[0] != '/') + return name; + + return follow_path(base, name) ?: name; +Index: qemu-0.9.1+svn20081012/linux-user/syscall.c +=================================================================== +--- qemu-0.9.1+svn20081012.orig/linux-user/syscall.c 2008-10-12 19:08:30.000000000 +0200 ++++ qemu-0.9.1+svn20081012/linux-user/syscall.c 2008-10-12 19:08:30.000000000 +0200 +@@ -1369,7 +1369,7 @@ + abi_long ret; + + if (get_user_u32(addrlen, target_addrlen_addr)) +- return -TARGET_EFAULT; ++ return -TARGET_EINVAL; + + addr = alloca(addrlen); + +@@ -3475,10 +3475,14 @@ + ret = 0; /* avoid warning */ + break; + case TARGET_NR_read: +- if (!(p = lock_user(VERIFY_WRITE, arg2, arg3, 0))) +- goto efault; +- ret = get_errno(read(arg1, p, arg3)); +- unlock_user(p, arg2, ret); ++ if (!arg3) ++ ret = 0; ++ else { ++ if (!(p = lock_user(VERIFY_WRITE, arg2, arg3, 0))) ++ goto efault; ++ ret = get_errno(read(arg1, p, arg3)); ++ unlock_user(p, arg2, ret); ++ } + break; + case TARGET_NR_write: + if (!(p = lock_user(VERIFY_READ, arg2, arg3, 1))) +@@ -3979,8 +3983,12 @@ + goto unimplemented; + #endif + case TARGET_NR_acct: +- if (!(p = lock_user_string(arg1))) +- goto efault; ++ if (arg1) { ++ if (!(p = lock_user_string(arg1))) ++ goto efault; ++ } else { ++ p = NULL; ++ } + ret = get_errno(acct(path(p))); + unlock_user(p, arg1, 0); + break; --- qemu-0.9.1+svn20081112.orig/debian/patches/11_signal_sigaction.patch +++ qemu-0.9.1+svn20081112/debian/patches/11_signal_sigaction.patch @@ -0,0 +1,16 @@ +Index: qemu-0.9.1+svn20081012/linux-user/signal.c +=================================================================== +--- qemu-0.9.1+svn20081012.orig/linux-user/signal.c 2008-10-12 18:54:50.000000000 +0200 ++++ qemu-0.9.1+svn20081012/linux-user/signal.c 2008-10-12 18:58:20.000000000 +0200 +@@ -509,6 +509,11 @@ + + if (sig < 1 || sig > TARGET_NSIG || sig == SIGKILL || sig == SIGSTOP) + return -EINVAL; ++ ++ /* no point doing the stuff as those are not allowed for sigaction */ ++ if ((sig == TARGET_SIGKILL) || (sig == TARGET_SIGSTOP)) ++ return -EINVAL; ++ + k = &sigact_table[sig - 1]; + #if defined(DEBUG_SIGNAL) + fprintf(stderr, "sigaction sig=%d act=0x%08x, oact=0x%08x\n", --- qemu-0.9.1+svn20081112.orig/debian/patches/48_signal_terminate.patch +++ qemu-0.9.1+svn20081112/debian/patches/48_signal_terminate.patch @@ -0,0 +1,58 @@ +Index: qemu-0.9.1+svn20081012/linux-user/signal.c +=================================================================== +--- qemu-0.9.1+svn20081012.orig/linux-user/signal.c 2008-10-12 18:54:50.000000000 +0200 ++++ qemu-0.9.1+svn20081012/linux-user/signal.c 2008-10-12 18:57:43.000000000 +0200 +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + #include + + #include "qemu.h" +@@ -335,21 +336,33 @@ + static void __attribute((noreturn)) force_sig(int sig) + { + int host_sig; ++ struct sigaction act; + host_sig = target_to_host_signal(sig); + fprintf(stderr, "qemu: uncaught target signal %d (%s) - exiting\n", + sig, strsignal(host_sig)); +-#if 1 +- _exit(-host_sig); +-#else +- { +- struct sigaction act; +- sigemptyset(&act.sa_mask); +- act.sa_flags = SA_SIGINFO; +- act.sa_sigaction = SIG_DFL; +- sigaction(SIGABRT, &act, NULL); +- abort(); +- } +-#endif ++ ++ /* The proper exit code for dieing from an uncaught signal is ++ * -. The kernel doesn't allow exit() or _exit() to pass ++ * a negative value. To get the proper exit code we need to ++ * actually die from an uncaught signal. Here the default signal ++ * handler is installed, we send ourself a signal and we wait for ++ * it to arrive. */ ++ sigfillset(&act.sa_mask); ++ act.sa_handler = SIG_DFL; ++ sigaction(host_sig, &act, NULL); ++ ++ /* For some reason raise(host_sig) doesn't send the signal when ++ * statically linked on x86-64. */ ++ kill(getpid(), host_sig); ++ ++ /* Make sure the signal isn't masked (just reuse the mask inside ++ of act) */ ++ sigdelset(&act.sa_mask, host_sig); ++ sigsuspend(&act.sa_mask); ++ ++ /* unreachable */ ++ assert(0); ++ + } + + /* queue a signal so that it will be send to the virtual CPU as soon --- qemu-0.9.1+svn20081112.orig/debian/patches/30_syscall_ipc.patch +++ qemu-0.9.1+svn20081112/debian/patches/30_syscall_ipc.patch @@ -0,0 +1,25 @@ +Index: qemu-0.9.1+svn20081012/linux-user/syscall.c +=================================================================== +--- qemu-0.9.1+svn20081012.orig/linux-user/syscall.c 2008-10-12 18:54:50.000000000 +0200 ++++ qemu-0.9.1+svn20081012/linux-user/syscall.c 2008-10-12 18:58:15.000000000 +0200 +@@ -46,8 +46,10 @@ + #include + #include + #include ++#include + #include + #include ++#include + #include + #include + #include +@@ -2198,7 +2200,8 @@ + ret = get_errno(shmctl(first, second, NULL)); + break; + default: +- goto unimplemented; ++ ret = get_errno(shmctl(first, second, (struct shmid_ds *) ptr)); ++ break; + } + break; + default: --- qemu-0.9.1+svn20081112.orig/debian/patches/44_socklen_t_check.patch +++ qemu-0.9.1+svn20081112/debian/patches/44_socklen_t_check.patch @@ -0,0 +1,79 @@ +Index: qemu-0.9.1+svn20081012/linux-user/syscall.c +=================================================================== +--- qemu-0.9.1+svn20081012.orig/linux-user/syscall.c 2008-10-12 18:57:43.000000000 +0200 ++++ qemu-0.9.1+svn20081012/linux-user/syscall.c 2008-10-12 18:57:43.000000000 +0200 +@@ -1245,11 +1245,19 @@ + return get_errno(socket(domain, type, protocol)); + } + ++/* MAX_SOCK_ADDR from linux/net/socket.c */ ++#define MAX_SOCK_ADDR 128 ++ + /* do_bind() Must return target values and target errnos. */ + static abi_long do_bind(int sockfd, abi_ulong target_addr, + socklen_t addrlen) + { +- void *addr = alloca(addrlen); ++ void *addr; ++ ++ if (addrlen < 0 || addrlen > MAX_SOCK_ADDR) ++ return -TARGET_EINVAL; ++ ++ addr = alloca(addrlen); + + target_to_host_sockaddr(addr, target_addr, &addrlen); + return get_errno(bind(sockfd, addr, addrlen)); +@@ -1259,7 +1267,12 @@ + static abi_long do_connect(int sockfd, abi_ulong target_addr, + socklen_t addrlen) + { +- void *addr = alloca(addrlen); ++ void *addr; ++ ++ if (addrlen < 0 || addrlen > MAX_SOCK_ADDR) ++ return -TARGET_EINVAL; ++ ++ addr = alloca(addrlen); + + target_to_host_sockaddr(addr, target_addr, &addrlen); + return get_errno(connect(sockfd, addr, addrlen)); +@@ -1328,6 +1341,8 @@ + target_addr != (target_ulong)NULL) { + if (get_user_u32(addrlen, target_addrlen_addr)) + return -TARGET_EFAULT; ++ if (addrlen < 0 || addrlen > MAX_SOCK_ADDR) ++ return -TARGET_EINVAL; + addr = alloca(addrlen); + ret = get_errno(accept(fd, addr, &addrlen)); + } else { +@@ -1378,6 +1393,9 @@ + if (get_user_u32(addrlen, target_addrlen_addr)) + return -TARGET_EFAULT; + ++ if (addrlen < 0 || addrlen > MAX_SOCK_ADDR) ++ return -TARGET_EINVAL; ++ + addr = alloca(addrlen); + + ret = get_errno(getsockname(fd, addr, &addrlen)); +@@ -1413,6 +1431,9 @@ + void *host_msg; + abi_long ret; + ++ if (addrlen < 0 || addrlen > MAX_SOCK_ADDR) ++ return -TARGET_EINVAL; ++ + host_msg = lock_user(VERIFY_READ, msg, len, 1); + if (!host_msg) + return -TARGET_EFAULT; +@@ -1445,6 +1466,10 @@ + ret = -TARGET_EFAULT; + goto fail; + } ++ if (addrlen < 0 || addrlen > MAX_SOCK_ADDR) { ++ ret = -TARGET_EINVAL; ++ goto fail; ++ } + addr = alloca(addrlen); + ret = get_errno(recvfrom(fd, host_msg, len, flags, addr, &addrlen)); + } else { --- qemu-0.9.1+svn20081112.orig/debian/patches/56_dhcp.patch +++ qemu-0.9.1+svn20081112/debian/patches/56_dhcp.patch @@ -0,0 +1,23 @@ +diff --git a/slirp/bootp.c b/slirp/bootp.c +index 3ae3db2..6166ccc 100644 +--- a/slirp/bootp.c ++++ b/slirp/bootp.c +@@ -156,10 +156,15 @@ static void bootp_reply(struct bootp_t *bp) + + if (dhcp_msg_type == DHCPDISCOVER) { + new_addr: +- bc = get_new_addr(&daddr.sin_addr); ++ /* Try to find a previously assigned address */ ++ bc = find_addr(&daddr.sin_addr, bp->bp_hwaddr); + if (!bc) { +- dprintf("no address left\n"); +- return; ++ /* Try to find the next available address */ ++ bc = get_new_addr(&daddr.sin_addr); ++ if (!bc) { ++ dprintf("no address left\n"); ++ return; ++ } + } + memcpy(bc->macaddr, client_ethaddr, 6); + } else { --- qemu-0.9.1+svn20081112.orig/debian/patches/06_exit_segfault.patch +++ qemu-0.9.1+svn20081112/debian/patches/06_exit_segfault.patch @@ -0,0 +1,40 @@ +Index: qemu-0.9.1+svn20081012/linux-user/main.c +=================================================================== +--- qemu-0.9.1+svn20081012.orig/linux-user/main.c 2008-10-08 16:26:58.000000000 +0200 ++++ qemu-0.9.1+svn20081012/linux-user/main.c 2008-10-12 18:54:50.000000000 +0200 +@@ -995,7 +995,7 @@ + default: + printf ("Unhandled trap: 0x%x\n", trapnr); + cpu_dump_state(env, stderr, fprintf, 0); +- exit (1); ++ _exit (1); + } + process_pending_signals (env); + } +@@ -1927,7 +1927,7 @@ + default: + printf ("Unhandled trap: 0x%x\n", trapnr); + cpu_dump_state(env, stderr, fprintf, 0); +- exit (1); ++ _exit (1); + } + process_pending_signals (env); + } +@@ -2263,7 +2263,7 @@ + for(item = cpu_log_items; item->mask != 0; item++) { + printf("%-10s %s\n", item->name, item->help); + } +- exit(1); ++ _exit(1); + } + cpu_set_log(mask); + } else if (!strcmp(r, "s")) { +@@ -2282,7 +2282,7 @@ + if (qemu_host_page_size == 0 || + (qemu_host_page_size & (qemu_host_page_size - 1)) != 0) { + fprintf(stderr, "page size must be a power of two\n"); +- exit(1); ++ _exit(1); + } + } else if (!strcmp(r, "g")) { + gdbstub_port = atoi(argv[optind++]); --- qemu-0.9.1+svn20081112.orig/debian/patches/55_unmux_socketcall.patch +++ qemu-0.9.1+svn20081112/debian/patches/55_unmux_socketcall.patch @@ -0,0 +1,16 @@ +Index: qemu-0.9.1+svn20081012/linux-user/arm/syscall_nr.h +=================================================================== +--- qemu-0.9.1+svn20081012.orig/linux-user/arm/syscall_nr.h 2008-10-12 19:08:30.000000000 +0200 ++++ qemu-0.9.1+svn20081012/linux-user/arm/syscall_nr.h 2008-10-12 19:08:30.000000000 +0200 +@@ -256,9 +256,8 @@ + #define TARGET_NR_epoll_ctl (251) + #define TARGET_NR_epoll_wait (252) + #define TARGET_NR_remap_file_pages (253) +- /* 254 for set_thread_area */ +- /* 255 for get_thread_area */ +- /* 256 for set_tid_address */ ++#define TARGET_NR_set_thread_area (254) ++#define TARGET_NR_get_thread_area (255) + #define TARGET_NR_set_tid_address 256 + #define TARGET_NR_timer_create 257 + #define TARGET_NR_timer_settime 258 --- qemu-0.9.1+svn20081112.orig/debian/patches/32_syscall_sysctl.patch +++ qemu-0.9.1+svn20081112/debian/patches/32_syscall_sysctl.patch @@ -0,0 +1,50 @@ +Index: qemu-0.9.1+svn20081012/linux-user/syscall.c +=================================================================== +--- qemu-0.9.1+svn20081012.orig/linux-user/syscall.c 2008-10-12 18:54:50.000000000 +0200 ++++ qemu-0.9.1+svn20081012/linux-user/syscall.c 2008-10-12 18:58:12.000000000 +0200 +@@ -56,6 +56,7 @@ + //#include + #include + #include ++#include + #include + + #define termios host_termios +@@ -5158,9 +5159,34 @@ + break; + #endif + case TARGET_NR__sysctl: +- /* We don't implement this, but ENOTDIR is always a safe +- return value. */ +- ret = -TARGET_ENOTDIR; ++ { ++ struct __sysctl_args *args = (struct __sysctl_args *) arg1; ++ int *name_target, *name, nlen, *oldlenp, oldlen, newlen, i; ++ void *oldval, *newval; ++ ++ name_target = (int *) tswapl((long) args->name); ++ nlen = tswapl(args->nlen); ++ oldval = (void *) tswapl((long) args->oldval); ++ oldlenp = (int *) tswapl((long) args->oldlenp); ++ oldlen = tswapl(*oldlenp); ++ newval = (void *) tswapl((long) args->newval); ++ newlen = tswapl(args->newlen); ++ ++ name = alloca(nlen * sizeof (int)); ++ for (i = 0; i < nlen; i++) ++ name[i] = tswapl(name_target[i]); ++ ++ if (nlen == 2 && name[0] == CTL_KERN && name[1] == KERN_VERSION) { ++ ret = get_errno( ++ sysctl(name, nlen, oldval, &oldlen, newval, newlen)); ++ if (!is_error(ret)) { ++ *oldlenp = tswapl(oldlen); ++ } ++ } else { ++ gemu_log("qemu: Unsupported sysctl name\n"); ++ ret = -ENOSYS; ++ } ++ } + break; + case TARGET_NR_sched_setparam: + { --- qemu-0.9.1+svn20081112.orig/debian/patches/96_dirent.patch +++ qemu-0.9.1+svn20081112/debian/patches/96_dirent.patch @@ -0,0 +1,12 @@ +diff -upr a/linux-user/syscall.c b/linux-user/syscall.c +--- a/linux-user/syscall.c 2008-09-24 19:36:05.685790880 -0500 ++++ b/linux-user/syscall.c 2008-09-24 19:35:55.512791659 -0500 +@@ -70,7 +70,7 @@ + #include + #include + #include +-#include ++#include + #include + + #include "qemu.h" --- qemu-0.9.1+svn20081112.orig/debian/patches/95_evdev_keycode_map.patch +++ qemu-0.9.1+svn20081112/debian/patches/95_evdev_keycode_map.patch @@ -0,0 +1,219 @@ +# This code was ported from gtk-vnc, to handle evdev keycode mapping by +# Dustin Kirkland , 24 September 2008. + + +--- qemu/configure 2008-07-27 08:20:10.000000000 -0500 ++++ qemu/configure 2008-09-24 16:04:28.036791147 -0500 +@@ -1198,9 +1198,9 @@ if test "$sdl1" = "yes" ; then + echo "#define CONFIG_SDL 1" >> $config_h + echo "CONFIG_SDL=yes" >> $config_mak + if test "$target_softmmu" = "no" -o "$static" = "yes"; then +- echo "SDL_LIBS=$sdl_static_libs" >> $config_mak ++ echo "SDL_LIBS=-lX11 $sdl_static_libs" >> $config_mak + else +- echo "SDL_LIBS=`$sdl_config --libs`" >> $config_mak ++ echo "SDL_LIBS=-lX11 `$sdl_config --libs`" >> $config_mak + fi + if [ "${aa}" = "yes" ] ; then + echo "SDL_CFLAGS=`$sdl_config --cflags` `aalib-config --cflags`" >> $config_mak +--- qemu/sdl.c 2008-07-27 05:08:56.000000000 -0500 ++++ qemu/sdl.c 2008-09-24 16:39:19.713788782 -0500 +@@ -132,21 +132,7 @@ static uint8_t sdl_keyevent_to_keycode(c + + static uint8_t sdl_keyevent_to_keycode(const SDL_KeyboardEvent *ev) + { +- int keycode; +- +- keycode = ev->keysym.scancode; +- +- if (keycode < 9) { +- keycode = 0; +- } else if (keycode < 97) { +- keycode -= 8; /* just an offset */ +- } else if (keycode < 212) { +- /* use conversion table */ +- keycode = _translate_keycode(keycode - 97); +- } else { +- keycode = 0; +- } +- return keycode; ++ return _translate_keycode(ev->keysym.scancode); + } + + #endif +--- qemu/x_keymap.c 2008-07-27 05:08:56.000000000 -0500 ++++ qemu/x_keymap.c 2008-09-24 16:52:27.262129702 -0500 +@@ -24,7 +24,15 @@ + #include "qemu-common.h" + #include "console.h" + +-static const uint8_t x_keycode_to_pc_keycode[115] = { ++#include ++#include ++#include ++#include ++ ++#define TRUE 1 ++#define FALSE 0 ++ ++static const uint8_t x_keycode_to_pc_keycode[61] = { + 0xc7, /* 97 Home */ + 0xc8, /* 98 Up */ + 0xc9, /* 99 PgUp */ +@@ -86,27 +94,136 @@ static const uint8_t x_keycode_to_pc_key + 0x51, /* 155 KP_PgDn */ + 0x52, /* 156 KP_Ins */ + 0x53, /* 157 KP_Del */ +- 0x0, /* 158 */ +- 0x0, /* 159 */ +- 0x0, /* 160 */ +- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, /* 170 */ +- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, /* 180 */ +- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, /* 190 */ +- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, /* 200 */ +- 0x0, /* 201 */ +- 0x0, /* 202 */ +- 0x0, /* 203 */ +- 0x0, /* 204 */ +- 0x0, /* 205 */ +- 0x0, /* 206 */ +- 0x0, /* 207 */ +- 0x70, /* 208 Hiragana_Katakana */ +- 0x0, /* 209 */ +- 0x0, /* 210 */ +- 0x73, /* 211 backslash */ + }; + +-uint8_t _translate_keycode(const int key) ++/* This code was ported from gtk-vnc, to handle evdev keycode mapping by ++ * Dustin Kirkland , 24 September 2008. ++ * ++ * This table was put together by VirtualBox. It's based on the information in ++ * /usr/share/X11/xkb/keycodes/evdev using the x_keycode_to_pc_keycode table ++ * to get the pc keycodes. ++ */ ++ ++static const uint8_t evdev_keycode_to_pc_keycode[61] = { ++ 0x0, /* 97 EVDEV - RO ("Internet" Keyboards) */ ++ 0x0, /* 98 EVDEV - KATA (Katakana) */ ++ 0x0, /* 99 EVDEV - HIRA (Hiragana) */ ++ 0x79, /* 100 EVDEV - HENK (Henkan) */ ++ 0x70, /* 101 EVDEV - HKTG (Hiragana/Katakana toggle) */ ++ 0x7b, /* 102 EVDEV - MUHE (Muhenkan) */ ++ 0x0, /* 103 EVDEV - JPCM (KPJPComma) */ ++ 0x9c, /* 104 EVDEV - KPEN */ ++ 0x9d, /* 105 EVDEV - RCTL */ ++ 0xb5, /* 106 EVDEV - KPDV */ ++ 0xb7, /* 107 EVDEV - PRSC ***FIXME*** */ ++ 0xb8, /* 108 EVDEV - RALT */ ++ 0x0, /* 109 EVDEV - LNFD ("Internet" Keyboards) */ ++ 0xc7, /* 110 EVDEV - HOME ***FIXME*** */ ++ 0xc8, /* 111 EVDEV - UP */ ++ 0xc9, /* 112 EVDEV - PGUP */ ++ 0xcb, /* 113 EVDEV - LEFT */ ++ 0xcd, /* 114 EVDEV - RGHT */ ++ 0xcf, /* 115 EVDEV - END */ ++ 0xd0, /* 116 EVDEV - DOWN */ ++ 0xd1, /* 117 EVDEV - PGDN */ ++ 0xd2, /* 118 EVDEV - INS */ ++ 0xd3, /* 119 EVDEV - DELE */ ++ 0x0, /* 120 EVDEV - I120 ("Internet" Keyboards) */ ++ 0x0, /* 121 EVDEV - MUTE */ ++ 0x0, /* 122 EVDEV - VOL- */ ++ 0x0, /* 123 EVDEV - VOL+ */ ++ 0x0, /* 124 EVDEV - POWR */ ++ 0x0, /* 125 EVDEV - KPEQ */ ++ 0x0, /* 126 EVDEV - I126 ("Internet" Keyboards) */ ++ 0x0, /* 127 EVDEV - PAUS */ ++ 0x0, /* 128 EVDEV - ???? */ ++ 0x0, /* 129 EVDEV - I129 ("Internet" Keyboards) */ ++ 0xf1, /* 130 EVDEV - HNGL (Korean Hangul Latin toggle) */ ++ 0xf2, /* 131 EVDEV - HJCV (Korean Hangul Hanja toggle) */ ++ 0x7d, /* 132 EVDEV - AE13 (Yen) */ ++ 0xdb, /* 133 EVDEV - LWIN */ ++ 0xdc, /* 134 EVDEV - RWIN */ ++ 0xdd, /* 135 EVDEV - MENU */ ++ 0x0, /* 136 EVDEV - STOP */ ++ 0x0, /* 137 EVDEV - AGAI */ ++ 0x0, /* 138 EVDEV - PROP */ ++ 0x0, /* 139 EVDEV - UNDO */ ++ 0x0, /* 140 EVDEV - FRNT */ ++ 0x0, /* 141 EVDEV - COPY */ ++ 0x0, /* 142 EVDEV - OPEN */ ++ 0x0, /* 143 EVDEV - PAST */ ++ 0x0, /* 144 EVDEV - FIND */ ++ 0x0, /* 145 EVDEV - CUT */ ++ 0x0, /* 146 EVDEV - HELP */ ++ 0x0, /* 147 EVDEV - I147 */ ++ 0x0, /* 148 EVDEV - I148 */ ++ 0x0, /* 149 EVDEV - I149 */ ++ 0x0, /* 150 EVDEV - I150 */ ++ 0x0, /* 151 EVDEV - I151 */ ++ 0x0, /* 152 EVDEV - I152 */ ++ 0x0, /* 153 EVDEV - I153 */ ++ 0x0, /* 154 EVDEV - I154 */ ++ 0x0, /* 155 EVDEV - I156 */ ++ 0x0, /* 156 EVDEV - I157 */ ++ 0x0, /* 157 EVDEV - I158 */ ++}; ++ ++static bool strstarts(const char *lhs, const char *rhs) ++{ ++ if (strlen(lhs) < strlen(rhs)) ++ return false; ++ return memcmp(lhs, rhs, strlen(rhs)) == 0; ++} ++ ++static bool check_for_evdev(void) ++{ ++ SDL_SysWMinfo info; ++ XkbDescPtr desc = NULL; ++ bool has_evdev = FALSE; ++ const char *keycodes; ++ ++ SDL_VERSION(&info.version); ++ if (!SDL_GetWMInfo(&info)) ++ goto out; ++ ++ desc = XkbGetKeyboard (info.info.x11.display, ++ XkbAllComponentsMask, ++ XkbUseCoreKbd); ++ if (!desc) ++ goto out; ++ ++ keycodes = XGetAtomName(info.info.x11.display, desc->names->keycodes); ++ if (keycodes == NULL) ++ fprintf(stderr, "qemu: warning: could not lookup keycode name\n"); ++ else if (strstarts(keycodes, "evdev_")) ++ has_evdev = TRUE; ++ else if (!strstarts(keycodes, "xfree86_")) ++ fprintf(stderr, "qemu: warning: unknown keycodes `%s'\n", keycodes); ++ ++ XkbFreeClientMap(desc, XkbGBN_AllComponentsMask, True); ++ ++out: ++ return has_evdev; ++} ++ ++ ++uint8_t _translate_keycode(int keycode) + { +- return x_keycode_to_pc_keycode[key]; ++ if (keycode < 9) ++ keycode = 0; ++ else if (keycode < 97) ++ keycode -= 8; /* just an offset */ ++ else if (keycode < 158) { ++ if (check_for_evdev()) ++ keycode = evdev_keycode_to_pc_keycode[keycode - 97]; ++ else ++ keycode = x_keycode_to_pc_keycode[keycode - 97]; ++ } else if (keycode == 208) /* Hiragana_Katakana */ ++ keycode = 0x70; ++ else if (keycode == 211) /* backslash */ ++ keycode = 0x73; ++ else ++ keycode = 0; ++ ++ return keycode; + } --- qemu-0.9.1+svn20081112.orig/debian/patches/series +++ qemu-0.9.1+svn20081112/debian/patches/series @@ -0,0 +1,25 @@ +00_bios.patch +01_nostrip.patch +06_exit_segfault.patch +07_i386_exec_name.patch +10_signal_jobs.patch +11_signal_sigaction.patch +12_signal_powerpc_support.patch +21_net_soopts.patch +30_syscall_ipc.patch +31_syscalls.patch +32_syscall_sysctl.patch +35_syscall_sockaddr.patch +44_socklen_t_check.patch +48_signal_terminate.patch +49_null_check.patch +50_linuxbios_isa_bios_ram.patch +51_linuxbios_piix_ram_size.patch +55_unmux_socketcall.patch +60_ppc_ld.patch +64_ppc_asm_constraints.patch +65_kfreebsd.patch +66_tls_ld.patch +90_security.patch +91_vmdk_compat6_scsi.patch -p0 +95_evdev_keycode_map.patch --- qemu-0.9.1+svn20081112.orig/debian/patches/91_vmdk_compat6_scsi.patch +++ qemu-0.9.1+svn20081112/debian/patches/91_vmdk_compat6_scsi.patch @@ -0,0 +1,139 @@ +=== modified file 'block-qcow.c' +Index: block-vmdk.c +=================================================================== +--- block-vmdk.c.orig 2008-10-28 15:08:49.000000000 +0100 ++++ block-vmdk.c 2008-11-23 21:53:13.135739816 +0100 +@@ -719,7 +719,7 @@ + "ddb.geometry.cylinders = \"%" PRId64 "\"\n" + "ddb.geometry.heads = \"16\"\n" + "ddb.geometry.sectors = \"63\"\n" +- "ddb.adapterType = \"ide\"\n"; ++ "ddb.adapterType = \"%s\"\n"; + char desc[1024]; + const char *real_filename, *temp_str; + +@@ -794,7 +794,8 @@ + snprintf(desc, sizeof(desc), desc_template, (unsigned int)time(NULL), + total_size, real_filename, + (flags & BLOCK_FLAG_COMPAT6 ? 6 : 4), +- total_size / (int64_t)(63 * 16)); ++ total_size / (int64_t)(63 * 16), ++ (flags & BLOCK_FLAG_SCSI ? "lsilogic" : "ide")); + + /* write the descriptor */ + lseek(fd, le64_to_cpu(header.desc_offset) << 9, SEEK_SET); +Index: block_int.h +=================================================================== +--- block_int.h.orig 2008-11-08 17:27:07.000000000 +0100 ++++ block_int.h 2008-11-23 21:52:04.315738113 +0100 +@@ -29,6 +29,7 @@ + #define BLOCK_FLAG_ENCRYPT 1 + #define BLOCK_FLAG_COMPRESS 2 + #define BLOCK_FLAG_COMPAT6 4 ++#define BLOCK_FLAG_SCSI 8 + + struct BlockDriver { + const char *format_name; +Index: qemu-img.c +=================================================================== +--- qemu-img.c.orig 2008-08-24 12:30:33.000000000 +0200 ++++ qemu-img.c 2008-11-23 21:54:19.407736815 +0100 +@@ -53,9 +53,9 @@ + "QEMU disk image utility\n" + "\n" + "Command syntax:\n" +- " create [-e] [-6] [-b base_image] [-f fmt] filename [size]\n" ++ " create [-e] [-6] [-s] [-b base_image] [-f fmt] filename [size]\n" + " commit [-f fmt] filename\n" +- " convert [-c] [-e] [-6] [-f fmt] [-O output_fmt] [-B output_base_image] filename [filename2 [...]] output_filename\n" ++ " convert [-c] [-e] [-6] [-s] [-f fmt] [-O output_fmt] [-B output_base_image] filename [filename2 [...]] output_filename\n" + " info [-f fmt] filename\n" + "\n" + "Command parameters:\n" +@@ -74,6 +74,7 @@ + " '-c' indicates that target image must be compressed (qcow format only)\n" + " '-e' indicates that the target image must be encrypted (qcow format only)\n" + " '-6' indicates that the target image must use compatibility level 6 (vmdk format only)\n" ++ " '-s' indicates that the target image must use of type SCSI (vmdk format only)\n" + ); + printf("\nSupported format:"); + bdrv_iterate_format(format_print, NULL); +@@ -211,7 +212,7 @@ + + flags = 0; + for(;;) { +- c = getopt(argc, argv, "b:f:he6"); ++ c = getopt(argc, argv, "b:f:he6s"); + if (c == -1) + break; + switch(c) { +@@ -230,6 +231,9 @@ + case '6': + flags |= BLOCK_FLAG_COMPAT6; + break; ++ case 's': ++ flags |= BLOCK_FLAG_SCSI; ++ break; + } + } + if (optind >= argc) +@@ -266,6 +270,8 @@ + printf(", encrypted"); + if (flags & BLOCK_FLAG_COMPAT6) + printf(", compatibility level=6"); ++ if (flags & BLOCK_FLAG_SCSI) ++ printf(", type=scsi"); + if (base_filename) { + printf(", backing_file=%s", + base_filename); +@@ -423,6 +429,9 @@ + case '6': + flags |= BLOCK_FLAG_COMPAT6; + break; ++ case 's': ++ flags |= BLOCK_FLAG_SCSI; ++ break; + } + } + +Index: qemu-img.texi +=================================================================== +--- qemu-img.texi.orig 2008-06-05 23:53:49.000000000 +0200 ++++ qemu-img.texi 2008-11-23 21:54:45.605828822 +0100 +@@ -8,9 +8,9 @@ + + The following commands are supported: + @table @option +-@item create [-e] [-6] [-b @var{base_image}] [-f @var{fmt}] @var{filename} [@var{size}] ++@item create [-e] [-6] [-s] [-b @var{base_image}] [-f @var{fmt}] @var{filename} [@var{size}] + @item commit [-f @var{fmt}] @var{filename} +-@item convert [-c] [-e] [-6] [-f @var{fmt}] [-O @var{output_fmt}] [-B @var{output_base_image}] @var{filename} [@var{filename2} [...]] @var{output_filename} ++@item convert [-c] [-e] [-6] [-s] [-f @var{fmt}] [-O @var{output_fmt}] [-B @var{output_base_image}] @var{filename} [@var{filename2} [...]] @var{output_filename} + @item info [-f @var{fmt}] @var{filename} + @end table + +@@ -73,12 +73,14 @@ + indicates that the target image must be encrypted (qcow format only) + @item -6 + indicates that the target image must use compatibility level 6 (vmdk format only) ++@item -s ++indicates that the target image must be of type SCSI (vmdk format only) + @end table + + Command description: + + @table @option +-@item create [-6] [-e] [-b @var{base_image}] [-f @var{fmt}] @var{filename} [@var{size}] ++@item create [-6] [-s] [-e] [-b @var{base_image}] [-f @var{fmt}] @var{filename} [@var{size}] + + Create the new disk image @var{filename} of size @var{size} and format + @var{fmt}. +@@ -92,7 +94,7 @@ + + Commit the changes recorded in @var{filename} in its base image. + +-@item convert [-c] [-e] [-f @var{fmt}] @var{filename} [-O @var{output_fmt}] @var{output_filename} ++@item convert [-c] [-e] [-6] [-s] [-f @var{fmt}] @var{filename} [-O @var{output_fmt}] @var{output_filename} + + Convert the disk image @var{filename} to disk image @var{output_filename} + using format @var{output_fmt}. It can be optionally encrypted