mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-21 08:42:23 +00:00
Update to 0.13.0
This commit is contained in:
parent
e1d7bbc4ca
commit
5269a286ff
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=263414
@ -6,9 +6,9 @@
|
||||
#
|
||||
|
||||
PORTNAME= qemu
|
||||
PORTVERSION= 0.12.5
|
||||
PORTVERSION= 0.13.0
|
||||
CATEGORIES= emulators
|
||||
MASTER_SITES= ${MASTER_SITE_SAVANNAH}:release \
|
||||
MASTER_SITES= SAVANNAH:release \
|
||||
${MASTER_SITE_LOCAL}:snapshot \
|
||||
http://people.freebsd.org/~nox/qemu/:snapshot
|
||||
MASTER_SITE_SUBDIR= qemu/:release nox/:snapshot
|
||||
@ -25,12 +25,12 @@ USE_PERL5_BUILD= yes
|
||||
PATCH_STRIP= -p1
|
||||
MAKE_ENV+= BSD_MAKE="${MAKE}" LDFLAGS="${LDFLAGS}"
|
||||
MAN1= qemu.1 qemu-img.1
|
||||
MAN8= qemu-nbd.8
|
||||
ONLY_FOR_ARCHS= amd64 i386 powerpc
|
||||
CONFLICTS= qemu-[0-9]*
|
||||
MAKE_JOBS_SAFE= yes
|
||||
|
||||
OPTIONS= RTL8139_TIMER "allow use of re(4) nic with FreeBSD guests" Off \
|
||||
SAMBA "samba dependency (for -smb)" Off \
|
||||
OPTIONS= SAMBA "samba dependency (for -smb)" Off \
|
||||
SDL "SDL/X dependency (graphical output)" On \
|
||||
GNUTLS "gnutls dependency (vnc encryption)" On \
|
||||
CURL "libcurl dependency (remote images)" On \
|
||||
@ -50,7 +50,8 @@ PLIST_SUB+= ALLTARGETS=""
|
||||
|
||||
WITHOUT_CPU_CFLAGS=yes #to avoid problems with register allocation
|
||||
CFLAGS:= ${CFLAGS:C/-fno-tree-vrp//}
|
||||
CONFIGURE_ARGS+= --prefix=${PREFIX} --cc=${CC}
|
||||
CONFIGURE_ARGS+= --prefix=${PREFIX} --cc=${CC} --enable-docs \
|
||||
--extra-cflags=-DSMBD_COMMAND=\\\"${LOCALBASE}/sbin/smbd\\\"\ -I${LOCALBASE}/include\ -DPREFIX=\\\"${PREFIX}\\\"
|
||||
|
||||
.if defined(WITHOUT_SDL)
|
||||
CONFIGURE_ARGS+= --disable-sdl
|
||||
@ -116,9 +117,6 @@ post-patch:
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if defined(WITH_RTL8139_TIMER)
|
||||
@cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/rtl8139-re-patch
|
||||
.endif
|
||||
.if defined(WITH_PCAP)
|
||||
@cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/pcap-patch
|
||||
.endif
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (qemu/qemu-0.12.5.tar.gz) = 1d02ee0a04dfae2894340273372c1de4
|
||||
SHA256 (qemu/qemu-0.12.5.tar.gz) = a6a7b30b53591e160b5c7fd9319985673174e9ea47b182dbe63bc99357741f58
|
||||
SIZE (qemu/qemu-0.12.5.tar.gz) = 4291741
|
||||
MD5 (qemu/qemu-0.13.0.tar.gz) = 397a0d665da8ba9d3b9583629f3d6421
|
||||
SHA256 (qemu/qemu-0.13.0.tar.gz) = 1e6f5851b05cea6e377c835f4668408d4124cfb845f9948d922808743c5fd877
|
||||
SIZE (qemu/qemu-0.13.0.tar.gz) = 5184531
|
||||
|
@ -1,11 +1,8 @@
|
||||
Index: qemu-0.8.2/hw/dma.c
|
||||
===================================================================
|
||||
--- qemu-0.8.2.orig/hw/dma.c 2006-07-22 20:23:34.000000000 +0300
|
||||
+++ qemu-0.8.2/hw/dma.c 2007-04-20 06:05:59.000000000 +0300
|
||||
@@ -340,9 +340,11 @@ static void channel_run (int ncont, int
|
||||
Index: qemu/hw/dma.c
|
||||
@@ -344,9 +344,11 @@ static void channel_run (int ncont, int
|
||||
}
|
||||
#endif
|
||||
|
||||
r = dma_controllers[ncont].regs + ichan;
|
||||
- n = r->transfer_handler (r->opaque, ichan + (ncont << 2),
|
||||
- r->now[COUNT], (r->base[COUNT] + 1) << ncont);
|
||||
- r->now[COUNT] = n;
|
||||
|
@ -1,17 +1,17 @@
|
||||
Index: qemu/Makefile
|
||||
@@ -19,7 +19,11 @@
|
||||
@@ -29,7 +29,11 @@ $(call set-vpath, $(SRC_PATH):$(SRC_PATH
|
||||
LIBS+=-lz $(LIBS_TOOLS)
|
||||
|
||||
ifdef BUILD_DOCS
|
||||
+ifdef NOPORTDOCS
|
||||
+DOCS=qemu.1 qemu-img.1 qemu-nbd.8
|
||||
+else
|
||||
DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8
|
||||
DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 QMP/qmp-commands.txt
|
||||
+endif
|
||||
else
|
||||
DOCS=
|
||||
endif
|
||||
@@ -213,13 +217,13 @@
|
||||
@@ -169,8 +173,10 @@ BLOBS=
|
||||
endif
|
||||
|
||||
install-doc: $(DOCS)
|
||||
@ -22,8 +22,15 @@ Index: qemu/Makefile
|
||||
ifdef CONFIG_POSIX
|
||||
$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
|
||||
$(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
|
||||
- $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
|
||||
- $(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
|
||||
endif
|
||||
@@ -180,7 +186,10 @@ endif
|
||||
|
||||
install: all $(if $(BUILD_DOCS),install-doc)
|
||||
install-sysconfig:
|
||||
$(INSTALL_DIR) "$(DESTDIR)$(sysconfdir)/qemu"
|
||||
- $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(sysconfdir)/qemu"
|
||||
+ $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(sysconfdir)/qemu/target-x86_64.conf.sample"
|
||||
+ if [ ! -f "$(sysconfdir)/qemu/target-x86_64.conf" ]; then \
|
||||
+ $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(sysconfdir)/qemu"; \
|
||||
+ fi
|
||||
|
||||
install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig
|
||||
$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
|
||||
|
@ -1,10 +0,0 @@
|
||||
Index: qemu/configure
|
||||
@@ -570,7 +570,7 @@
|
||||
if test -z "$prefix" ; then
|
||||
prefix="/usr/local"
|
||||
fi
|
||||
- mansuffix="/share/man"
|
||||
+ mansuffix="/man"
|
||||
datasuffix="/share/qemu"
|
||||
docsuffix="/share/doc/qemu"
|
||||
binsuffix="/bin"
|
@ -1,22 +1,3 @@
|
||||
Index: qemu/Makefile
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
VPATH=$(SRC_PATH):$(SRC_PATH)/hw
|
||||
|
||||
+QEMU_CFLAGS+= -DSMBD_COMMAND=\"${LOCALBASE}/sbin/smbd\" -I${LOCALBASE}/include -DPREFIX=\"${PREFIX}\"
|
||||
+
|
||||
LIBS+=-lz $(LIBS_TOOLS)
|
||||
|
||||
ifdef BUILD_DOCS
|
||||
Index: qemu/Makefile.target
|
||||
@@ -6,6 +6,7 @@
|
||||
TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
|
||||
VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw
|
||||
QEMU_CFLAGS+= -I.. -I$(TARGET_PATH) -DNEED_CPU_H
|
||||
+QEMU_CFLAGS+= -DSMBD_COMMAND=\"${LOCALBASE}/sbin/smbd\" -I${LOCALBASE}/include -DPREFIX=\"${PREFIX}\"
|
||||
|
||||
ifdef CONFIG_USER_ONLY
|
||||
# user emulator name
|
||||
Index: qemu/net.h
|
||||
@@ -99,12 +99,14 @@
|
||||
int slirp_is_inited(void);
|
||||
|
15
emulators/qemu-devel/files/patch-block-sheepdog.c
Normal file
15
emulators/qemu-devel/files/patch-block-sheepdog.c
Normal file
@ -0,0 +1,15 @@
|
||||
--- a/block/sheepdog.c
|
||||
+++ b/block/sheepdog.c
|
||||
@@ -14,7 +14,12 @@
|
||||
#include <ws2tcpip.h>
|
||||
#else
|
||||
#include <netdb.h>
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/socket.h>
|
||||
+#else
|
||||
#include <netinet/tcp.h>
|
||||
+#endif
|
||||
|
||||
#define closesocket(s) close(s)
|
||||
#endif
|
@ -1,26 +0,0 @@
|
||||
--- a/cache-utils.c
|
||||
+++ b/cache-utils.c
|
||||
@@ -57,6 +57,23 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <stdio.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/sysctl.h>
|
||||
+
|
||||
+static void ppc_init_cacheline_sizes(void)
|
||||
+{
|
||||
+ size_t len = 4;
|
||||
+ unsigned cacheline;
|
||||
+
|
||||
+ sysctlbyname ("machdep.cacheline_size", &cacheline, &len, NULL, 0);
|
||||
+
|
||||
+ qemu_cache_conf.dcache_bsize = cacheline;
|
||||
+ qemu_cache_conf.icache_bsize = cacheline;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#ifdef __linux__
|
||||
void qemu_cache_utils_init(char **envp)
|
||||
{
|
@ -1,22 +1,20 @@
|
||||
Index: qemu/configure
|
||||
@@ -1605,17 +1605,18 @@
|
||||
--- a/configure
|
||||
+++ a/configure
|
||||
@@ -285,7 +285,7 @@ bigendian="no"
|
||||
mingw32="no"
|
||||
EXESUF=""
|
||||
prefix="/usr/local"
|
||||
-mandir="\${prefix}/share/man"
|
||||
+mandir="\${prefix}/man"
|
||||
datadir="\${prefix}/share/qemu"
|
||||
docdir="\${prefix}/share/doc/qemu"
|
||||
bindir="\${prefix}/bin"
|
||||
@@ -1964,15 +1964,18 @@ if compile_prog "" "" ; then
|
||||
fi
|
||||
|
||||
# Check if tools are available to build documentation.
|
||||
-if test "$docs" != "no" ; then
|
||||
- if test -x "`which texi2html 2>/dev/null`" -a \
|
||||
- -x "`which pod2man 2>/dev/null`" ; then
|
||||
- docs=yes
|
||||
- else
|
||||
- if test "$docs" = "yes" ; then
|
||||
- feature_not_found "docs"
|
||||
- fi
|
||||
- docs=no
|
||||
- fi
|
||||
-fi
|
||||
+#if test "$docs" != "no" ; then
|
||||
+# if test -x "`which texi2html 2>/dev/null`" -a \
|
||||
+# -x "`which pod2man 2>/dev/null`" ; then
|
||||
+# if has makeinfo && has pod2man; then
|
||||
+# docs=yes
|
||||
+# else
|
||||
+# if test "$docs" = "yes" ; then
|
||||
@ -25,7 +23,16 @@ Index: qemu/configure
|
||||
+# docs=no
|
||||
+# fi
|
||||
+#fi
|
||||
+docs=yes
|
||||
if test "$docs" != "no" ; then
|
||||
- if has makeinfo && has pod2man; then
|
||||
- docs=yes
|
||||
- else
|
||||
- if test "$docs" = "yes" ; then
|
||||
- feature_not_found "docs"
|
||||
- fi
|
||||
- docs=no
|
||||
- fi
|
||||
+ docs=yes
|
||||
fi
|
||||
|
||||
# Search for bswap_32 function
|
||||
byteswap_h=no
|
||||
|
@ -1,35 +0,0 @@
|
||||
--- a/cpu-exec.c
|
||||
+++ b/cpu-exec.c
|
||||
@@ -933,6 +933,20 @@
|
||||
# define TRAP_sig(context) REG_sig(trap, context)
|
||||
#endif /* linux */
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <ucontext.h>
|
||||
+# define IAR_sig(context) ((context)->uc_mcontext.mc_srr0)
|
||||
+# define MSR_sig(context) ((context)->uc_mcontext.mc_srr1)
|
||||
+# define CTR_sig(context) ((context)->uc_mcontext.mc_ctr)
|
||||
+# define XER_sig(context) ((context)->uc_mcontext.mc_xer)
|
||||
+# define LR_sig(context) ((context)->uc_mcontext.mc_lr)
|
||||
+# define CR_sig(context) ((context)->uc_mcontext.mc_cr)
|
||||
+/* Exception Registers access */
|
||||
+# define DAR_sig(context) ((context)->uc_mcontext.mc_dar)
|
||||
+# define DSISR_sig(context) ((context)->uc_mcontext.mc_dsisr)
|
||||
+# define TRAP_sig(context) ((context)->uc_mcontext.mc_exc)
|
||||
+#endif /* __FreeBSD__ */
|
||||
+
|
||||
#ifdef __APPLE__
|
||||
# include <sys/ucontext.h>
|
||||
typedef struct ucontext SIGCONTEXT;
|
||||
@@ -962,7 +976,11 @@
|
||||
void *puc)
|
||||
{
|
||||
siginfo_t *info = pinfo;
|
||||
+#if defined (__FreeBSD__)
|
||||
+ ucontext_t *uc = puc;
|
||||
+#else
|
||||
struct ucontext *uc = puc;
|
||||
+#endif
|
||||
unsigned long pc;
|
||||
int is_write;
|
||||
|
@ -20,24 +20,17 @@ Index: qemu/Makefile
|
||||
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
|
||||
@@ -137,7 +137,7 @@
|
||||
@@ -312,8 +312,8 @@ endif # CONFIG_SOFTMMU
|
||||
|
||||
obj-i386-y += ioport-user.o
|
||||
obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o
|
||||
|
||||
-ARLIBS=../libuser/libuser.a libqemu.a
|
||||
+ARLIBS=../libuser/libuser.a libqemu.a ../bsd/libmath.a
|
||||
-$(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)
|
||||
|
||||
endif #CONFIG_BSD_USER
|
||||
|
||||
@@ -293,7 +293,7 @@
|
||||
|
||||
monitor.o: qemu-monitor.h
|
||||
|
||||
-ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
|
||||
+ARLIBS=../libqemu_common.a libqemu.a $(HWLIB) ../bsd/libmath.a
|
||||
|
||||
endif # CONFIG_SOFTMMU
|
||||
|
||||
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)
|
||||
|
24
emulators/qemu-devel/files/patch-hw-zaurus.c
Normal file
24
emulators/qemu-devel/files/patch-hw-zaurus.c
Normal file
@ -0,0 +1,24 @@
|
||||
--- a/hw/zaurus.c
|
||||
+++ b/hw/zaurus.c
|
||||
@@ -70,6 +70,10 @@ static uint32_t scoop_readb(void *opaque
|
||||
{
|
||||
ScoopInfo *s = (ScoopInfo *) opaque;
|
||||
|
||||
+ // XXX Workaround for base address (0x08800040 in this case)
|
||||
+ // rounded down to start of page
|
||||
+ addr &= 0x3f;
|
||||
+
|
||||
switch (addr) {
|
||||
case SCOOP_MCR:
|
||||
return s->mcr;
|
||||
@@ -104,6 +108,10 @@ static void scoop_writeb(void *opaque, t
|
||||
ScoopInfo *s = (ScoopInfo *) opaque;
|
||||
value &= 0xffff;
|
||||
|
||||
+ // XXX Workaround for base address (0x08800040 in this case)
|
||||
+ // rounded down to start of page
|
||||
+ addr &= 0x3f;
|
||||
+
|
||||
switch (addr) {
|
||||
case SCOOP_MCR:
|
||||
s->mcr = value;
|
146
emulators/qemu-devel/files/patch-omap-uart
Normal file
146
emulators/qemu-devel/files/patch-omap-uart
Normal file
@ -0,0 +1,146 @@
|
||||
From 6a8aabd3c132188ee8e0e82ef4aba09f782cbe96 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Weil <weil@mail.berlios.de>
|
||||
Date: Sun, 8 Aug 2010 14:09:26 +0200
|
||||
Subject: [PATCH] hw/omap: Fix default setup for OMAP UART devices
|
||||
|
||||
Character devices created by qemu_chr_open don't
|
||||
allow duplicate device names, so naming all
|
||||
UART devices "null" no longer works.
|
||||
|
||||
Running "qemu-system-arm -M n800" (and some other machines)
|
||||
results in this error message:
|
||||
|
||||
qemu-system-arm: Duplicate ID 'null' for chardev
|
||||
Can't create serial device, empty char device
|
||||
|
||||
This is fixed by setting a default label "uart1",
|
||||
"uart2" or "uart3".
|
||||
|
||||
Cc: Andrzej Zaborowski <andrew.zaborowski@intel.com>
|
||||
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
|
||||
---
|
||||
hw/omap.h | 6 ++++--
|
||||
hw/omap1.c | 3 +++
|
||||
hw/omap2.c | 6 +++++-
|
||||
hw/omap_uart.c | 12 +++++++-----
|
||||
4 files changed, 19 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/hw/omap.h b/hw/omap.h
|
||||
index 18eb72b..fe32ca5 100644
|
||||
--- a/hw/omap.h
|
||||
+++ b/hw/omap.h
|
||||
@@ -664,10 +664,12 @@ void omap_synctimer_reset(struct omap_synctimer_s *s);
|
||||
struct omap_uart_s;
|
||||
struct omap_uart_s *omap_uart_init(target_phys_addr_t base,
|
||||
qemu_irq irq, omap_clk fclk, omap_clk iclk,
|
||||
- qemu_irq txdma, qemu_irq rxdma, CharDriverState *chr);
|
||||
+ qemu_irq txdma, qemu_irq rxdma,
|
||||
+ const char *label, CharDriverState *chr);
|
||||
struct omap_uart_s *omap2_uart_init(struct omap_target_agent_s *ta,
|
||||
qemu_irq irq, omap_clk fclk, omap_clk iclk,
|
||||
- qemu_irq txdma, qemu_irq rxdma, CharDriverState *chr);
|
||||
+ qemu_irq txdma, qemu_irq rxdma,
|
||||
+ const char *label, CharDriverState *chr);
|
||||
void omap_uart_reset(struct omap_uart_s *s);
|
||||
void omap_uart_attach(struct omap_uart_s *s, CharDriverState *chr);
|
||||
|
||||
diff --git a/hw/omap1.c b/hw/omap1.c
|
||||
index 06370b6..1ee5514 100644
|
||||
--- a/hw/omap1.c
|
||||
+++ b/hw/omap1.c
|
||||
@@ -3809,16 +3809,19 @@ struct omap_mpu_state_s *omap310_mpu_init(unsigned long sdram_size,
|
||||
omap_findclk(s, "uart1_ck"),
|
||||
omap_findclk(s, "uart1_ck"),
|
||||
s->drq[OMAP_DMA_UART1_TX], s->drq[OMAP_DMA_UART1_RX],
|
||||
+ "uart1",
|
||||
serial_hds[0]);
|
||||
s->uart[1] = omap_uart_init(0xfffb0800, s->irq[1][OMAP_INT_UART2],
|
||||
omap_findclk(s, "uart2_ck"),
|
||||
omap_findclk(s, "uart2_ck"),
|
||||
s->drq[OMAP_DMA_UART2_TX], s->drq[OMAP_DMA_UART2_RX],
|
||||
+ "uart2",
|
||||
serial_hds[0] ? serial_hds[1] : NULL);
|
||||
s->uart[2] = omap_uart_init(0xfffb9800, s->irq[0][OMAP_INT_UART3],
|
||||
omap_findclk(s, "uart3_ck"),
|
||||
omap_findclk(s, "uart3_ck"),
|
||||
s->drq[OMAP_DMA_UART3_TX], s->drq[OMAP_DMA_UART3_RX],
|
||||
+ "uart3",
|
||||
serial_hds[0] && serial_hds[1] ? serial_hds[2] : NULL);
|
||||
|
||||
omap_dpll_init(&s->dpll[0], 0xfffecf00, omap_findclk(s, "dpll1"));
|
||||
diff --git a/hw/omap2.c b/hw/omap2.c
|
||||
index 179075e..e35a56e 100644
|
||||
--- a/hw/omap2.c
|
||||
+++ b/hw/omap2.c
|
||||
@@ -2291,13 +2291,16 @@ struct omap_mpu_state_s *omap2420_mpu_init(unsigned long sdram_size,
|
||||
omap_findclk(s, "uart1_fclk"),
|
||||
omap_findclk(s, "uart1_iclk"),
|
||||
s->drq[OMAP24XX_DMA_UART1_TX],
|
||||
- s->drq[OMAP24XX_DMA_UART1_RX], serial_hds[0]);
|
||||
+ s->drq[OMAP24XX_DMA_UART1_RX],
|
||||
+ "uart1",
|
||||
+ serial_hds[0]);
|
||||
s->uart[1] = omap2_uart_init(omap_l4ta(s->l4, 20),
|
||||
s->irq[0][OMAP_INT_24XX_UART2_IRQ],
|
||||
omap_findclk(s, "uart2_fclk"),
|
||||
omap_findclk(s, "uart2_iclk"),
|
||||
s->drq[OMAP24XX_DMA_UART2_TX],
|
||||
s->drq[OMAP24XX_DMA_UART2_RX],
|
||||
+ "uart2",
|
||||
serial_hds[0] ? serial_hds[1] : NULL);
|
||||
s->uart[2] = omap2_uart_init(omap_l4ta(s->l4, 21),
|
||||
s->irq[0][OMAP_INT_24XX_UART3_IRQ],
|
||||
@@ -2305,6 +2308,7 @@ struct omap_mpu_state_s *omap2420_mpu_init(unsigned long sdram_size,
|
||||
omap_findclk(s, "uart3_iclk"),
|
||||
s->drq[OMAP24XX_DMA_UART3_TX],
|
||||
s->drq[OMAP24XX_DMA_UART3_RX],
|
||||
+ "uart3",
|
||||
serial_hds[0] && serial_hds[1] ? serial_hds[2] : NULL);
|
||||
|
||||
s->gptimer[0] = omap_gp_timer_init(omap_l4ta(s->l4, 7),
|
||||
diff --git a/hw/omap_uart.c b/hw/omap_uart.c
|
||||
index 395bf0c..cc66cd9 100644
|
||||
--- a/hw/omap_uart.c
|
||||
+++ b/hw/omap_uart.c
|
||||
@@ -51,7 +51,8 @@ void omap_uart_reset(struct omap_uart_s *s)
|
||||
|
||||
struct omap_uart_s *omap_uart_init(target_phys_addr_t base,
|
||||
qemu_irq irq, omap_clk fclk, omap_clk iclk,
|
||||
- qemu_irq txdma, qemu_irq rxdma, CharDriverState *chr)
|
||||
+ qemu_irq txdma, qemu_irq rxdma,
|
||||
+ const char *label, CharDriverState *chr)
|
||||
{
|
||||
struct omap_uart_s *s = (struct omap_uart_s *)
|
||||
qemu_mallocz(sizeof(struct omap_uart_s));
|
||||
@@ -61,11 +62,11 @@ struct omap_uart_s *omap_uart_init(target_phys_addr_t base,
|
||||
s->irq = irq;
|
||||
#ifdef TARGET_WORDS_BIGENDIAN
|
||||
s->serial = serial_mm_init(base, 2, irq, omap_clk_getrate(fclk)/16,
|
||||
- chr ?: qemu_chr_open("null", "null", NULL), 1,
|
||||
+ chr ?: qemu_chr_open(label, "null", NULL), 1,
|
||||
1);
|
||||
#else
|
||||
s->serial = serial_mm_init(base, 2, irq, omap_clk_getrate(fclk)/16,
|
||||
- chr ?: qemu_chr_open("null", "null", NULL), 1,
|
||||
+ chr ?: qemu_chr_open(label, "null", NULL), 1,
|
||||
0);
|
||||
#endif
|
||||
return s;
|
||||
@@ -162,11 +163,12 @@ static CPUWriteMemoryFunc * const omap_uart_writefn[] = {
|
||||
|
||||
struct omap_uart_s *omap2_uart_init(struct omap_target_agent_s *ta,
|
||||
qemu_irq irq, omap_clk fclk, omap_clk iclk,
|
||||
- qemu_irq txdma, qemu_irq rxdma, CharDriverState *chr)
|
||||
+ qemu_irq txdma, qemu_irq rxdma,
|
||||
+ const char *label, CharDriverState *chr)
|
||||
{
|
||||
target_phys_addr_t base = omap_l4_attach(ta, 0, 0);
|
||||
struct omap_uart_s *s = omap_uart_init(base, irq,
|
||||
- fclk, iclk, txdma, rxdma, chr);
|
||||
+ fclk, iclk, txdma, rxdma, label, chr);
|
||||
int iomemtype = cpu_register_io_memory(omap_uart_readfn,
|
||||
omap_uart_writefn, s);
|
||||
|
||||
--
|
||||
1.7.2.3
|
||||
|
12
emulators/qemu-devel/files/patch-os-posix.c
Normal file
12
emulators/qemu-devel/files/patch-os-posix.c
Normal file
@ -0,0 +1,12 @@
|
||||
--- a/os-posix.c
|
||||
+++ b/os-posix.c
|
||||
@@ -27,6 +27,9 @@
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
#include <sys/types.h>
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <sys/sysctl.h>
|
||||
+#endif
|
||||
#include <sys/wait.h>
|
||||
/*needed for MAP_POPULATE before including qemu-options.h */
|
||||
#include <sys/mman.h>
|
@ -1,11 +0,0 @@
|
||||
--- a/tcg/ppc/tcg-target.h
|
||||
+++ b/tcg/ppc/tcg-target.h
|
||||
@@ -69,7 +69,7 @@
|
||||
#define TCG_TARGET_CALL_STACK_OFFSET 24
|
||||
#elif defined _AIX
|
||||
#define TCG_TARGET_CALL_STACK_OFFSET 52
|
||||
-#elif defined __linux__
|
||||
+#elif defined __linux__ || defined __FreeBSD__
|
||||
#define TCG_TARGET_CALL_ALIGN_ARGS 1
|
||||
#define TCG_TARGET_CALL_STACK_OFFSET 8
|
||||
#else
|
@ -1,28 +0,0 @@
|
||||
Index: qemu/vl.c
|
||||
@@ -57,6 +57,8 @@
|
||||
#include <sys/stat.h>
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
#include <libutil.h>
|
||||
+#include <sys/param.h>
|
||||
+#include <sys/sysctl.h>
|
||||
#else
|
||||
#include <util.h>
|
||||
#endif
|
||||
@@ -3368,10 +3369,13 @@ static char *find_datadir(const char *ar
|
||||
}
|
||||
#elif defined(__FreeBSD__)
|
||||
{
|
||||
- int len;
|
||||
- len = readlink("/proc/curproc/file", buf, sizeof(buf) - 1);
|
||||
- if (len > 0) {
|
||||
- buf[len] = 0;
|
||||
+ static int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1};
|
||||
+ size_t len = sizeof(buf) - 1;
|
||||
+
|
||||
+ *buf = '\0';
|
||||
+ if (!sysctl(mib, sizeof(mib)/sizeof(*mib), buf, &len, NULL, 0) &&
|
||||
+ *buf) {
|
||||
+ buf[sizeof(buf) - 1] = '\0';
|
||||
p = buf;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
Index: qemu/x_keymap.c
|
||||
Index: qemu/ui/x_keymap.c
|
||||
@@ -41,9 +41,9 @@
|
||||
0xb5, /* 112 Divide */
|
||||
0xb8, /* 113 Alt-R */
|
||||
|
@ -98,9 +98,9 @@
|
||||
|
||||
typedef int (NetCanReceive)(VLANClientState *);
|
||||
Index: net.c
|
||||
@@ -36,6 +36,11 @@
|
||||
#include "qemu-common.h"
|
||||
@@ -37,6 +37,11 @@
|
||||
#include "qemu_socket.h"
|
||||
#include "hw/qdev.h"
|
||||
|
||||
+#include <sys/ioctl.h>
|
||||
+#ifdef __FreeBSD__
|
||||
@ -110,7 +110,7 @@ Index: net.c
|
||||
static QTAILQ_HEAD(, VLANState) vlans;
|
||||
static QTAILQ_HEAD(, VLANClientState) non_vlan_clients;
|
||||
|
||||
@@ -817,6 +822,226 @@ static int net_init_nic(QemuOpts *opts,
|
||||
@@ -820,6 +825,226 @@ static int net_init_nic(QemuOpts *opts,
|
||||
return idx;
|
||||
}
|
||||
|
||||
@ -228,11 +228,11 @@ Index: net.c
|
||||
+ goto fail;
|
||||
+ }
|
||||
+ if (pcap_set_promisc(s->handle, 1) != 0) {
|
||||
+ pcap_perror(s->handle, "qemu: pcap_set_promisc:");
|
||||
+ pcap_perror(s->handle, (char *)"qemu: pcap_set_promisc:");
|
||||
+ goto fail;
|
||||
+ }
|
||||
+ if (pcap_activate(s->handle) != 0) {
|
||||
+ pcap_perror(s->handle, "qemu: pcap_activate:");
|
||||
+ pcap_perror(s->handle, (char *)"qemu: pcap_activate:");
|
||||
+ goto fail;
|
||||
+ }
|
||||
+#else
|
||||
@ -337,7 +337,7 @@ Index: net.c
|
||||
#define NET_COMMON_PARAMS_DESC \
|
||||
{ \
|
||||
.name = "type", \
|
||||
@@ -977,6 +1202,20 @@ static struct {
|
||||
@@ -988,6 +1213,20 @@ static const struct {
|
||||
#endif /* _WIN32 */
|
||||
{ /* end of list */ }
|
||||
},
|
||||
@ -358,6 +358,14 @@ Index: net.c
|
||||
}, {
|
||||
.type = "socket",
|
||||
.init = net_init_socket,
|
||||
@@ -1314,6 +1553,7 @@ void net_check_clients(void)
|
||||
case NET_CLIENT_TYPE_TAP:
|
||||
case NET_CLIENT_TYPE_SOCKET:
|
||||
case NET_CLIENT_TYPE_VDE:
|
||||
+ case NET_CLIENT_TYPE_PCAP:
|
||||
has_host_dev = 1;
|
||||
break;
|
||||
default: ;
|
||||
--- qemu-options.hx.orig 2010-01-14 17:18:00.000000000 -0500
|
||||
+++ qemu-options.hx 2010-01-29 14:36:00.000000000 -0500
|
||||
@@ -799,6 +799,10 @@ DEF("smb", HAS_ARG, QEMU_OPTION_smb, "")
|
||||
|
@ -1,10 +0,0 @@
|
||||
Index: hw/rtl8139.c
|
||||
@@ -58,7 +58,7 @@
|
||||
//#define RTL8139_CALCULATE_RXCRC 1
|
||||
|
||||
/* Uncomment to enable on-board timer interrupts */
|
||||
-//#define RTL8139_ONBOARD_TIMER 1
|
||||
+#define RTL8139_ONBOARD_TIMER 1
|
||||
|
||||
#if defined(RTL8139_CALCULATE_RXCRC)
|
||||
/* For crc32 */
|
@ -69,16 +69,6 @@ FreeBSD host notes
|
||||
(linux') uhci module got loaded. Workaround: either add devices before
|
||||
linux loads the module or rmmod and modprobe it afterwards.
|
||||
|
||||
- To avoid panics or non-working re(4) nics with FreeBSD guests if you use
|
||||
qemu -net nic,model=rtl8139 -net user or tap ... enable the emulated rtl8139
|
||||
timer by building the port with RTL8139_TIMER enabled. (The rtl8139c+ that
|
||||
model=rtl8139 emulates needs less cpu than qemu's default ne2k nic which is
|
||||
driven by ed(4), it has not been made default only because it may not work
|
||||
with all guests yet. Btw qemu now also can emulate a few intel eepro100 and
|
||||
e1000 nics which seem to be a tad more efficient even, and at least i82557b
|
||||
and e1000 work without tweaks for FreeBSD guests - driven by fxp(4) and
|
||||
em(4) repectively - and Linux guests too.)
|
||||
|
||||
- If you get repeated `atapi_poll called!' console messages with FreeBSD
|
||||
guests or other weird cdrom problems then thats probably because the guest
|
||||
has atapicam loaded, which for reasons still to be determined has problems
|
||||
|
@ -1,6 +1,7 @@
|
||||
bin/qemu
|
||||
bin/qemu-img
|
||||
bin/qemu-io
|
||||
bin/qemu-nbd
|
||||
%%ALLTARGETS%%bin/qemu-system-arm
|
||||
%%ALLTARGETS%%bin/qemu-system-cris
|
||||
%%ALLTARGETS%%bin/qemu-system-m68k
|
||||
@ -27,6 +28,10 @@ etc/qemu-ifup.sample
|
||||
@unexec if cmp -s %D/etc/qemu-ifdown.sample %D/etc/qemu-ifdown; then rm -f %D/etc/qemu-ifdown; fi
|
||||
etc/qemu-ifdown.sample
|
||||
@exec if [ ! -f %D/etc/qemu-ifdown ] ; then cp -p %D/%F %B/qemu-ifdown; fi
|
||||
@unexec if cmp -s %D/etc/qemu/target-x86_64.conf.sample %D/etc/qemu/target-x86_64.conf; then rm -f %D/etc/qemu/target-x86_64.conf; fi
|
||||
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%%
|
||||
@ -39,11 +44,13 @@ etc/qemu-ifdown.sample
|
||||
%%DATADIR%%/openbios-sparc64
|
||||
%%DATADIR%%/video.x
|
||||
%%DATADIR%%/pxe-e1000.bin
|
||||
%%DATADIR%%/pxe-i82559er.bin
|
||||
%%DATADIR%%/pxe-ne2k_pci.bin
|
||||
%%DATADIR%%/pxe-rtl8139.bin
|
||||
%%DATADIR%%/pxe-pcnet.bin
|
||||
%%DATADIR%%/pxe-virtio.bin
|
||||
%%DATADIR%%/gpxe-eepro100-80861209.rom
|
||||
%%DATADIR%%/gpxe-eepro100-80861229.rom
|
||||
%%DATADIR%%/s390-zipl.rom
|
||||
%%DATADIR%%/linuxboot.bin
|
||||
%%DATADIR%%/multiboot.bin
|
||||
%%DATADIR%%/petalogix-s3adsp1800.dtb
|
||||
|
Loading…
Reference in New Issue
Block a user