mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
- Update to 2.0.0 - announce message is here:
http://article.gmane.org/gmane.comp.emulators.qemu/267615 - Take updated bsd-user patches from sbruno's github repo. [1] - Add headers to my recent bsd-user patches. (they are applied as in the EXTRA_PATCHES order in the port Makefile) Submitted by: sbruno [1] Obtained from: https://github.com/seanbruno/qemu/commits/bsd-user [1]
This commit is contained in:
parent
f107703159
commit
cf14e8bdd7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=351530
20 changed files with 30564 additions and 132 deletions
|
@ -2,8 +2,7 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= qemu
|
||||
PORTVERSION= 1.7.1
|
||||
PORTREVISION= 5
|
||||
PORTVERSION= 2.0.0
|
||||
CATEGORIES= emulators
|
||||
MASTER_SITES= http://wiki.qemu.org/download/:release \
|
||||
LOCAL/nox:snapshot
|
||||
|
@ -45,27 +44,14 @@ OPTIONS_DEFAULT=X11 GTK2 OPENGL GNUTLS SASL JPEG PNG CDROM_DMA CURL PCAP
|
|||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MBSD_USER}
|
||||
PATCH_SITES= http://people.freebsd.org/~sson/qemu/qemu-bsd-user/
|
||||
PATCHFILES= \
|
||||
0001-bsd-user-refresh-freebsd-system-call-numbers.patch \
|
||||
0002-bsd-user-add-HOST_VARIANT_DIR-for-various-BSD-depend.patch \
|
||||
0003-bsd-user-move-strace-OS-arch-dependent-code-to-host-.patch \
|
||||
0004-bsd-user-move-arch-OS-dependent-code-out-of-main.c.patch \
|
||||
0005-bsd-user-move-arch-OS-dependent-code-out-of-syscall..patch \
|
||||
0006-bsd-user-add-support-for-freebsd-time-related-system.patch \
|
||||
0007-bsd-user-add-support-for-freebsd-signal-related-syst.patch \
|
||||
0008-bsd-user-move-arch-OS-dependent-code-out-of-elfload..patch \
|
||||
0009-bsd-user-add-support-for-freebsd-process-related-sys.patch \
|
||||
0010-bsd-user-add-support-for-file-system-related-system-.patch \
|
||||
0011-bsd-user-add-support-for-stat-dir-and-fcntl-related-.patch \
|
||||
0012-bsd-user-add-support-for-memory-management-related-s.patch \
|
||||
0013-bsd-user-add-support-for-socket-related-system-calls.patch \
|
||||
0014-bsd-user-add-support-for-thread-related-system-calls.patch \
|
||||
0015-bsd-user-add-support-for-the-ioctl-system-call.patch \
|
||||
0016-bsd-user-add-support-for-extattr-and-ACL-related-sys.patch \
|
||||
0017-bsd-user-add-support-for-miscellaneous-system-calls.patch \
|
||||
0018-bsd-user-add-arm-mips-and-mips64-options-to-configur.patch
|
||||
PATCH_DIST_STRIP= -p1
|
||||
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-790d0ef625d22ff3f1a895d266a48e2bacd63776
|
||||
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-3d175d6ed5b809976662135369c639f53780ca5c
|
||||
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-a3129eea10f188bfd39ce83b18b25dcefbc5bffc
|
||||
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-fd7ec8e06cd1876ef478975f052ff64134d19c6c
|
||||
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-9ac2c49c734a49025fe1647ce84728d3988ea5d2
|
||||
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-38f8d5aaebdb4b1624bae86b374b5265c9f01b54
|
||||
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-c13_tls2
|
||||
#
|
||||
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-bsd-user-freebsd-os-proc.c
|
||||
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-05ee8495804599b52a88eb36b13ea9c06b3207cd
|
||||
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-bsd-user-mips-target_arch_vmparam.h
|
||||
|
@ -97,7 +83,7 @@ CONFIGURE_ARGS+= --target-list=i386-softmmu,x86_64-softmmu
|
|||
CONFIGURE_ARGS+= --disable-bsd-user
|
||||
.else
|
||||
.if ${ARCH} != "amd64"
|
||||
CONFIGURE_ARGS+= --target-list=i386-softmmu,x86_64-softmmu,alpha-softmmu,arm-softmmu,cris-softmmu,lm32-softmmu,m68k-softmmu,microblaze-softmmu,microblazeel-softmmu,mips-softmmu,mipsel-softmmu,mips64-softmmu,mips64el-softmmu,or32-softmmu,ppc-softmmu,ppcemb-softmmu,ppc64-softmmu,sh4-softmmu,sh4eb-softmmu,sparc-softmmu,sparc64-softmmu,s390x-softmmu,xtensa-softmmu,xtensaeb-softmmu,unicore32-softmmu,moxie-softmmu,i386-bsd-user,sparc-bsd-user,arm-bsd-user,mips-bsd-user,mipsel-bsd-user
|
||||
CONFIGURE_ARGS+= --target-list=i386-softmmu,x86_64-softmmu,aarch64-softmmu,alpha-softmmu,arm-softmmu,cris-softmmu,lm32-softmmu,m68k-softmmu,microblaze-softmmu,microblazeel-softmmu,mips-softmmu,mipsel-softmmu,mips64-softmmu,mips64el-softmmu,or32-softmmu,ppc-softmmu,ppcemb-softmmu,ppc64-softmmu,sh4-softmmu,sh4eb-softmmu,sparc-softmmu,sparc64-softmmu,s390x-softmmu,xtensa-softmmu,xtensaeb-softmmu,unicore32-softmmu,moxie-softmmu,i386-bsd-user,sparc-bsd-user,arm-bsd-user,mips-bsd-user,mipsel-bsd-user
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
|
@ -144,7 +130,7 @@ USE_SDL= sdl
|
|||
.endif
|
||||
|
||||
.if empty(PORT_OPTIONS:MGTK2)
|
||||
CONFIGURE_ARGS+= --disable-gtk
|
||||
CONFIGURE_ARGS+= --disable-gtk --disable-vte
|
||||
PLIST_SUB+= GTK2="@comment "
|
||||
.else
|
||||
USE_GNOME+= gtk20 vte
|
||||
|
@ -241,11 +227,6 @@ MAKE_ENV+= COMPILER_PATH=${LOCALBASE}/bin
|
|||
|
||||
CONFIGURE_ARGS+= --python=${PYTHON_CMD}
|
||||
|
||||
.if ${PORT_OPTIONS:MBSD_USER}
|
||||
pre-patch:
|
||||
@cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/prepatch-configure
|
||||
.endif
|
||||
|
||||
# -lprocstat actually only _needs_ -lelf after r249666 or r250870 (MFC)
|
||||
# but it shouldn't matter much
|
||||
post-patch:
|
||||
|
|
|
@ -1,38 +1,2 @@
|
|||
SHA256 (qemu/1.7.1/qemu-1.7.1.tar.bz2) = d68942a004222eebae5d156ceefb308fabd98edb282d1dde49ec810bbf01bef4
|
||||
SIZE (qemu/1.7.1/qemu-1.7.1.tar.bz2) = 12246206
|
||||
SHA256 (qemu/1.7.1/0001-bsd-user-refresh-freebsd-system-call-numbers.patch) = 15fa3f286ae03636c9340de0b44ec4fc47e428025f103382a578029db45ec252
|
||||
SIZE (qemu/1.7.1/0001-bsd-user-refresh-freebsd-system-call-numbers.patch) = 36542
|
||||
SHA256 (qemu/1.7.1/0002-bsd-user-add-HOST_VARIANT_DIR-for-various-BSD-depend.patch) = 021f8c1fdba448c8eeb7a9f8035b8a47b1f463a59ee7da60d733bd63c2924b13
|
||||
SIZE (qemu/1.7.1/0002-bsd-user-add-HOST_VARIANT_DIR-for-various-BSD-depend.patch) = 2730
|
||||
SHA256 (qemu/1.7.1/0003-bsd-user-move-strace-OS-arch-dependent-code-to-host-.patch) = b0b08af1a4d6e7e660290c9f0293d7ad486c51df8fce29abed9db76143317d8a
|
||||
SIZE (qemu/1.7.1/0003-bsd-user-move-strace-OS-arch-dependent-code-to-host-.patch) = 50756
|
||||
SHA256 (qemu/1.7.1/0004-bsd-user-move-arch-OS-dependent-code-out-of-main.c.patch) = 184336d1e8a6fabfa4fc6043603ab4f373d1ae80aefd7c57ba23cc36038b81da
|
||||
SIZE (qemu/1.7.1/0004-bsd-user-move-arch-OS-dependent-code-out-of-main.c.patch) = 143116
|
||||
SHA256 (qemu/1.7.1/0005-bsd-user-move-arch-OS-dependent-code-out-of-syscall..patch) = 352b624cb09223a2c2df6281211719e20964829b5d776a18a8a0b5fe405ac9e3
|
||||
SIZE (qemu/1.7.1/0005-bsd-user-move-arch-OS-dependent-code-out-of-syscall..patch) = 44814
|
||||
SHA256 (qemu/1.7.1/0006-bsd-user-add-support-for-freebsd-time-related-system.patch) = fa6a24c90f451ba087964c3089b887cc97ef4aec66a251dd0b67279f66134737
|
||||
SIZE (qemu/1.7.1/0006-bsd-user-add-support-for-freebsd-time-related-system.patch) = 75063
|
||||
SHA256 (qemu/1.7.1/0007-bsd-user-add-support-for-freebsd-signal-related-syst.patch) = e4d78570ab787be5131a9336d06c51309a684a02b612099929f0bea728c99225
|
||||
SIZE (qemu/1.7.1/0007-bsd-user-add-support-for-freebsd-signal-related-syst.patch) = 100195
|
||||
SHA256 (qemu/1.7.1/0008-bsd-user-move-arch-OS-dependent-code-out-of-elfload..patch) = 6a5083c5257aea2da050cdf47a261b4e883a7b4e8a1410dd7dae4b1499f600c8
|
||||
SIZE (qemu/1.7.1/0008-bsd-user-move-arch-OS-dependent-code-out-of-elfload..patch) = 93309
|
||||
SHA256 (qemu/1.7.1/0009-bsd-user-add-support-for-freebsd-process-related-sys.patch) = 7e5e99ef2279c3023d21b9540eb9ad9355cd0010dd402cd60ab3abe6c40cb36f
|
||||
SIZE (qemu/1.7.1/0009-bsd-user-add-support-for-freebsd-process-related-sys.patch) = 60141
|
||||
SHA256 (qemu/1.7.1/0010-bsd-user-add-support-for-file-system-related-system-.patch) = 52f97f394b5c75778e4f003de1033896fdc07c235289a9e91a8771e75bb9fd18
|
||||
SIZE (qemu/1.7.1/0010-bsd-user-add-support-for-file-system-related-system-.patch) = 43516
|
||||
SHA256 (qemu/1.7.1/0011-bsd-user-add-support-for-stat-dir-and-fcntl-related-.patch) = 5d25f3363080806a939cc985c9866c409006b35840a81f8d3c74f2cb9451ed31
|
||||
SIZE (qemu/1.7.1/0011-bsd-user-add-support-for-stat-dir-and-fcntl-related-.patch) = 31292
|
||||
SHA256 (qemu/1.7.1/0012-bsd-user-add-support-for-memory-management-related-s.patch) = f9e39e7138ad8c995255a4300b6887fce468296f61467445d3d2438cb6e1a761
|
||||
SIZE (qemu/1.7.1/0012-bsd-user-add-support-for-memory-management-related-s.patch) = 37395
|
||||
SHA256 (qemu/1.7.1/0013-bsd-user-add-support-for-socket-related-system-calls.patch) = 3e9f586a7327424d449c5a7c9cd7a589d8b14091bbe860cfe00a518bd1f6800c
|
||||
SIZE (qemu/1.7.1/0013-bsd-user-add-support-for-socket-related-system-calls.patch) = 46894
|
||||
SHA256 (qemu/1.7.1/0014-bsd-user-add-support-for-thread-related-system-calls.patch) = f33d86896466ba39484715253ba9284d6c335b4e0e635150507bad63ef19e113
|
||||
SIZE (qemu/1.7.1/0014-bsd-user-add-support-for-thread-related-system-calls.patch) = 67546
|
||||
SHA256 (qemu/1.7.1/0015-bsd-user-add-support-for-the-ioctl-system-call.patch) = 90407a8e312ac5f4b3524cd5f65274baea49c4addf04a4614ce356e069983ab3
|
||||
SIZE (qemu/1.7.1/0015-bsd-user-add-support-for-the-ioctl-system-call.patch) = 77683
|
||||
SHA256 (qemu/1.7.1/0016-bsd-user-add-support-for-extattr-and-ACL-related-sys.patch) = b74903bfa42718edf4db21a2d746ab2c9548694c6dd6a270ea7c6885405505ec
|
||||
SIZE (qemu/1.7.1/0016-bsd-user-add-support-for-extattr-and-ACL-related-sys.patch) = 43940
|
||||
SHA256 (qemu/1.7.1/0017-bsd-user-add-support-for-miscellaneous-system-calls.patch) = 6238ab7325c95b64544e7e72e7c45e44d4625a2e64851248dbb621b86ac7ed0d
|
||||
SIZE (qemu/1.7.1/0017-bsd-user-add-support-for-miscellaneous-system-calls.patch) = 58081
|
||||
SHA256 (qemu/1.7.1/0018-bsd-user-add-arm-mips-and-mips64-options-to-configur.patch) = 694159e25187159709d449741446cc3218d31ea7eee47dde4946e8505d48a798
|
||||
SIZE (qemu/1.7.1/0018-bsd-user-add-arm-mips-and-mips64-options-to-configur.patch) = 2341
|
||||
SHA256 (qemu/2.0.0/qemu-2.0.0.tar.bz2) = 60cc1aa0cad39cec891f970bed60ca8a484f071adad4943123599ac223543a3b
|
||||
SIZE (qemu/2.0.0/qemu-2.0.0.tar.bz2) = 12839647
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
diff --git a/bsd-user/freebsd/os-thread.c b/bsd-user/freebsd/os-thread.c
|
||||
index 6bf2a9f..bcd2445 100644
|
||||
--- a/bsd-user/freebsd/os-thread.c
|
||||
+++ b/bsd-user/freebsd/os-thread.c
|
||||
@@ -899,11 +899,13 @@ abi_long do_freebsd_thr_new(CPUArchState *env,
|
||||
pthread_attr_t attr;
|
||||
TaskState *ts;
|
||||
CPUArchState *new_env;
|
||||
+ CPUState *new_cpu;
|
||||
struct target_freebsd_thr_param *target_param;
|
||||
abi_ulong target_rtp_addr;
|
||||
struct target_freebsd_rtprio *target_rtp;
|
||||
struct rtprio *rtp_ptr, rtp;
|
||||
- TaskState *parent_ts = (TaskState *)env->opaque;
|
||||
+ CPUState *parent_cpu = ENV_GET_CPU(env);
|
||||
+ TaskState *parent_ts = parent_cpu->opaque;
|
||||
sigset_t sigmask;
|
||||
struct sched_param sched_param;
|
||||
int sched_policy;
|
||||
@@ -948,7 +950,8 @@ abi_long do_freebsd_thr_new(CPUArchState *env,
|
||||
|
||||
/* init regs that differ from the parent thread. */
|
||||
target_cpu_clone_regs(new_env, info.param.stack_base);
|
||||
- new_env->opaque = ts;
|
||||
+ new_cpu = ENV_GET_CPU(new_env);
|
||||
+ new_cpu->opaque = ts;
|
||||
ts->bprm = parent_ts->bprm;
|
||||
ts->info = parent_ts->info;
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
diff --git a/bsd-user/main.c b/bsd-user/main.c
|
||||
index f27fcbc..16a0590 100644
|
||||
--- a/bsd-user/main.c
|
||||
+++ b/bsd-user/main.c
|
||||
@@ -272,6 +272,7 @@ void init_task_state(TaskState *ts)
|
||||
CPUArchState *cpu_copy(CPUArchState *env)
|
||||
{
|
||||
CPUArchState *new_env = cpu_init(cpu_model);
|
||||
+ CPUState *cpu;
|
||||
#if defined(TARGET_HAS_ICE)
|
||||
CPUBreakpoint *bp;
|
||||
CPUWatchpoint *wp;
|
||||
@@ -281,18 +282,19 @@ CPUArchState *cpu_copy(CPUArchState *env)
|
||||
cpu_reset(ENV_GET_CPU(new_env));
|
||||
|
||||
memcpy(new_env, env, sizeof(CPUArchState));
|
||||
+ cpu = ENV_GET_CPU(env);
|
||||
|
||||
/* Clone all break/watchpoints.
|
||||
Note: Once we support ptrace with hw-debug register access, make sure
|
||||
BP_CPU break/watchpoints are handled correctly on clone. */
|
||||
- QTAILQ_INIT(&env->breakpoints);
|
||||
- QTAILQ_INIT(&env->watchpoints);
|
||||
+ QTAILQ_INIT(&cpu->breakpoints);
|
||||
+ QTAILQ_INIT(&cpu->watchpoints);
|
||||
#if defined(TARGET_HAS_ICE)
|
||||
- QTAILQ_FOREACH(bp, &env->breakpoints, entry) {
|
||||
- cpu_breakpoint_insert(new_env, bp->pc, bp->flags, NULL);
|
||||
+ QTAILQ_FOREACH(bp, &cpu->breakpoints, entry) {
|
||||
+ cpu_breakpoint_insert(cpu, bp->pc, bp->flags, NULL);
|
||||
}
|
||||
- QTAILQ_FOREACH(wp, &env->watchpoints, entry) {
|
||||
- cpu_watchpoint_insert(new_env, wp->vaddr, (~wp->len_mask) + 1,
|
||||
+ QTAILQ_FOREACH(wp, &cpu->watchpoints, entry) {
|
||||
+ cpu_watchpoint_insert(cpu, wp->vaddr, (~wp->len_mask) + 1,
|
||||
wp->flags, NULL);
|
||||
}
|
||||
#endif
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,14 @@
|
|||
diff --git a/bsd-user/freebsd/os-sys.c b/bsd-user/freebsd/os-sys.c
|
||||
index c8f999f..2578645 100644
|
||||
--- a/bsd-user/freebsd/os-sys.c
|
||||
+++ b/bsd-user/freebsd/os-sys.c
|
||||
@@ -130,7 +130,8 @@ abi_long do_freebsd_sysctl(CPUArchState *env, abi_ulong namep, int32_t namelen,
|
||||
abi_ulong oldlen = 0;
|
||||
int32_t *snamep = g_malloc(sizeof(int32_t) * namelen), *p, *q, i;
|
||||
uint32_t kind = 0;
|
||||
- TaskState *ts = (TaskState *)env->opaque;
|
||||
+ CPUState *cpu = ENV_GET_CPU(env);
|
||||
+ TaskState *ts = cpu->opaque;
|
||||
|
||||
if (oldlenp) {
|
||||
if (get_user_ual(oldlen, oldlenp)) {
|
|
@ -0,0 +1,53 @@
|
|||
diff --git a/bsd-user/signal.c b/bsd-user/signal.c
|
||||
index 3619b00..01374a6 100644
|
||||
--- a/bsd-user/signal.c
|
||||
+++ b/bsd-user/signal.c
|
||||
@@ -283,7 +283,8 @@ static int core_dump_signal(int sig)
|
||||
/* Signal queue handling. */
|
||||
static inline struct qemu_sigqueue *alloc_sigqueue(CPUArchState *env)
|
||||
{
|
||||
- TaskState *ts = env->opaque;
|
||||
+ CPUState *cpu = thread_cpu;
|
||||
+ TaskState *ts = (TaskState *)cpu->opaque;
|
||||
struct qemu_sigqueue *q = ts->first_free;
|
||||
|
||||
if (!q) {
|
||||
@@ -296,7 +297,8 @@ static inline struct qemu_sigqueue *alloc_sigqueue(CPUArchState *env)
|
||||
static inline void free_sigqueue(CPUArchState *env, struct qemu_sigqueue *q)
|
||||
{
|
||||
|
||||
- TaskState *ts = env->opaque;
|
||||
+ CPUState *cpu = thread_cpu;
|
||||
+ TaskState *ts = (TaskState *)cpu->opaque;
|
||||
q->next = ts->first_free;
|
||||
ts->first_free = q;
|
||||
}
|
||||
@@ -305,7 +307,8 @@ static inline void free_sigqueue(CPUArchState *env, struct qemu_sigqueue *q)
|
||||
void QEMU_NORETURN force_sig(int target_sig)
|
||||
{
|
||||
CPUArchState *env = thread_cpu->env_ptr;
|
||||
- TaskState *ts = (TaskState *)env->opaque;
|
||||
+ CPUState *cpu = thread_cpu;
|
||||
+ TaskState *ts = (TaskState *)cpu->opaque;
|
||||
int core_dumped = 0;
|
||||
int host_sig;
|
||||
struct sigaction act;
|
||||
@@ -365,7 +368,8 @@ void QEMU_NORETURN force_sig(int target_sig)
|
||||
*/
|
||||
int queue_signal(CPUArchState *env, int sig, target_siginfo_t *info)
|
||||
{
|
||||
- TaskState *ts = env->opaque;
|
||||
+ CPUState *cpu = thread_cpu;
|
||||
+ TaskState *ts = (TaskState *)cpu->opaque;
|
||||
struct emulated_sigtable *k;
|
||||
struct qemu_sigqueue *q, **pq;
|
||||
abi_ulong handler;
|
||||
@@ -826,7 +830,7 @@ void process_pending_signals(CPUArchState *cpu_env)
|
||||
struct emulated_sigtable *k;
|
||||
struct target_sigaction *sa;
|
||||
struct qemu_sigqueue *q;
|
||||
- TaskState *ts = cpu_env->opaque;
|
||||
+ TaskState *ts = cpu->opaque;
|
||||
|
||||
if (!ts->signal_pending) {
|
||||
return;
|
|
@ -1,3 +1,14 @@
|
|||
From nox Mon Sep 17 00:00:00 2001
|
||||
From: Juergen Lock <nox@jelal.kn-bremen.de>
|
||||
Date: 22 Mar 2014 00:21:00 +0100
|
||||
Subject: Fix bsd-user targets running scripts with shebang args
|
||||
|
||||
This fixes running scripts starting like:
|
||||
|
||||
#! /usr/bin/perl -w
|
||||
|
||||
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
|
||||
|
||||
--- a/bsd-user/freebsd/os-proc.c
|
||||
--- b/bsd-user/freebsd/os-proc.c
|
||||
@@ -83,7 +83,7 @@ out:
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
From nox Mon Sep 17 00:00:00 2001
|
||||
From: Juergen Lock <nox@jelal.kn-bremen.de>
|
||||
Date: 04 Apr 2014 02:09:00 +0200
|
||||
Subject: Lower 32bit mips TARGET_USRSTACK
|
||||
|
||||
Lower 32bit mips TARGET_USRSTACK to fix an assert starting mips-bsd-user
|
||||
processes on 64bit hosts. (like amd64)
|
||||
|
||||
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
|
||||
|
||||
--- a/bsd-user/mips/target_arch_vmparam.h
|
||||
+++ b/bsd-user/mips/target_arch_vmparam.h
|
||||
@@ -35,7 +35,8 @@
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
From nox Mon Sep 17 00:00:00 2001
|
||||
From: Juergen Lock <nox@jelal.kn-bremen.de>
|
||||
Date: 06 Apr 2014 02:20:00 +0200
|
||||
Subject: Wrap bsd-user mmap(2) allocation search to low memory
|
||||
|
||||
Wrap bsd-user mmap(2) allocation search to low memory to avoid
|
||||
another assert on 64bit hosts.
|
||||
|
||||
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
|
||||
|
||||
--- a/bsd-user/mmap.c
|
||||
+++ b/bsd-user/mmap.c
|
||||
@@ -238,8 +238,13 @@ abi_ulong mmap_find_vma(abi_ulong start,
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
From nox Mon Sep 17 00:00:00 2001
|
||||
From: Juergen Lock <nox@jelal.kn-bremen.de>
|
||||
Date: 05 Apr 2014 02:04:00 +0200
|
||||
Subject: Fix bsd-user FreeBSD fchflags() syscall (typo)
|
||||
|
||||
Fix bsd-user FreeBSD fchflags() syscall. (typo)
|
||||
|
||||
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
|
||||
|
||||
--- a/bsd-user/syscall.c
|
||||
+++ b/bsd-user/syscall.c
|
||||
@@ -627,7 +627,7 @@ abi_long do_freebsd_syscall(void *cpu_en
|
||||
|
|
15
emulators/qemu-devel/files/extra-patch-c13_tls2
Normal file
15
emulators/qemu-devel/files/extra-patch-c13_tls2
Normal file
|
@ -0,0 +1,15 @@
|
|||
--- a/bsd-user/arm/target_arch_cpu.c
|
||||
+++ b/bsd-user/arm/target_arch_cpu.c
|
||||
@@ -18,10 +18,10 @@
|
||||
|
||||
void target_cpu_set_tls(CPUARMState *env, target_ulong newtls)
|
||||
{
|
||||
- env->cp15.c13_tls2 = newtls;
|
||||
+ env->cp15.tpidrro_el0 = newtls;
|
||||
}
|
||||
|
||||
target_ulong target_cpu_get_tls(CPUARMState *env)
|
||||
{
|
||||
- return (env->cp15.c13_tls2);
|
||||
+ return (env->cp15.tpidrro_el0);
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/bsd-user/freebsd/os-thread.h b/bsd-user/freebsd/os-thread.h
|
||||
index 5e24852..28f737f 100644
|
||||
--- a/bsd-user/freebsd/os-thread.h
|
||||
+++ b/bsd-user/freebsd/os-thread.h
|
||||
@@ -68,7 +68,7 @@ static abi_long do_freebsd_thr_exit(CPUArchState *cpu_env, abi_ulong tid_addr)
|
||||
}
|
||||
thread_cpu = NULL;
|
||||
object_unref(OBJECT(ENV_GET_CPU(cpu_env)));
|
||||
- ts = ((CPUArchState *)cpu_env)->opaque;
|
||||
+ ts = cpu->opaque;
|
||||
g_free(ts);
|
||||
pthread_exit(NULL);
|
||||
/* Doesn't return */
|
|
@ -1,3 +1,13 @@
|
|||
From nox Mon Sep 17 00:00:00 2001
|
||||
From: Juergen Lock <nox@jelal.kn-bremen.de>
|
||||
Date: 04 Apr 2014 16:36:00 +0200
|
||||
Subject: Pass down interp_prefix (-L arg) to bsd-user child processes
|
||||
|
||||
Pass down interp_prefix (-L arg) to bsd-user target child processes
|
||||
so running shared target binaries as subprocesses works.
|
||||
|
||||
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
|
||||
|
||||
--- a/bsd-user/main.c
|
||||
+++ b/bsd-user/main.c
|
||||
@@ -58,7 +58,7 @@ unsigned long reserved_va;
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
From nox Mon Sep 17 00:00:00 2001
|
||||
From: Juergen Lock <nox@jelal.kn-bremen.de>
|
||||
Date: 05 Apr 2014 23:36:00 +0200
|
||||
Subject: Fix FreeBSD sysctls kern.usrstack and kern.ps_strings
|
||||
|
||||
Fix FreeBSD sysctls kern.usrstack and kern.ps_strings invoked with
|
||||
oidlen zero. (like from sysctl(8))
|
||||
|
||||
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
|
||||
|
||||
--- a/bsd-user/freebsd/os-sys.c
|
||||
+++ b/bsd-user/freebsd/os-sys.c
|
||||
@@ -165,7 +165,9 @@ abi_long do_freebsd_sysctl(CPUArchState
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
From nox Mon Sep 17 00:00:00 2001
|
||||
From: Juergen Lock <nox@jelal.kn-bremen.de>
|
||||
Date: 05 Apr 2014 21:06:00 +0200
|
||||
Subject: Fix bsd-user FreeBSD hw.availpages sysctl
|
||||
|
||||
hw.availpages is defined as OID_AUTO so the mib can change; find out
|
||||
it's value at the first hw.* sysctl syscall.
|
||||
|
||||
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
|
||||
|
||||
--- a/bsd-user/freebsd/os-sys.c
|
||||
+++ b/bsd-user/freebsd/os-sys.c
|
||||
@@ -219,24 +219,36 @@ abi_long do_freebsd_sysctl(CPUArchState
|
||||
|
|
|
@ -9,16 +9,16 @@
|
|||
datadir="\${prefix}/share"
|
||||
qemu_docdir="\${prefix}/share/doc/qemu"
|
||||
bindir="\${prefix}/bin"
|
||||
@@ -1749,7 +1749,7 @@ if test "$gtk" != "no"; then
|
||||
@@ -1980,7 +1980,7 @@ if test "$gtk" != "no"; then
|
||||
if $pkg_config --exists "$gtkpackage >= $gtkversion"; then
|
||||
gtk_cflags=`$pkg_config --cflags $gtkpackage`
|
||||
gtk_libs=`$pkg_config --libs $gtkpackage`
|
||||
vte_cflags=`$pkg_config --cflags $vtepackage`
|
||||
vte_libs=`$pkg_config --libs $vtepackage`
|
||||
- libs_softmmu="$gtk_libs $vte_libs $libs_softmmu"
|
||||
+ libs_softmmu="$gtk_libs -lintl $vte_libs $libs_softmmu"
|
||||
- libs_softmmu="$gtk_libs $libs_softmmu"
|
||||
+ libs_softmmu="$gtk_libs -lintl $libs_softmmu"
|
||||
gtk="yes"
|
||||
fi
|
||||
fi
|
||||
@@ -2956,15 +2956,18 @@ if compile_prog "" "" ; then
|
||||
elif test "$gtk" = "yes"; then
|
||||
feature_not_found "gtk" "Install gtk2 or gtk3 (requires --with-gtkabi=3.0 option to configure) devel"
|
||||
@@ -3320,15 +3320,18 @@ if compile_prog "" "" ; then
|
||||
fi
|
||||
|
||||
# Check if tools are available to build documentation.
|
||||
|
@ -27,7 +27,7 @@
|
|||
+# docs=yes
|
||||
+# else
|
||||
+# if test "$docs" = "yes" ; then
|
||||
+# feature_not_found "docs"
|
||||
+# feature_not_found "docs" "Install texinfo and Perl/perl-podlators"
|
||||
+# fi
|
||||
+# docs=no
|
||||
+# fi
|
||||
|
@ -37,7 +37,7 @@
|
|||
- docs=yes
|
||||
- else
|
||||
- if test "$docs" = "yes" ; then
|
||||
- feature_not_found "docs"
|
||||
- feature_not_found "docs" "Install texinfo and Perl/perl-podlators"
|
||||
- fi
|
||||
- docs=no
|
||||
- fi
|
||||
|
@ -45,15 +45,10 @@
|
|||
fi
|
||||
|
||||
# Search for bswap_32 function
|
||||
@@ -3121,17 +3124,30 @@ fi
|
||||
@@ -3498,6 +3501,17 @@ fi
|
||||
|
||||
# check for libusb
|
||||
if test "$libusb" != "no" ; then
|
||||
- if $pkg_config --atleast-version=1.0.13 libusb-1.0; then
|
||||
- libusb="yes"
|
||||
- libusb_cflags=$($pkg_config --cflags libusb-1.0)
|
||||
- libusb_libs=$($pkg_config --libs libusb-1.0)
|
||||
- QEMU_CFLAGS="$QEMU_CFLAGS $libusb_cflags"
|
||||
+ cat > $TMPC << EOF
|
||||
+#include <libusb.h>
|
||||
+
|
||||
|
@ -63,24 +58,16 @@
|
|||
+ libusb="yes"
|
||||
+ libusb_cflags=""
|
||||
+ libusb_libs=-lusb
|
||||
libs_softmmu="$libs_softmmu $libusb_libs"
|
||||
else
|
||||
- if test "$libusb" = "yes"; then
|
||||
- feature_not_found "libusb"
|
||||
+ if $pkg_config --atleast-version=1.0.13 libusb-1.0; then
|
||||
+ libusb="yes"
|
||||
+ usb="libusb"
|
||||
+ libusb_cflags=$($pkg_config --cflags libusb-1.0)
|
||||
+ libusb_libs=$($pkg_config --libs libusb-1.0)
|
||||
+ QEMU_CFLAGS="$QEMU_CFLAGS $libusb_cflags"
|
||||
+ libs_softmmu="$libs_softmmu $libusb_libs"
|
||||
+ else
|
||||
+ if test "$libusb" = "yes"; then
|
||||
+ feature_not_found "libusb"
|
||||
if $pkg_config --atleast-version=1.0.13 libusb-1.0; then
|
||||
libusb="yes"
|
||||
libusb_cflags=$($pkg_config --cflags libusb-1.0)
|
||||
@@ -3510,6 +3524,7 @@ if test "$libusb" != "no" ; then
|
||||
fi
|
||||
libusb="no"
|
||||
fi
|
||||
+ fi
|
||||
+ libusb="no"
|
||||
fi
|
||||
- libusb="no"
|
||||
fi
|
||||
fi
|
||||
|
||||
# check for usbredirparser for usb network redirection support
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
--- a/tcg/i386/tcg-target.c
|
||||
+++ b/tcg/i386/tcg-target.c
|
||||
@@ -104,6 +104,10 @@ static const int tcg_target_call_oarg_re
|
||||
# define have_cmov 1
|
||||
#elif defined(CONFIG_CPUID_H)
|
||||
#include <cpuid.h>
|
||||
+#ifndef bit_CMOV
|
||||
+/* clang's <cpuid.h> doesn't define bit_* */
|
||||
+#define bit_CMOV (1 << 15)
|
||||
+#endif
|
||||
static bool have_cmov;
|
||||
#else
|
||||
# define have_cmov 0
|
|
@ -1,16 +1,16 @@
|
|||
--- configure.orig
|
||||
+++ configure
|
||||
@@ -261,6 +261,9 @@ gtkabi="2.0"
|
||||
tpm="no"
|
||||
@@ -324,6 +324,9 @@ tpm="no"
|
||||
libssh2=""
|
||||
vhdx=""
|
||||
quorum="no"
|
||||
+pcap="no"
|
||||
+pcap_create="no"
|
||||
+bpf="no"
|
||||
|
||||
# parse CC options first
|
||||
for opt do
|
||||
@@ -787,6 +790,10 @@ for opt do
|
||||
@@ -865,6 +868,10 @@ for opt do
|
||||
;;
|
||||
--enable-vnc-ws) vnc_ws="yes"
|
||||
;;
|
||||
|
@ -21,7 +21,7 @@
|
|||
--disable-slirp) slirp="no"
|
||||
;;
|
||||
--disable-uuid) uuid="no"
|
||||
@@ -1884,6 +1891,51 @@ EOF
|
||||
@@ -2130,6 +2137,51 @@ EOF
|
||||
fi
|
||||
|
||||
##########################################
|
||||
|
@ -73,7 +73,7 @@
|
|||
# VNC TLS/WS detection
|
||||
if test "$vnc" = "yes" -a \( "$vnc_tls" != "no" -o "$vnc_ws" != "no" \) ; then
|
||||
cat > $TMPC <<EOF
|
||||
@@ -3747,6 +3799,7 @@ echo "Audio drivers $audio_drv_list"
|
||||
@@ -4133,6 +4185,7 @@ echo "Audio drivers $audio_drv_list"
|
||||
echo "Block whitelist (rw) $block_drv_rw_whitelist"
|
||||
echo "Block whitelist (ro) $block_drv_ro_whitelist"
|
||||
echo "VirtFS support $virtfs"
|
||||
|
@ -81,7 +81,7 @@
|
|||
echo "VNC support $vnc"
|
||||
if test "$vnc" = "yes" ; then
|
||||
echo "VNC TLS support $vnc_tls"
|
||||
@@ -3897,6 +3950,15 @@ fi
|
||||
@@ -4297,6 +4350,15 @@ fi
|
||||
if test "$profiler" = "yes" ; then
|
||||
echo "CONFIG_PROFILER=y" >> $config_host_mak
|
||||
fi
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -491,6 +491,7 @@ FreeBSD)
|
||||
audio_possible_drivers="oss sdl esd pa"
|
||||
# needed for kinfo_getvmmap(3) in libutil.h
|
||||
LIBS="-lutil $LIBS"
|
||||
+ netmap="" # enable netmap autodetect
|
||||
;;
|
||||
DragonFly)
|
||||
bsd="yes"
|
Loading…
Add table
Reference in a new issue