summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorbouyer <bouyer>2010-01-14 22:32:33 +0000
committerbouyer <bouyer>2010-01-14 22:32:33 +0000
commite66491b6f15dd47b12e10563ebece0e7332950a9 (patch)
tree23b11390de17ebd35ea5d39af6e352d3c515527d /emulators
parent93eafa35448e1191daf65687019a6be7dc63bd52 (diff)
downloadpkgsrc-e66491b6f15dd47b12e10563ebece0e7332950a9.tar.gz
patch-aa: patch ported from sysutils/xentools3-hvm to make network interface
tap backend work on NetBSD (NetBSD uses an ioctl to get the tap name). patch-ab: add support for the "select without ATN" to the emulated esp device. NetBSD's esp(4) uses this command and aborts after a timeout. While there fix the homepage URL. Now NetBSD/sparc 5.0.1 boots and runs fine in qemu-system-sparc on a NetBSD/amd64 host. Bump pkgrevision.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/qemu/Makefile5
-rw-r--r--emulators/qemu/distinfo4
-rw-r--r--emulators/qemu/patches/patch-aa46
-rw-r--r--emulators/qemu/patches/patch-ab23
4 files changed, 75 insertions, 3 deletions
diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile
index 6f5828fb203..2c92eb6aae5 100644
--- a/emulators/qemu/Makefile
+++ b/emulators/qemu/Makefile
@@ -1,12 +1,13 @@
-# $NetBSD: Makefile,v 1.61 2009/12/09 18:28:39 asau Exp $
+# $NetBSD: Makefile,v 1.62 2010/01/14 22:32:33 bouyer Exp $
#
DISTNAME= qemu-0.11.1
+PKGREVISION= 1
CATEGORIES= emulators
MASTER_SITES= http://download.savannah.gnu.org/releases/qemu/
MAINTAINER= pkgsrc-users@NetBSD.org
-HOMEPAGE= http://www.nongnu.org/qemu/
+HOMEPAGE= http://www.qemu.org/
COMMENT= CPU emulator using dynamic translation
PKG_DESTDIR_SUPPORT= user-destdir
diff --git a/emulators/qemu/distinfo b/emulators/qemu/distinfo
index 35a72ed2d74..30e5d4fd1b1 100644
--- a/emulators/qemu/distinfo
+++ b/emulators/qemu/distinfo
@@ -1,8 +1,10 @@
-$NetBSD: distinfo,v 1.51 2009/12/09 18:28:39 asau Exp $
+$NetBSD: distinfo,v 1.52 2010/01/14 22:32:33 bouyer Exp $
SHA1 (qemu-0.11.1.tar.gz) = 7b983cd18f44c6e7627532b662f010389d3bcdff
RMD160 (qemu-0.11.1.tar.gz) = 4da00fa6c01d7ff6af0ee781bc9260da577ea7d3
Size (qemu-0.11.1.tar.gz) = 3830070 bytes
+SHA1 (patch-aa) = 444b7df67f680b204c50da59fc92752d8894bda7
+SHA1 (patch-ab) = c70c8f3ef6183c54f6999c422491ee35d83f965f
SHA1 (patch-ao) = e515093b6ea99f9cba665de022fd62f3be911569
SHA1 (patch-au) = 2892cae63796c76014288f4a700acbee5aadc529
SHA1 (patch-ba) = 7c5043a39405f52b512e479a46fc76108580b7bc
diff --git a/emulators/qemu/patches/patch-aa b/emulators/qemu/patches/patch-aa
new file mode 100644
index 00000000000..628555bc7b7
--- /dev/null
+++ b/emulators/qemu/patches/patch-aa
@@ -0,0 +1,46 @@
+$NetBSD: patch-aa,v 1.5 2010/01/14 22:32:33 bouyer Exp $
+
+--- net.c.orig 2010-01-14 11:28:56.000000000 +0100
++++ net.c 2010-01-14 11:33:46.000000000 +0100
+@@ -43,6 +43,7 @@
+ #include <netinet/in.h>
+ #include <net/if.h>
+ #ifdef __NetBSD__
++#include <net/if.h>
+ #include <net/if_tap.h>
+ #endif
+ #ifdef __linux__
+@@ -1462,16 +1463,31 @@
+ int fd;
+ char *dev;
+ struct stat s;
++#ifdef TAPGIFNAME
++ struct ifreq ifr;
++#endif
+
+ TFR(fd = open("/dev/tap", O_RDWR));
+ if (fd < 0) {
+- fprintf(stderr, "warning: could not open /dev/tap: no virtual network emulation\n");
++ fprintf(stderr, "warning: could not open /dev/tap: no virtual network emulation: %s\n", strerror(errno));
+ return -1;
+ }
+
+- fstat(fd, &s);
++#ifdef TAPGIFNAME
++ if (ioctl (fd, TAPGIFNAME, (void*)&ifr) < 0) {
++ fprintf(stderr, "warning: could not open get tap name: %s\n",
++ strerror(errno));
++ return -1;
++ }
++ pstrcpy(ifname, ifname_size, ifr.ifr_name);
++#else
++ if (fstat(fd, &s) < 0) {
++ fprintf(stderr, "warning: could not stat /dev/tap: no virtual network emulation: %s\n", strerror(errno));
++ return -1;
++ }
+ dev = devname(s.st_rdev, S_IFCHR);
+ pstrcpy(ifname, ifname_size, dev);
++#endif
+
+ fcntl(fd, F_SETFL, O_NONBLOCK);
+ return fd;
diff --git a/emulators/qemu/patches/patch-ab b/emulators/qemu/patches/patch-ab
new file mode 100644
index 00000000000..905639f85a2
--- /dev/null
+++ b/emulators/qemu/patches/patch-ab
@@ -0,0 +1,23 @@
+$NetBSD: patch-ab,v 1.11 2010/01/14 22:32:33 bouyer Exp $
+
+--- hw/esp.c.orig 2010-01-14 12:51:33.000000000 +0100
++++ hw/esp.c 2010-01-14 12:58:00.000000000 +0100
+@@ -116,6 +116,7 @@
+ #define CMD_ICCS 0x11
+ #define CMD_MSGACC 0x12
+ #define CMD_SATN 0x1a
++#define CMD_SELNATN 0x41
+ #define CMD_SELATN 0x42
+ #define CMD_SELATNS 0x43
+ #define CMD_ENSEL 0x44
+@@ -533,6 +534,10 @@
+ case CMD_SATN:
+ DPRINTF("Set ATN (%2.2x)\n", val);
+ break;
++ case CMD_SELNATN:
++ DPRINTF("Select (%2.2x)\n", val);
++ handle_satn(s); /* XXX is it OK ? */
++ break;
+ case CMD_SELATN:
+ DPRINTF("Set ATN (%2.2x)\n", val);
+ handle_satn(s);