aboutsummaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorJuergen Lock <nox@FreeBSD.org>2012-02-17 22:31:17 +0000
committerJuergen Lock <nox@FreeBSD.org>2012-02-17 22:31:17 +0000
commit743f1c15fc9f1c7ea4748451fb7a0c731c0dd22a (patch)
tree08d1133d67fb4af99c7ef3904d236dbdaed57c47 /emulators
parent7b72e2dc738b0ffba08581eb8f42753029eac78d (diff)
downloadports-743f1c15fc9f1c7ea4748451fb7a0c731c0dd22a.tar.gz
ports-743f1c15fc9f1c7ea4748451fb7a0c731c0dd22a.zip
Notes
Diffstat (limited to 'emulators')
-rw-r--r--emulators/qemu-devel/Makefile32
-rw-r--r--emulators/qemu-devel/distinfo14
-rw-r--r--emulators/qemu-devel/files/Makefile_objs.patch10
-rw-r--r--emulators/qemu-devel/files/hw_e1000_c.patch11
-rw-r--r--emulators/qemu-devel/files/net_udp_c.patch141
-rw-r--r--emulators/qemu-devel/files/net_udp_h.patch35
-rw-r--r--emulators/qemu-devel/files/patch-sgabios-read-only-rom16.ld15
7 files changed, 209 insertions, 49 deletions
diff --git a/emulators/qemu-devel/Makefile b/emulators/qemu-devel/Makefile
index afb6d7473bdd..c5baef023d01 100644
--- a/emulators/qemu-devel/Makefile
+++ b/emulators/qemu-devel/Makefile
@@ -6,20 +6,14 @@
#
PORTNAME= qemu
-PORTVERSION= 1.0
-PORTREVISION= 2
+PORTVERSION= 1.0.1
CATEGORIES= emulators
-MASTER_SITES= http://wiki.qemu.org/download/qemu/:release \
- LOCAL/nox:release \
+MASTER_SITES= http://wiki.qemu.org/download/:release \
LOCAL/nox:snapshot
PKGNAMESUFFIX= -devel
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:release \
- sgabios-read-only-r8${EXTRACT_SUFX}:snapshot
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:release
DIST_SUBDIR= qemu/${PORTVERSION}
-PATCH_SITES= http://code.gns3.net/qemu-patches/raw-file/0b69b9be6a8e/
-PATCH_DIST_STRIP= -p1
-
MAINTAINER= nox@FreeBSD.org
COMMENT= QEMU CPU Emulator - development version
@@ -68,15 +62,13 @@ IGNORE= bsd-user targets not tested on sparc64
.endif
.if defined(WITH_GNS3)
-PATCHFILES+= hw_e1000_c.patch
-#PATCHFILES+= net_c.patch
-#PATCHFILES+= net_h.patch
-EXTRA_PATCHES+= ${FILESDIR}/net_c.patch
-EXTRA_PATCHES+= ${FILESDIR}/net_h.patch
-PATCHFILES+= net_udp_c.patch
-PATCHFILES+= net_udp_h.patch
-PATCHFILES+= Makefile_objs.patch
-EXTRA_PATCHES+= ${FILESDIR}/gns3-qemu-options.hx.patch
+EXTRA_PATCHES+= ${FILESDIR}/hw_e1000_c.patch \
+ ${FILESDIR}/net_c.patch \
+ ${FILESDIR}/net_h.patch \
+ ${FILESDIR}/net_udp_c.patch \
+ ${FILESDIR}/net_udp_h.patch \
+ ${FILESDIR}/Makefile_objs.patch \
+ ${FILESDIR}/gns3-qemu-options.hx.patch
.endif
WITHOUT_CPU_CFLAGS=yes #to avoid problems with register allocation
@@ -216,14 +208,10 @@ post-configure:
${WRKSRC}/config-host.mak
.endif
-post-build:
- @${MAKE_ENV} ${GMAKE} -C${WRKDIR}/sgabios-read-only
-
post-install:
.if !defined(NOPORTDOCS)
@(cd ${WRKSRC} && ${COPYTREE_SHARE} docs ${DOCSDIR}/)
.endif
- @${INSTALL_DATA} ${WRKDIR}/sgabios-read-only/sgabios.bin ${DATADIR}
@${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifup.sample ${PREFIX}/etc
@${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifdown.sample ${PREFIX}/etc
@if [ ! -f ${PREFIX}/etc/qemu-ifup ]; then \
diff --git a/emulators/qemu-devel/distinfo b/emulators/qemu-devel/distinfo
index dfe07a673f29..a4767fdf83a9 100644
--- a/emulators/qemu-devel/distinfo
+++ b/emulators/qemu-devel/distinfo
@@ -1,12 +1,2 @@
-SHA256 (qemu/1.0/qemu-1.0.tar.gz) = 47674b7da559d5e1b44cc401af9ac5ad962d14e9eede12567b13e4b841989737
-SIZE (qemu/1.0/qemu-1.0.tar.gz) = 10848714
-SHA256 (qemu/1.0/sgabios-read-only-r8.tar.gz) = b5a511f237f9e3fbceb8d406b818253c1661773fc12c3ec14f0580ab15151384
-SIZE (qemu/1.0/sgabios-read-only-r8.tar.gz) = 31201
-SHA256 (qemu/1.0/hw_e1000_c.patch) = a9c8f29b8493ac62526b2ed4078b3e69c8e9c709a049f4fa11765ce37067e5a5
-SIZE (qemu/1.0/hw_e1000_c.patch) = 407
-SHA256 (qemu/1.0/net_udp_c.patch) = 6cbe5b229381db94fb6865bb53741217f914749723eea734917143f6db457a51
-SIZE (qemu/1.0/net_udp_c.patch) = 4115
-SHA256 (qemu/1.0/net_udp_h.patch) = e43853ba86689cb9ace6a177f891ab8536f6fbce21c7e9fa3ee0d5b25c47b463
-SIZE (qemu/1.0/net_udp_h.patch) = 1518
-SHA256 (qemu/1.0/Makefile_objs.patch) = 7bfed73dfa87b78fd9b3231c1664ff9c871e8b38009b82bf9311573cbb679d58
-SIZE (qemu/1.0/Makefile_objs.patch) = 371
+SHA256 (qemu/1.0.1/qemu-1.0.1.tar.gz) = 198902e10782517f607c9ed9e629b5e7708ea39eb373ed3ec3f1c8a169d98378
+SIZE (qemu/1.0.1/qemu-1.0.1.tar.gz) = 10853005
diff --git a/emulators/qemu-devel/files/Makefile_objs.patch b/emulators/qemu-devel/files/Makefile_objs.patch
new file mode 100644
index 000000000000..5f8c04b5ed8d
--- /dev/null
+++ b/emulators/qemu-devel/files/Makefile_objs.patch
@@ -0,0 +1,10 @@
+--- qemu-0.14.1/Makefile.objs.orig Thu Jun 23 17:44:50 2011
++++ qemu-0.14.1/Makefile.objs Thu Jun 23 17:45:01 2011
+@@ -34,6 +34,7 @@
+ net-nested-y = queue.o checksum.o util.o
+ net-nested-y += socket.o
+ net-nested-y += dump.o
++net-nested-y += udp.o
+ net-nested-$(CONFIG_POSIX) += tap.o
+ net-nested-$(CONFIG_LINUX) += tap-linux.o
+ net-nested-$(CONFIG_WIN32) += tap-win32.o
diff --git a/emulators/qemu-devel/files/hw_e1000_c.patch b/emulators/qemu-devel/files/hw_e1000_c.patch
new file mode 100644
index 000000000000..15b2494f0d40
--- /dev/null
+++ b/emulators/qemu-devel/files/hw_e1000_c.patch
@@ -0,0 +1,11 @@
+--- qemu-0.14.1/hw/e1000.c.orig Thu Jun 23 17:01:19 2011
++++ qemu-0.14.1/hw/e1000.c Thu Jun 23 17:02:30 2011
+@@ -573,7 +573,7 @@
+ if (rctl & E1000_RCTL_UPE) // promiscuous
+ return 1;
+
+- if ((buf[0] & 1) && (rctl & E1000_RCTL_MPE)) // promiscuous mcast
++ if (buf[0] & 1) // promiscuous mcast
+ return 1;
+
+ if ((rctl & E1000_RCTL_BAM) && !memcmp(buf, bcast, sizeof bcast))
diff --git a/emulators/qemu-devel/files/net_udp_c.patch b/emulators/qemu-devel/files/net_udp_c.patch
new file mode 100644
index 000000000000..9fb9b084b772
--- /dev/null
+++ b/emulators/qemu-devel/files/net_udp_c.patch
@@ -0,0 +1,141 @@
+--- qemu-0.14.1/net/udp.c.orig Thu Jun 23 17:09:02 2011
++++ qemu-0.14.1/net/udp.c Thu Jun 23 17:10:17 2011
+@@ -0,0 +1,138 @@
++/*
++ * QEMU System Emulator
++ *
++ * Copyright (c) 2003-2008 Fabrice Bellard
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++ * THE SOFTWARE.
++ */
++#include "net/udp.h"
++
++#include "config-host.h"
++
++#ifndef _WIN32
++#include <arpa/inet.h>
++#include <netinet/in.h>
++#include <netinet/udp.h>
++#endif
++
++#include "net.h"
++#include "qemu-char.h"
++#include "qemu-common.h"
++#include "qemu-option.h"
++#include "qemu_socket.h"
++#include "sysemu.h"
++
++
++typedef struct UDPState {
++ VLANClientState nc;
++ int rfd;
++ struct sockaddr_in sender;
++} UDPState;
++
++static void udp_to_qemu(void *opaque)
++{
++ UDPState *s = opaque;
++ uint8_t buf[4096];
++ int size;
++
++ size = recvfrom(s->rfd, (char *)buf, sizeof(buf), 0, NULL, NULL);
++ if (size > 0) {
++ qemu_send_packet(&s->nc, buf, size);
++ }
++}
++
++static ssize_t udp_receive(VLANClientState *nc, const uint8_t *buf, size_t size)
++{
++ UDPState *s = DO_UPCAST(UDPState, nc, nc);
++ int ret;
++
++ do {
++ ret = sendto(s->rfd, (const char *)buf, size, 0, (struct sockaddr *)&s->sender, sizeof (s->sender));
++ } while (ret < 0 && errno == EINTR);
++
++ return ret;
++}
++
++static void udp_cleanup(VLANClientState *nc)
++{
++ UDPState *s = DO_UPCAST(UDPState, nc, nc);
++ qemu_set_fd_handler(s->rfd, NULL, NULL, NULL);
++ close(s->rfd);
++}
++
++static NetClientInfo net_udp_info = {
++ .type = NET_CLIENT_TYPE_UDP,
++ .size = sizeof(UDPState),
++ .receive = udp_receive,
++ .cleanup = udp_cleanup,
++};
++
++static int net_udp_init(VLANState *vlan, const char *model,
++ const char *name, int sport,
++ const char *daddr, int dport)
++{
++ VLANClientState *nc;
++ UDPState *s;
++ struct sockaddr_in receiver;
++ int ret;
++
++ nc = qemu_new_net_client(&net_udp_info, vlan, NULL, model, name);
++
++ snprintf(nc->info_str, sizeof(nc->info_str),"udp: %i->%s:%i",
++ sport, daddr, dport);
++
++ s = DO_UPCAST(UDPState, nc, nc);
++
++ s->rfd = socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP);
++ receiver.sin_family = AF_INET;
++ receiver.sin_addr.s_addr = INADDR_ANY;
++ receiver.sin_port = htons(sport);
++ ret = bind(s->rfd, (struct sockaddr *)&receiver, sizeof(receiver));
++
++ if (ret == -1) {
++ fprintf (stderr, "bind error:%s\n", strerror(errno));
++ return ret;
++ }
++
++ memset((char*)&s->sender, 0,sizeof(s->sender));
++ s->sender.sin_family = AF_INET;
++ s->sender.sin_port = htons(dport);
++ inet_aton(daddr, &s->sender.sin_addr);
++
++ qemu_set_fd_handler(s->rfd, udp_to_qemu, NULL, s);
++
++ return 0;
++}
++
++int net_init_udp(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan)
++{
++ const char *daddr;
++ int sport, dport;
++
++ daddr = qemu_opt_get(opts, "daddr");
++
++ sport = qemu_opt_get_number(opts, "sport", 0);
++ dport = qemu_opt_get_number(opts, "dport", 0);
++
++ if (net_udp_init(vlan, "udp", name, sport, daddr, dport) == -1) {
++ return -1;
++ }
++
++ return 0;
++}
diff --git a/emulators/qemu-devel/files/net_udp_h.patch b/emulators/qemu-devel/files/net_udp_h.patch
new file mode 100644
index 000000000000..a6f9d7f75c37
--- /dev/null
+++ b/emulators/qemu-devel/files/net_udp_h.patch
@@ -0,0 +1,35 @@
+--- qemu-0.14.1/net/udp.h.orig Thu Jun 23 17:12:45 2011
++++ qemu-0.14.1/net/udp.h Thu Jun 23 17:12:28 2011
+@@ -0,0 +1,32 @@
++/*
++ * QEMU System Emulator
++ *
++ * Copyright (c) 2003-2008 Fabrice Bellard
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++ * THE SOFTWARE.
++ */
++#ifndef QEMU_NET_UDP_H
++#define QEMU_NET_UDP_H
++
++#include "qemu-common.h"
++#include "qemu-option.h"
++
++int net_init_udp(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan);
++
++#endif /* QEMU_NET_UDP_H */
diff --git a/emulators/qemu-devel/files/patch-sgabios-read-only-rom16.ld b/emulators/qemu-devel/files/patch-sgabios-read-only-rom16.ld
deleted file mode 100644
index 624d8273a32e..000000000000
--- a/emulators/qemu-devel/files/patch-sgabios-read-only-rom16.ld
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: a/../sgabios-read-only/rom16.ld
-===================================================================
---- sgabios-read-only/rom16.ld (revision 8)
-+++ sgabios-read-only/rom16.ld (working copy)
-@@ -3,8 +3,8 @@
- */
-
- /* Script for -z combreloc: combine and sort reloc sections */
--OUTPUT_FORMAT("elf32-i386", "elf32-i386",
-- "elf32-i386")
-+OUTPUT_FORMAT("elf32-i386-freebsd", "elf32-i386-freebsd",
-+ "elf32-i386-freebsd")
- OUTPUT_ARCH(i386)
- EXTERN(_start)
- ENTRY(_start)