parent
64ee951c0b
commit
4a44907122
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=280122
@ -6,13 +6,15 @@
|
||||
#
|
||||
|
||||
PORTNAME= qemu
|
||||
PORTVERSION= 0.14.1
|
||||
PORTVERSION= 0.15.0
|
||||
CATEGORIES= emulators
|
||||
MASTER_SITES= SAVANNAH:release \
|
||||
http://wiki.qemu.org/download/:release \
|
||||
LOCAL:snapshot
|
||||
MASTER_SITE_SUBDIR= qemu/:release nox/:snapshot
|
||||
PKGNAMESUFFIX= -devel
|
||||
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:release
|
||||
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:release \
|
||||
sgabios-read-only-r8${EXTRACT_SUFX}:snapshot
|
||||
DIST_SUBDIR= qemu/${PORTVERSION}
|
||||
|
||||
PATCH_SITES= http://code.gns3.net/qemu-patches/raw-file/0b69b9be6a8e/
|
||||
@ -23,6 +25,8 @@ COMMENT= QEMU CPU Emulator - development version
|
||||
|
||||
HAS_CONFIGURE= yes
|
||||
USE_GMAKE= yes
|
||||
USE_PYTHON= yes
|
||||
USE_GNOME= glib20
|
||||
USE_PERL5_BUILD= yes
|
||||
PATCH_STRIP= -p1
|
||||
MAKE_ENV+= BSD_MAKE="${MAKE}" LDFLAGS="${LDFLAGS}"
|
||||
@ -34,16 +38,24 @@ MAKE_JOBS_SAFE= yes
|
||||
|
||||
OPTIONS= SAMBA "samba dependency (for -smb)" Off \
|
||||
SDL "SDL/X dependency (graphical output)" On \
|
||||
OPENGL "OpenGL dependency" On \
|
||||
GNUTLS "gnutls dependency (vnc encryption)" On \
|
||||
SASL "cyrus-sasl dependency (vnc encryption)" On \
|
||||
CURL "libcurl dependency (remote images)" On \
|
||||
CDROM_DMA "IDE CDROM DMA" On \
|
||||
PCAP "pcap dependency (networking with bpf)" On \
|
||||
USBREDIR "usb device network redirection (experimental!)" Off \
|
||||
GNS3 "gns3 patches (udp, promiscuous multicast)" Off \
|
||||
ADD_AUDIO "Emulate more audio hardware (experimental!)" Off \
|
||||
ALL_TARGETS "Also build bsd-user targets (for testing)" Off
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
CONFIGURE_ARGS+= --extra-ldflags=-L${LOCALBASE}/lib
|
||||
PORTDOCS= docs qemu-doc.html qemu-tech.html
|
||||
LIB_DEPENDS+= jpeg:${PORTSDIR}/graphics/jpeg \
|
||||
png.6:${PORTSDIR}/graphics/png
|
||||
|
||||
.if defined(WITHOUT_ALL_TARGETS)
|
||||
CONFIGURE_ARGS+= --disable-bsd-user
|
||||
PLIST_SUB+= ALLTARGETS="@comment "
|
||||
@ -56,8 +68,10 @@ IGNORE= bsd-user targets not tested on sparc64
|
||||
|
||||
.if defined(WITH_GNS3)
|
||||
PATCHFILES+= hw_e1000_c.patch
|
||||
PATCHFILES+= net_c.patch
|
||||
PATCHFILES+= net_h.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
|
||||
@ -83,12 +97,30 @@ CONFIGURE_ARGS+= --disable-vnc-tls
|
||||
LIB_DEPENDS+= gnutls:${PORTSDIR}/security/gnutls
|
||||
.endif
|
||||
|
||||
.if defined(WITHOUT_SASL)
|
||||
CONFIGURE_ARGS+= --disable-vnc-sasl
|
||||
.else
|
||||
LIB_DEPENDS+= sasl2:${PORTSDIR}/security/cyrus-sasl2
|
||||
.endif
|
||||
|
||||
.if defined(WITHOUT_CURL)
|
||||
CONFIGURE_ARGS+= --disable-curl
|
||||
.else
|
||||
LIB_DEPENDS+= curl:${PORTSDIR}/ftp/curl
|
||||
.endif
|
||||
|
||||
.if defined(WITHOUT_OPENGL)
|
||||
CONFIGURE_ARGS+= --disable-opengl
|
||||
.else
|
||||
USE_GL= yes
|
||||
.endif
|
||||
|
||||
.if defined(WITHOUT_USBREDIR)
|
||||
CONFIGURE_ARGS+= --disable-usb-redir
|
||||
.else
|
||||
LIB_DEPENDS+= usbredirparser:${PORTSDIR}/net/usbredir
|
||||
.endif
|
||||
|
||||
.if defined(WITH_PCAP)
|
||||
CONFIGURE_ARGS+= --enable-pcap
|
||||
.endif
|
||||
@ -130,20 +162,6 @@ pre-patch:
|
||||
${MKDIR} ${WRKSRC}/bsd/$$A; \
|
||||
done
|
||||
|
||||
post-patch:
|
||||
.if (${ARCH} == "powerpc" || ${ARCH} == "sparc64")
|
||||
.if ${OSVERSION} < 800030
|
||||
# These OSVERSION don't have all the needed long double fns in their
|
||||
# libc so just disable 80 bit floats completely.
|
||||
@cd ${WRKSRC} && ${PATCH} --quiet -R ${PATCH_STRIP} < ${FILESDIR}/patch-libmath_FreeBSD-version
|
||||
@cd ${WRKSRC} && ${PATCH} --quiet -R ${PATCH_STRIP} < ${FILESDIR}/patch-fbsd
|
||||
.else
|
||||
# ...else we only need to disable the libmath build. (since its
|
||||
# x86-specific.)
|
||||
@cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/revert-fbsd-libmath-patch
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if defined(WITH_PCAP)
|
||||
@cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/pcap-patch
|
||||
@${REINPLACE_CMD} -f ${FILESDIR}/pcap-client-type.sed ${WRKSRC}/net.h
|
||||
@ -172,7 +190,14 @@ post-configure:
|
||||
${WRKSRC}/config-host.mak
|
||||
.endif
|
||||
|
||||
post-build:
|
||||
@(cd ${WRKDIR}/sgabios-read-only && ${GMAKE})
|
||||
|
||||
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 \
|
||||
|
@ -1,14 +1,12 @@
|
||||
SHA256 (qemu/0.14.1/qemu-0.14.1.tar.gz) = 33ceae3fbe516f2cbb151dc98d16c8ccfec74b1056674ad715e75a2f7fed45c3
|
||||
SIZE (qemu/0.14.1/qemu-0.14.1.tar.gz) = 5439697
|
||||
SHA256 (qemu/0.14.1/hw_e1000_c.patch) = a9c8f29b8493ac62526b2ed4078b3e69c8e9c709a049f4fa11765ce37067e5a5
|
||||
SIZE (qemu/0.14.1/hw_e1000_c.patch) = 407
|
||||
SHA256 (qemu/0.14.1/net_c.patch) = 612f443bcfd37c921c973e904b527688ec1bee0ef6fc43f994ef41ff5a737a49
|
||||
SIZE (qemu/0.14.1/net_c.patch) = 1032
|
||||
SHA256 (qemu/0.14.1/net_h.patch) = 9b7c38b646c8ac3f1bf39bc627a30c863585efb381988d3e17e3b1190dd475b9
|
||||
SIZE (qemu/0.14.1/net_h.patch) = 272
|
||||
SHA256 (qemu/0.14.1/net_udp_c.patch) = 6cbe5b229381db94fb6865bb53741217f914749723eea734917143f6db457a51
|
||||
SIZE (qemu/0.14.1/net_udp_c.patch) = 4115
|
||||
SHA256 (qemu/0.14.1/net_udp_h.patch) = e43853ba86689cb9ace6a177f891ab8536f6fbce21c7e9fa3ee0d5b25c47b463
|
||||
SIZE (qemu/0.14.1/net_udp_h.patch) = 1518
|
||||
SHA256 (qemu/0.14.1/Makefile_objs.patch) = 7bfed73dfa87b78fd9b3231c1664ff9c871e8b38009b82bf9311573cbb679d58
|
||||
SIZE (qemu/0.14.1/Makefile_objs.patch) = 371
|
||||
SHA256 (qemu/0.15.0/qemu-0.15.0.tar.gz) = 0197e52dba07aeb6dfe0343b0c2ae08ed374d2cb0af3bb9ec73fed5baa0cb74d
|
||||
SIZE (qemu/0.15.0/qemu-0.15.0.tar.gz) = 9577243
|
||||
SHA256 (qemu/0.15.0/sgabios-read-only-r8.tar.gz) = b5a511f237f9e3fbceb8d406b818253c1661773fc12c3ec14f0580ab15151384
|
||||
SIZE (qemu/0.15.0/sgabios-read-only-r8.tar.gz) = 31201
|
||||
SHA256 (qemu/0.15.0/hw_e1000_c.patch) = a9c8f29b8493ac62526b2ed4078b3e69c8e9c709a049f4fa11765ce37067e5a5
|
||||
SIZE (qemu/0.15.0/hw_e1000_c.patch) = 407
|
||||
SHA256 (qemu/0.15.0/net_udp_c.patch) = 6cbe5b229381db94fb6865bb53741217f914749723eea734917143f6db457a51
|
||||
SIZE (qemu/0.15.0/net_udp_c.patch) = 4115
|
||||
SHA256 (qemu/0.15.0/net_udp_h.patch) = e43853ba86689cb9ace6a177f891ab8536f6fbce21c7e9fa3ee0d5b25c47b463
|
||||
SIZE (qemu/0.15.0/net_udp_h.patch) = 1518
|
||||
SHA256 (qemu/0.15.0/Makefile_objs.patch) = 7bfed73dfa87b78fd9b3231c1664ff9c871e8b38009b82bf9311573cbb679d58
|
||||
SIZE (qemu/0.15.0/Makefile_objs.patch) = 371
|
||||
|
38
emulators/qemu-devel/files/net_c.patch
Normal file
38
emulators/qemu-devel/files/net_c.patch
Normal file
@ -0,0 +1,38 @@
|
||||
--- qemu-0.15.0/net.c.orig
|
||||
+++ qemu-0.15.0/net.c
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "net/dump.h"
|
||||
#include "net/slirp.h"
|
||||
#include "net/vde.h"
|
||||
+#include "net/udp.h"
|
||||
#include "net/util.h"
|
||||
#include "monitor.h"
|
||||
#include "qemu-common.h"
|
||||
@@ -1029,6 +1030,27 @@ static const struct {
|
||||
},
|
||||
},
|
||||
#endif
|
||||
+ [NET_CLIENT_TYPE_UDP] = {
|
||||
+ .type = "udp",
|
||||
+ .init = net_init_udp,
|
||||
+ .desc = {
|
||||
+ NET_COMMON_PARAMS_DESC,
|
||||
+ {
|
||||
+ .name = "sport",
|
||||
+ .type = QEMU_OPT_NUMBER,
|
||||
+ .help = "source port number",
|
||||
+ }, {
|
||||
+ .name = "daddr",
|
||||
+ .type = QEMU_OPT_STRING,
|
||||
+ .help = "destination IP address",
|
||||
+ }, {
|
||||
+ .name = "dport",
|
||||
+ .type = QEMU_OPT_NUMBER,
|
||||
+ .help = "destination port number",
|
||||
+ },
|
||||
+ { /* end of list */ }
|
||||
+ },
|
||||
+ },
|
||||
[NET_CLIENT_TYPE_DUMP] = {
|
||||
.type = "dump",
|
||||
.init = net_init_dump,
|
10
emulators/qemu-devel/files/net_h.patch
Normal file
10
emulators/qemu-devel/files/net_h.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- qemu-0.15.0/net.h.orig
|
||||
+++ qemu-0.15.0/net.h
|
||||
@@ -35,6 +35,7 @@ typedef enum {
|
||||
NET_CLIENT_TYPE_TAP,
|
||||
NET_CLIENT_TYPE_SOCKET,
|
||||
NET_CLIENT_TYPE_VDE,
|
||||
+ NET_CLIENT_TYPE_UDP,
|
||||
NET_CLIENT_TYPE_DUMP,
|
||||
|
||||
NET_CLIENT_TYPE_MAX
|
10
emulators/qemu-devel/files/patch-Makefile.objs
Normal file
10
emulators/qemu-devel/files/patch-Makefile.objs
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/Makefile.objs
|
||||
+++ b/Makefile.objs
|
||||
@@ -166,6 +166,7 @@ user-obj-y =
|
||||
user-obj-y += envlist.o path.o
|
||||
user-obj-y += tcg-runtime.o host-utils.o
|
||||
user-obj-y += cutils.o cache-utils.o
|
||||
+user-obj-y += qemu-thread-posix.o
|
||||
|
||||
######################################################################
|
||||
# libhw
|
@ -1,121 +0,0 @@
|
||||
Index: qemu/Makefile
|
||||
@@ -49,7 +49,10 @@
|
||||
|
||||
-include config-all-devices.mak
|
||||
|
||||
-build-all: $(DOCS) $(TOOLS) recurse-all
|
||||
+build-all: $(DOCS) $(TOOLS) bsd/libmath.a recurse-all
|
||||
+
|
||||
+bsd/libmath.a:
|
||||
+ ( cd bsd ; unset MAKEFLAGS ; $(BSD_MAKE) CC=$(CC) )
|
||||
|
||||
config-host.h: config-host.h-timestamp
|
||||
config-host.h-timestamp: config-host.mak
|
||||
@@ -237,6 +240,7 @@
|
||||
|
||||
clean:
|
||||
# avoid old build problems by removing potentially incorrect old files
|
||||
+ ( cd bsd ; $(BSD_MAKE) clean )
|
||||
rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
|
||||
rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~
|
||||
rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d
|
||||
Index: qemu/Makefile.target
|
||||
@@ -312,8 +312,8 @@ endif # CONFIG_SOFTMMU
|
||||
|
||||
obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o
|
||||
|
||||
-$(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)
|
||||
- $(call LINK,$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y))
|
||||
+$(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) ../bsd/libmath.a
|
||||
+ $(call LINK,$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) ../bsd/libmath.a)
|
||||
|
||||
|
||||
gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/feature_to_c.sh
|
||||
Index: qemu/fpu/softfloat-native.c
|
||||
@@ -9,7 +9,8 @@
|
||||
void set_float_rounding_mode(int val STATUS_PARAM)
|
||||
{
|
||||
STATUS(float_rounding_mode) = val;
|
||||
-#if (defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__)) || \
|
||||
+#if (defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__) && \
|
||||
+ !defined(__FreeBSD__)) || \
|
||||
(defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10)
|
||||
fpsetround(val);
|
||||
#elif defined(__arm__)
|
||||
@@ -26,7 +27,7 @@ void set_floatx80_rounding_precision(int
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if defined(CONFIG_BSD) || \
|
||||
+#if (defined(CONFIG_BSD) && !defined(__FreeBSD__)) || \
|
||||
(defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10)
|
||||
#define lrint(d) ((int32_t)rint(d))
|
||||
#define llrint(d) ((int64_t)rint(d))
|
||||
Index: qemu/fpu/softfloat-native.h
|
||||
@@ -3,7 +3,28 @@
|
||||
|
||||
#if (defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__)) \
|
||||
|| defined(CONFIG_SOLARIS)
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <osreldate.h>
|
||||
+long double fabsl(long double x);
|
||||
+long double remainderl(long double x, long double y);
|
||||
+long double sqrtl(long double x);
|
||||
+long double rintl(long double x);
|
||||
+long lrintl(long double x);
|
||||
+long long llrintl(long double x);
|
||||
+#endif
|
||||
+
|
||||
+#if (defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__) && \
|
||||
+ (!defined(__FreeBSD__) || __FreeBSD_version < 500000)) || \
|
||||
+ defined(CONFIG_SOLARIS)
|
||||
#include <ieeefp.h>
|
||||
+#if defined(__FreeBSD__)
|
||||
+#define isgreater(x, y) __builtin_isgreater((x), (y))
|
||||
+#define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y))
|
||||
+#define isless(x, y) __builtin_isless((x), (y))
|
||||
+#define islessequal(x, y) __builtin_islessequal((x), (y))
|
||||
+#define islessgreater(x, y) __builtin_islessgreater((x), (y))
|
||||
+#define isunordered(x, y) __builtin_isunordered((x), (y))
|
||||
+#endif
|
||||
#define fabsf(f) ((float)fabs(f))
|
||||
#else
|
||||
#include <fenv.h>
|
||||
@@ -113,8 +134,9 @@ typedef union {
|
||||
/*----------------------------------------------------------------------------
|
||||
| Software IEC/IEEE floating-point rounding mode.
|
||||
*----------------------------------------------------------------------------*/
|
||||
-#if (defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__)) \
|
||||
- || defined(CONFIG_SOLARIS)
|
||||
+#if (defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__) && \
|
||||
+ (!defined(__FreeBSD__) || __FreeBSD_version < 500000)) || \
|
||||
+ defined(CONFIG_SOLARIS)
|
||||
#if defined(__OpenBSD__)
|
||||
#define FE_RM FP_RM
|
||||
#define FE_RP FP_RP
|
||||
Index: qemu/fpu/softfloat.h
|
||||
@@ -90,7 +90,8 @@
|
||||
#define FLOAT128
|
||||
#else
|
||||
/* native float support */
|
||||
-#if (defined(__i386__) || defined(__x86_64__)) && !defined(CONFIG_BSD)
|
||||
+#if (defined(__i386__) || defined(__x86_64__)) && \
|
||||
+ (!defined(CONFIG_BSD) || defined(__FreeBSD__))
|
||||
#define FLOATX80
|
||||
#endif
|
||||
#endif /* !CONFIG_SOFTFLOAT */
|
||||
Index: qemu/target-ppc/op_helper.c
|
||||
@@ -293,6 +293,13 @@
|
||||
uint32_t exp = (u.ll >> 52) & 0x7FF;
|
||||
return ((0 < exp) && (exp < 0x7FF));
|
||||
}
|
||||
+#else
|
||||
+#ifndef isnormal
|
||||
+#define isnormal(x) \
|
||||
+ ((sizeof (x) == sizeof (float)) ? __isnormalf(x) \
|
||||
+ : (sizeof (x) == sizeof (double)) ? __isnormal(x) \
|
||||
+ : __isnormall(x))
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
uint32_t helper_compute_fprf (uint64_t arg, uint32_t set_fprf)
|
14
emulators/qemu-devel/files/patch-hw-ppc_newworld.c
Normal file
14
emulators/qemu-devel/files/patch-hw-ppc_newworld.c
Normal file
@ -0,0 +1,14 @@
|
||||
--- a/hw/ppc_newworld.c
|
||||
+++ b/hw/ppc_newworld.c
|
||||
@@ -68,6 +68,11 @@
|
||||
#include "hw/usb.h"
|
||||
#include "blockdev.h"
|
||||
|
||||
+/* FreeBSD headers define this */
|
||||
+#ifdef round_page
|
||||
+#undef round_page
|
||||
+#endif
|
||||
+
|
||||
#define MAX_IDE_BUS 2
|
||||
#define CFG_ADDR 0xf0000510
|
||||
|
14
emulators/qemu-devel/files/patch-hw-ppc_oldworld.c
Normal file
14
emulators/qemu-devel/files/patch-hw-ppc_oldworld.c
Normal file
@ -0,0 +1,14 @@
|
||||
--- a/hw/ppc_oldworld.c
|
||||
+++ b/hw/ppc_oldworld.c
|
||||
@@ -47,6 +47,11 @@
|
||||
#define MAX_IDE_BUS 2
|
||||
#define CFG_ADDR 0xf0000510
|
||||
|
||||
+/* FreeBSD headers define this */
|
||||
+#ifdef round_page
|
||||
+#undef round_page
|
||||
+#endif
|
||||
+
|
||||
static int fw_cfg_boot_set(void *opaque, const char *boot_device)
|
||||
{
|
||||
fw_cfg_add_i16(opaque, FW_CFG_BOOT_DEVICE, boot_device[0]);
|
File diff suppressed because it is too large
Load Diff
@ -1,57 +0,0 @@
|
||||
Index: qemu/bsd/Makefile
|
||||
@@ -16,7 +16,8 @@
|
||||
${MACHINE_ARCH}/s_rintl.c \
|
||||
${MACHINE_ARCH}/s_round.c \
|
||||
${MACHINE_ARCH}/s_sinl.S \
|
||||
- ${MACHINE_ARCH}/s_tanl.S
|
||||
+ ${MACHINE_ARCH}/s_tanl.S \
|
||||
+ ${MACHINE_ARCH}/s_ldexpl.c
|
||||
|
||||
OBJS= ${SRCS:R:S/$/.o/}
|
||||
|
||||
Index: qemu/bsd/i386/s_ldexpl.c
|
||||
@@ -0,0 +1,21 @@
|
||||
+#include <math.h>
|
||||
+#include <errno.h>
|
||||
+#include <sysdep.h>
|
||||
+
|
||||
+long double __ldexpl(long double x, int expn)
|
||||
+{
|
||||
+ long double res;
|
||||
+ if (!isfinite (x) || x == 0.0L)
|
||||
+ return x;
|
||||
+
|
||||
+ __asm__ ("fscale"
|
||||
+ : "=t" (res)
|
||||
+ : "0" (x), "u" ((long double) expn));
|
||||
+
|
||||
+ if (!isfinite (res) || res == 0.0L)
|
||||
+ errno = ERANGE;
|
||||
+
|
||||
+ return res;
|
||||
+}
|
||||
+
|
||||
+weak_alias(__ldexpl,ldexpl)
|
||||
Index: qemu/bsd/amd64/s_ldexpl.c
|
||||
@@ -0,0 +1,21 @@
|
||||
+#include <math.h>
|
||||
+#include <errno.h>
|
||||
+#include <sysdep.h>
|
||||
+
|
||||
+long double __ldexpl(long double x, int expn)
|
||||
+{
|
||||
+ long double res;
|
||||
+ if (!isfinite (x) || x == 0.0L)
|
||||
+ return x;
|
||||
+
|
||||
+ __asm__ ("fscale"
|
||||
+ : "=t" (res)
|
||||
+ : "0" (x), "u" ((long double) expn));
|
||||
+
|
||||
+ if (!isfinite (res) || res == 0.0L)
|
||||
+ errno = ERANGE;
|
||||
+
|
||||
+ return res;
|
||||
+}
|
||||
+
|
||||
+weak_alias(__ldexpl,ldexpl)
|
@ -1,151 +0,0 @@
|
||||
diff -ru qemu.orig/bsd/Makefile qemu/bsd/Makefile
|
||||
--- qemu.orig/bsd/Makefile 2009-01-19 23:30:09.124413041 -0600
|
||||
+++ qemu/bsd/Makefile 2009-01-19 23:40:20.180704580 -0600
|
||||
@@ -1,23 +1,90 @@
|
||||
-SRCS= ${MACHINE_ARCH}/e_atan2l.c \
|
||||
- ${MACHINE_ARCH}/e_logl.S \
|
||||
- ${MACHINE_ARCH}/e_powl.S \
|
||||
- ${MACHINE_ARCH}/e_remainderl.S \
|
||||
- ${MACHINE_ARCH}/e_sqrtl.c \
|
||||
- ${MACHINE_ARCH}/s_ceill.S \
|
||||
- ${MACHINE_ARCH}/s_cosl.S \
|
||||
- ${MACHINE_ARCH}/s_floorl.S \
|
||||
- ${MACHINE_ARCH}/s_isnormal.c \
|
||||
- ${MACHINE_ARCH}/s_llrint.S \
|
||||
- ${MACHINE_ARCH}/s_llrintf.S \
|
||||
- ${MACHINE_ARCH}/s_llrintl.S \
|
||||
- ${MACHINE_ARCH}/s_lrint.S \
|
||||
- ${MACHINE_ARCH}/s_lrintf.S \
|
||||
- ${MACHINE_ARCH}/s_lrintl.S \
|
||||
- ${MACHINE_ARCH}/s_rintl.c \
|
||||
- ${MACHINE_ARCH}/s_round.c \
|
||||
- ${MACHINE_ARCH}/s_sinl.S \
|
||||
- ${MACHINE_ARCH}/s_tanl.S \
|
||||
- ${MACHINE_ARCH}/s_ldexpl.c
|
||||
+AWK= /usr/bin/awk
|
||||
+SYSCTL= /sbin/sysctl
|
||||
+
|
||||
+.if !defined(OSVERSION)
|
||||
+.if exists(/usr/include/sys/param.h)
|
||||
+OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h
|
||||
+.elif exists(/usr/src/sys/sys/param.h)
|
||||
+OSVERSION!= ${AWK} '/^\#define[[:blank::]]__FreeBSD_version/ {print $$3}' < /usr/src/sys/sys/param.h
|
||||
+.else
|
||||
+OSVERSION!= ${SYSCTL} -n kern.osreldate
|
||||
+.endif
|
||||
+.endif
|
||||
+
|
||||
+# Need to be implemented
|
||||
+_logl= ${MACHINE_ARCH}/e_logl.S
|
||||
+_powl= ${MACHINE_ARCH}/e_powl.S
|
||||
+
|
||||
+# Implemented in -CURRENT
|
||||
+.if ${OSVERSION} < 800042
|
||||
+_atan2l= ${MACHINE_ARCH}/e_atan2l.c
|
||||
+.endif
|
||||
+
|
||||
+.if ${OSVERSION} < 800030
|
||||
+_remainderl= ${MACHINE_ARCH}/e_remainderl.S
|
||||
+.endif
|
||||
+
|
||||
+.if ${OSVERSION} < 800025
|
||||
+_sqrtl= ${MACHINE_ARCH}/e_sqrtl.c
|
||||
+.endif
|
||||
+
|
||||
+.if ${OSVERSION} < 800022
|
||||
+_cosl= ${MACHINE_ARCH}/s_cosl.S
|
||||
+_sinl= ${MACHINE_ARCH}/s_sinl.S
|
||||
+_tanl= ${MACHINE_ARCH}/s_tanl.S
|
||||
+.endif
|
||||
+
|
||||
+.if ${OSVERSION} < 800012
|
||||
+_lrintl= ${MACHINE_ARCH}/s_lrintl.S
|
||||
+_llrintl= ${MACHINE_ARCH}/s_llrintl.S
|
||||
+_rintl= ${MACHINE_ARCH}/s_rintl.c
|
||||
+.endif
|
||||
+
|
||||
+.if ${OSVERSION} < 600020
|
||||
+_ldexpl= ${MACHINE_ARCH}/s_ldexpl.c
|
||||
+.endif
|
||||
+
|
||||
+.if ${OSVERSION} < 600008
|
||||
+_ceill= ${MACHINE_ARCH}/s_ceill.S
|
||||
+_floorl= ${MACHINE_ARCH}/s_floorl.S
|
||||
+_llrint= ${MACHINE_ARCH}/s_llrint.S
|
||||
+_llrintf= ${MACHINE_ARCH}/s_llrintf.S
|
||||
+_lrint= ${MACHINE_ARCH}/s_lrint.S
|
||||
+_lrintf= ${MACHINE_ARCH}/s_lrintf.S
|
||||
+.endif
|
||||
+
|
||||
+.if ${OSVERSION} < 502121
|
||||
+_isnormal= ${MACHINE_ARCH}/s_isnormal.c
|
||||
+.endif
|
||||
+
|
||||
+.if ${OSVERSION} < 502114
|
||||
+_round= ${MACHINE_ARCH}/s_round.c
|
||||
+.endif
|
||||
+
|
||||
+#.if ${OSVERSION} < 501113
|
||||
+#_fabsl= ${MACHINE_ARCH}/e_fabsl.c
|
||||
+#.endif
|
||||
+
|
||||
+SRCS= ${_atan2l} \
|
||||
+ ${_logl} \
|
||||
+ ${_powl} \
|
||||
+ ${_remainderl} \
|
||||
+ ${_sqrtl} \
|
||||
+ ${_ceill} \
|
||||
+ ${_cosl} \
|
||||
+ ${_floorl} \
|
||||
+ ${_isnormal} \
|
||||
+ ${_llrint} \
|
||||
+ ${_llrintf} \
|
||||
+ ${_llrintl} \
|
||||
+ ${_lrint} \
|
||||
+ ${_lrintf} \
|
||||
+ ${_lrintl} \
|
||||
+ ${_rintl} \
|
||||
+ ${_round} \
|
||||
+ ${_sinl} \
|
||||
+ ${_tanl} \
|
||||
+ ${_ldexpl}
|
||||
|
||||
OBJS= ${SRCS:R:S/$/.o/}
|
||||
|
||||
Index: qemu/fpu/softfloat-native.h
|
||||
@@ -1,17 +1,29 @@
|
||||
+#ifndef SOFTFLOAT_NATIVE_H
|
||||
+#define SOFTFLOAT_NATIVE_H
|
||||
+
|
||||
/* Native implementation of soft float functions */
|
||||
#include <math.h>
|
||||
|
||||
#if (defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__)) \
|
||||
|| defined(CONFIG_SOLARIS)
|
||||
#ifdef __FreeBSD__
|
||||
#include <osreldate.h>
|
||||
+#if __FreeBSD_version < 501113
|
||||
long double fabsl(long double x);
|
||||
+#endif
|
||||
+#if __FreeBSD_version < 800030
|
||||
long double remainderl(long double x, long double y);
|
||||
+#endif
|
||||
+#if __FreeBSD_version < 800025
|
||||
long double sqrtl(long double x);
|
||||
+#endif
|
||||
+#if __FreeBSD_version < 800012
|
||||
long double rintl(long double x);
|
||||
long lrintl(long double x);
|
||||
long long llrintl(long double x);
|
||||
#endif
|
||||
+#endif
|
||||
+#endif
|
||||
|
||||
#if (defined(CONFIG_BSD) && !defined(__APPLE__) && \
|
||||
(!defined(__FreeBSD__) || __FreeBSD_version < 500000)) || \
|
||||
@@ -518,3 +529,5 @@
|
||||
}
|
||||
|
||||
#endif
|
||||
+
|
||||
+#endif /* SOFTFLOAT_NATIVE_H */
|
15
emulators/qemu-devel/files/patch-sgabios-read-only-rom16.ld
Normal file
15
emulators/qemu-devel/files/patch-sgabios-read-only-rom16.ld
Normal file
@ -0,0 +1,15 @@
|
||||
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)
|
@ -1,2 +1,2 @@
|
||||
/^ NET_CLIENT_TYPE_DUMP$/i\
|
||||
/^ NET_CLIENT_TYPE_DUMP,$/i\
|
||||
\ NET_CLIENT_TYPE_PCAP,
|
||||
|
@ -1,16 +1,16 @@
|
||||
--- configure.orig 2010-01-29 14:36:00.000000000 -0500
|
||||
+++ configure 2010-01-29 14:36:00.000000000 -0500
|
||||
@@ -174,6 +174,9 @@ trace_backend="nop"
|
||||
trace_file="trace"
|
||||
spice=""
|
||||
rbd=""
|
||||
@@ -180,6 +180,9 @@ smartcard_nss=""
|
||||
usb_redir=""
|
||||
opengl=""
|
||||
guest_agent="yes"
|
||||
+pcap="no"
|
||||
+pcap_create="no"
|
||||
+bpf="no"
|
||||
|
||||
# parse CC options first
|
||||
for opt do
|
||||
@@ -592,6 +595,8 @@ for opt do
|
||||
@@ -611,6 +614,8 @@ for opt do
|
||||
;;
|
||||
--enable-vnc-thread) vnc_thread="yes"
|
||||
;;
|
||||
@ -19,7 +19,7 @@
|
||||
--disable-slirp) slirp="no"
|
||||
;;
|
||||
--disable-uuid) uuid="no"
|
||||
@@ -1269,6 +1274,49 @@ EOF
|
||||
@@ -1438,6 +1443,49 @@ EOF
|
||||
fi
|
||||
|
||||
##########################################
|
||||
@ -67,9 +67,9 @@
|
||||
+
|
||||
+##########################################
|
||||
# VNC TLS detection
|
||||
if test "$vnc_tls" != "no" ; then
|
||||
if test "$vnc" = "yes" -a "$vnc_tls" != "no" ; then
|
||||
cat > $TMPC <<EOF
|
||||
@@ -2565,6 +2613,15 @@ fi
|
||||
@@ -2797,6 +2845,15 @@ fi
|
||||
if test $profiler = "yes" ; then
|
||||
echo "CONFIG_PROFILER=y" >> $config_host_mak
|
||||
fi
|
||||
@ -87,8 +87,8 @@
|
||||
QEMU_INCLUDES="-I\$(SRC_PATH)/slirp $QEMU_INCLUDES"
|
||||
Index: net.c
|
||||
@@ -37,6 +37,11 @@
|
||||
#include "qemu_socket.h"
|
||||
#include "hw/qdev.h"
|
||||
#include "iov.h"
|
||||
|
||||
+#include <sys/ioctl.h>
|
||||
+#ifdef __FreeBSD__
|
||||
@ -98,7 +98,7 @@ Index: net.c
|
||||
static QTAILQ_HEAD(, VLANState) vlans;
|
||||
static QTAILQ_HEAD(, VLANClientState) non_vlan_clients;
|
||||
|
||||
@@ -820,6 +825,226 @@ static int net_init_nic(QemuOpts *opts,
|
||||
@@ -797,6 +802,226 @@ static int net_init_nic(QemuOpts *opts,
|
||||
return idx;
|
||||
}
|
||||
|
||||
@ -325,12 +325,12 @@ Index: net.c
|
||||
#define NET_COMMON_PARAMS_DESC \
|
||||
{ \
|
||||
.name = "type", \
|
||||
@@ -988,6 +1213,20 @@ static const struct {
|
||||
#endif /* _WIN32 */
|
||||
@@ -973,6 +1198,21 @@ static const struct {
|
||||
{ /* end of list */ }
|
||||
},
|
||||
},
|
||||
+#ifdef CONFIG_PCAP
|
||||
+ }, {
|
||||
+ [NET_CLIENT_TYPE_PCAP] = {
|
||||
+ .type = "pcap",
|
||||
+ .init = net_init_pcap,
|
||||
+ .desc = {
|
||||
@ -342,11 +342,12 @@ Index: net.c
|
||||
+ },
|
||||
+ { /* end of list */ }
|
||||
+ },
|
||||
+ },
|
||||
+#endif
|
||||
}, {
|
||||
[NET_CLIENT_TYPE_SOCKET] = {
|
||||
.type = "socket",
|
||||
.init = net_init_socket,
|
||||
@@ -1314,6 +1553,7 @@ void net_check_clients(void)
|
||||
@@ -1343,6 +1583,7 @@ void net_check_clients(void)
|
||||
case NET_CLIENT_TYPE_TAP:
|
||||
case NET_CLIENT_TYPE_SOCKET:
|
||||
case NET_CLIENT_TYPE_VDE:
|
||||
|
@ -16,4 +16,4 @@ As QEMU requires no host kernel patches to run, it is very safe and easy to use.
|
||||
See also the preconfigured system images on http://oszoo.org/
|
||||
Many live cd isos also work.
|
||||
|
||||
WWW: http://www.nongnu.org/qemu/
|
||||
WWW: http://wiki.qemu.org/Main_Page
|
||||
|
@ -66,6 +66,35 @@ FreeBSD host notes
|
||||
|
||||
devfs_system_ruleset="ugen_ruleset"
|
||||
|
||||
- If you want to test the new (in 0.15.0) usb network redirection (USBREDIR
|
||||
option) see this thread by Hans de Goede <hdegoede <at> redhat.com>:
|
||||
|
||||
http://thread.gmane.org/gmane.comp.emulators.qemu/110176/focus=110183
|
||||
|
||||
Quote:
|
||||
|
||||
Example usage:
|
||||
|
||||
1) Start usbredirserver for a usb device:
|
||||
sudo usbredirserver 045e:0772
|
||||
2) Start qemu with usb2 support + a chardev talking to usbredirserver +
|
||||
a usb-redir device using this chardev:
|
||||
qemu ... \
|
||||
-readconfig docs/ich9-ehci-uhci.cfg \
|
||||
-chardev socket,id=usbredirchardev,host=localhost,port=4000 \
|
||||
-device usb-redir,chardev=usbredirchardev,id=usbredirdev
|
||||
|
||||
[you would replace docs/ich9-ehci-uhci.cfg with e.g.
|
||||
/usr/local/share/doc/qemu/docs/ich9-ehci-uhci.cfg, but turns out
|
||||
ehci seems broken for me here with FreeBSD guests at least, I get:
|
||||
|
||||
FETCHENTRY: entry at 22C5484 is of type 2 which is not supported yet
|
||||
processing error - resetting ehci HC
|
||||
Assertion failed: (0), function ehci_advance_state, file /data/ports/emulators/qemu-devel/work/qemu-0.15.0/hw/usb-ehci.c, line 2045.
|
||||
|
||||
Starting the same without ehci (-readconfig) works, tho usbredirserver
|
||||
crashes when qemu exits.]
|
||||
|
||||
- Still usb: since the hub is no longer attached to the uchi controller and
|
||||
the wakeup mechanism, resume interrupt is not implemented yet linux guests
|
||||
will suspend the bus, i.e. they wont see devices usb_add'ed after its
|
||||
|
@ -1,11 +1,14 @@
|
||||
bin/qemu
|
||||
bin/qemu-ga
|
||||
bin/qemu-img
|
||||
bin/qemu-io
|
||||
bin/qemu-nbd
|
||||
bin/qemu-system-arm
|
||||
bin/qemu-system-cris
|
||||
bin/qemu-system-lm32
|
||||
bin/qemu-system-m68k
|
||||
bin/qemu-system-microblaze
|
||||
bin/qemu-system-microblazeel
|
||||
bin/qemu-system-mips
|
||||
bin/qemu-system-mips64
|
||||
bin/qemu-system-mips64el
|
||||
@ -13,6 +16,7 @@ bin/qemu-system-mipsel
|
||||
bin/qemu-system-ppc
|
||||
bin/qemu-system-ppc64
|
||||
bin/qemu-system-ppcemb
|
||||
bin/qemu-system-s390x
|
||||
bin/qemu-system-sh4
|
||||
bin/qemu-system-sh4eb
|
||||
bin/qemu-system-sparc
|
||||
@ -32,9 +36,6 @@ etc/qemu-ifdown.sample
|
||||
etc/qemu/target-x86_64.conf.sample
|
||||
@exec if [ ! -f %D/etc/qemu/target-x86_64.conf ] ; then cp -p %D/%F %B/etc/qemu/target-x86_64.conf; fi
|
||||
@dirrmtry etc/qemu
|
||||
%%PORTDOCS%%%%DOCSDIR%%/qemu-doc.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/qemu-tech.html
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
||||
%%DATADIR%%/bios.bin
|
||||
%%DATADIR%%/vgabios.bin
|
||||
%%DATADIR%%/vgabios-cirrus.bin
|
||||
@ -45,15 +46,20 @@ etc/qemu/target-x86_64.conf.sample
|
||||
%%DATADIR%%/openbios-ppc
|
||||
%%DATADIR%%/openbios-sparc32
|
||||
%%DATADIR%%/openbios-sparc64
|
||||
%%DATADIR%%/pxe-e1000.bin
|
||||
%%DATADIR%%/pxe-ne2k_pci.bin
|
||||
%%DATADIR%%/pxe-rtl8139.bin
|
||||
%%DATADIR%%/pxe-pcnet.bin
|
||||
%%DATADIR%%/pxe-virtio.bin
|
||||
%%DATADIR%%/gpxe-eepro100-80861209.rom
|
||||
%%DATADIR%%/pxe-e1000.rom
|
||||
%%DATADIR%%/pxe-eepro100.rom
|
||||
%%DATADIR%%/pxe-ne2k_pci.rom
|
||||
%%DATADIR%%/pxe-rtl8139.rom
|
||||
%%DATADIR%%/pxe-pcnet.rom
|
||||
%%DATADIR%%/pxe-virtio.rom
|
||||
%%DATADIR%%/petalogix-ml605.dtb
|
||||
%%DATADIR%%/mpc8544ds.dtb
|
||||
%%DATADIR%%/spapr-rtas.bin
|
||||
%%DATADIR%%/slof.bin
|
||||
%%DATADIR%%/s390-zipl.rom
|
||||
%%DATADIR%%/linuxboot.bin
|
||||
%%DATADIR%%/multiboot.bin
|
||||
%%DATADIR%%/sgabios.bin
|
||||
%%DATADIR%%/petalogix-s3adsp1800.dtb
|
||||
%%DATADIR%%/bamboo.dtb
|
||||
%%DATADIR%%/keymaps/ar
|
||||
|
Loading…
Reference in New Issue
Block a user