pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/emulators/qemu patch-aa: patch ported from sysutils/xe...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4db5e393ae62
branches:  trunk
changeset: 569179:4db5e393ae62
user:      bouyer <bouyer%pkgsrc.org@localhost>
date:      Thu Jan 14 22:32:33 2010 +0000

description:
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:

 emulators/qemu/Makefile         |   5 ++-
 emulators/qemu/distinfo         |   4 ++-
 emulators/qemu/patches/patch-aa |  46 +++++++++++++++++++++++++++++++++++++++++
 emulators/qemu/patches/patch-ab |  23 ++++++++++++++++++++
 4 files changed, 75 insertions(+), 3 deletions(-)

diffs (111 lines):

diff -r 3ce2fd69f99d -r 4db5e393ae62 emulators/qemu/Makefile
--- a/emulators/qemu/Makefile   Thu Jan 14 19:35:55 2010 +0000
+++ b/emulators/qemu/Makefile   Thu Jan 14 22:32:33 2010 +0000
@@ -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@localhost
-HOMEPAGE=              http://www.nongnu.org/qemu/
+HOMEPAGE=              http://www.qemu.org/
 COMMENT=               CPU emulator using dynamic translation
 
 PKG_DESTDIR_SUPPORT=   user-destdir
diff -r 3ce2fd69f99d -r 4db5e393ae62 emulators/qemu/distinfo
--- a/emulators/qemu/distinfo   Thu Jan 14 19:35:55 2010 +0000
+++ b/emulators/qemu/distinfo   Thu Jan 14 22:32:33 2010 +0000
@@ -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 -r 3ce2fd69f99d -r 4db5e393ae62 emulators/qemu/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/qemu/patches/patch-aa   Thu Jan 14 22:32:33 2010 +0000
@@ -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 -r 3ce2fd69f99d -r 4db5e393ae62 emulators/qemu/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/qemu/patches/patch-ab   Thu Jan 14 22:32:33 2010 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index