summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/02_snapshot_use_tmpdir.patch23
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/03_machines_list_no_error.patch18
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/04_do_not_print_rtc_freq_if_ok.patch25
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/05_non-fatal_if_linux_hd_missing.patch17
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/06_exit_segfault.patch45
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/10_signal_jobs.patch26
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/11_signal_sigaction.patch21
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/12_signal_powerpc_support.patch401
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/22_net_tuntap_stall.patch18
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/30_syscall_ipc.patch34
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/31_syscalls.patch49
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/32_syscall_sysctl.patch56
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/33_syscall_ppc_clone.patch22
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/39_syscall_fadvise64.patch21
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/41_arm_fpa_sigfpe.patch105
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/52_ne2000_return.patch17
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/61_safe_64bit_int.patch27
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/63_sparc_build.patch18
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/64_ppc_asm_constraints.patch18
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/65_kfreebsd.patch44
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/66_tls_ld.patch55
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/91-oh-sdl-cursor.patch18
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/93-oh-pl110-rgb.patch223
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/fix_segfault.patch46
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/qemu-0.9.0-nptl-update.patch294
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/qemu-0.9.0-nptl.patch892
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/qemu-amd64-32b-mapping-0.9.0.patch31
-rw-r--r--meta/packages/qemu/qemu-0.9.0+cvs20070613/workaround_bad_futex_headers.patch25
-rw-r--r--meta/packages/qemu/qemu-native.inc3
-rw-r--r--meta/packages/qemu/qemu-native_20070613.bb2
-rw-r--r--meta/packages/qemu/qemu_0.9.1.bb12
-rw-r--r--meta/packages/qemu/qemu_20070613.bb56
32 files changed, 3 insertions, 2659 deletions
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/02_snapshot_use_tmpdir.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/02_snapshot_use_tmpdir.patch
deleted file mode 100644
index bd955b6db3..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/02_snapshot_use_tmpdir.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1#DPATCHLEVEL=0
2---
3# block.c | 6 +++++-
4# 1 file changed, 5 insertions(+), 1 deletion(-)
5#
6Index: block.c
7===================================================================
8--- block.c.orig 2007-06-13 11:51:52.000000000 +0100
9+++ block.c 2007-06-13 11:51:53.000000000 +0100
10@@ -188,8 +188,12 @@ void get_tmp_filename(char *filename, in
11 void get_tmp_filename(char *filename, int size)
12 {
13 int fd;
14+ char *tmpdir;
15 /* XXX: race condition possible */
16- pstrcpy(filename, size, "/tmp/vl.XXXXXX");
17+ tmpdir = getenv("TMPDIR");
18+ if (!tmpdir)
19+ tmpdir = "/tmp";
20+ snprintf(filename, size, "%s/vl.XXXXXX", tmpdir);
21 fd = mkstemp(filename);
22 close(fd);
23 }
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/03_machines_list_no_error.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/03_machines_list_no_error.patch
deleted file mode 100644
index 73f31550fe..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/03_machines_list_no_error.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1#DPATCHLEVEL=0
2---
3# vl.c | 2 +-
4# 1 file changed, 1 insertion(+), 1 deletion(-)
5#
6Index: vl.c
7===================================================================
8--- vl.c.orig 2007-06-13 11:51:52.000000000 +0100
9+++ vl.c 2007-06-13 11:52:24.000000000 +0100
10@@ -7242,7 +7242,7 @@ int main(int argc, char **argv)
11 m->name, m->desc,
12 m == first_machine ? " (default)" : "");
13 }
14- exit(1);
15+ exit(strcmp(optarg, "?"));
16 }
17 break;
18 case QEMU_OPTION_cpu:
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/04_do_not_print_rtc_freq_if_ok.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/04_do_not_print_rtc_freq_if_ok.patch
deleted file mode 100644
index 1575cbce63..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/04_do_not_print_rtc_freq_if_ok.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1#DPATCHLEVEL=1
2---
3# vl.c | 6 +++++-
4# 1 file changed, 5 insertions(+), 1 deletion(-)
5#
6Index: qemu/vl.c
7===================================================================
8--- qemu.orig/vl.c 2007-06-13 11:51:53.000000000 +0100
9+++ qemu/vl.c 2007-06-13 11:52:19.000000000 +0100
10@@ -1026,10 +1026,14 @@ static int rtc_fd;
11
12 static int start_rtc_timer(void)
13 {
14+ unsigned long current_rtc_freq = 0;
15+
16 rtc_fd = open("/dev/rtc", O_RDONLY);
17 if (rtc_fd < 0)
18 return -1;
19- if (ioctl(rtc_fd, RTC_IRQP_SET, RTC_FREQ) < 0) {
20+ ioctl(rtc_fd, RTC_IRQP_READ, &current_rtc_freq);
21+ if (current_rtc_freq != RTC_FREQ &&
22+ ioctl(rtc_fd, RTC_IRQP_SET, RTC_FREQ) < 0) {
23 fprintf(stderr, "Could not configure '/dev/rtc' to have a 1024 Hz timer. This is not a fatal\n"
24 "error, but for better emulation accuracy either use a 2.6 host Linux kernel or\n"
25 "type 'echo 1024 > /proc/sys/dev/rtc/max-user-freq' as root.\n");
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/05_non-fatal_if_linux_hd_missing.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/05_non-fatal_if_linux_hd_missing.patch
deleted file mode 100644
index b7c4732f24..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/05_non-fatal_if_linux_hd_missing.patch
+++ /dev/null
@@ -1,17 +0,0 @@
1#DPATCHLEVEL=1
2---
3# hw/pc.c | 1 -
4# 1 file changed, 1 deletion(-)
5#
6Index: qemu/hw/pc.c
7===================================================================
8--- qemu.orig/hw/pc.c 2007-06-13 11:51:52.000000000 +0100
9+++ qemu/hw/pc.c 2007-06-13 11:51:53.000000000 +0100
10@@ -355,7 +355,6 @@ static void generate_bootsect(uint32_t g
11 if (bs_table[0] == NULL) {
12 fprintf(stderr, "A disk image must be given for 'hda' when booting "
13 "a Linux kernel\n");
14- exit(1);
15 }
16
17 memset(bootsect, 0, sizeof(bootsect));
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/06_exit_segfault.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/06_exit_segfault.patch
deleted file mode 100644
index 447c3550b8..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/06_exit_segfault.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1#DPATCHLEVEL=0
2---
3# linux-user/main.c | 8 ++++----
4# 1 file changed, 4 insertions(+), 4 deletions(-)
5#
6Index: linux-user/main.c
7===================================================================
8--- linux-user/main.c.orig 2007-06-13 11:51:52.000000000 +0100
9+++ linux-user/main.c 2007-06-13 11:52:16.000000000 +0100
10@@ -642,7 +642,7 @@ void cpu_loop (CPUSPARCState *env)
11 default:
12 printf ("Unhandled trap: 0x%x\n", trapnr);
13 cpu_dump_state(env, stderr, fprintf, 0);
14- exit (1);
15+ _exit (1);
16 }
17 process_pending_signals (env);
18 }
19@@ -1471,7 +1471,7 @@ void cpu_loop (CPUState *env)
20 default:
21 printf ("Unhandled trap: 0x%x\n", trapnr);
22 cpu_dump_state(env, stderr, fprintf, 0);
23- exit (1);
24+ _exit (1);
25 }
26 process_pending_signals (env);
27 }
28@@ -1735,7 +1735,7 @@ int main(int argc, char **argv)
29 for(item = cpu_log_items; item->mask != 0; item++) {
30 printf("%-10s %s\n", item->name, item->help);
31 }
32- exit(1);
33+ _exit(1);
34 }
35 cpu_set_log(mask);
36 } else if (!strcmp(r, "s")) {
37@@ -1754,7 +1754,7 @@ int main(int argc, char **argv)
38 if (qemu_host_page_size == 0 ||
39 (qemu_host_page_size & (qemu_host_page_size - 1)) != 0) {
40 fprintf(stderr, "page size must be a power of two\n");
41- exit(1);
42+ _exit(1);
43 }
44 } else if (!strcmp(r, "g")) {
45 gdbstub_port = atoi(argv[optind++]);
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/10_signal_jobs.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/10_signal_jobs.patch
deleted file mode 100644
index 794a538676..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/10_signal_jobs.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1#DPATCHLEVEL=0
2---
3# linux-user/signal.c | 7 ++++++-
4# 1 file changed, 6 insertions(+), 1 deletion(-)
5#
6Index: linux-user/signal.c
7===================================================================
8--- linux-user/signal.c.orig 2007-06-13 11:51:52.000000000 +0100
9+++ linux-user/signal.c 2007-06-13 11:52:21.000000000 +0100
10@@ -341,10 +341,15 @@ int queue_signal(int sig, target_siginfo
11 k = &sigact_table[sig - 1];
12 handler = k->sa._sa_handler;
13 if (handler == TARGET_SIG_DFL) {
14+ if (sig == TARGET_SIGTSTP || sig == TARGET_SIGTTIN || sig == TARGET_SIGTTOU) {
15+ kill(getpid(),SIGSTOP);
16+ return 0;
17+ } else
18 /* default handler : ignore some signal. The other are fatal */
19 if (sig != TARGET_SIGCHLD &&
20 sig != TARGET_SIGURG &&
21- sig != TARGET_SIGWINCH) {
22+ sig != TARGET_SIGWINCH &&
23+ sig != TARGET_SIGCONT) {
24 force_sig(sig);
25 } else {
26 return 0; /* indicate ignored */
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/11_signal_sigaction.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/11_signal_sigaction.patch
deleted file mode 100644
index 5446efc562..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/11_signal_sigaction.patch
+++ /dev/null
@@ -1,21 +0,0 @@
1#DPATCHLEVEL=0
2---
3# linux-user/signal.c | 5 +++++
4# 1 file changed, 5 insertions(+)
5#
6Index: linux-user/signal.c
7===================================================================
8--- linux-user/signal.c.orig 2007-06-13 11:51:54.000000000 +0100
9+++ linux-user/signal.c 2007-06-13 11:52:20.000000000 +0100
10@@ -429,6 +429,11 @@ int do_sigaction(int sig, const struct t
11
12 if (sig < 1 || sig > TARGET_NSIG || sig == SIGKILL || sig == SIGSTOP)
13 return -EINVAL;
14+
15+ /* no point doing the stuff as those are not allowed for sigaction */
16+ if ((sig == TARGET_SIGKILL) || (sig == TARGET_SIGSTOP))
17+ return -EINVAL;
18+
19 k = &sigact_table[sig - 1];
20 #if defined(DEBUG_SIGNAL)
21 fprintf(stderr, "sigaction sig=%d act=0x%08x, oact=0x%08x\n",
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/12_signal_powerpc_support.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/12_signal_powerpc_support.patch
deleted file mode 100644
index d8d4198784..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/12_signal_powerpc_support.patch
+++ /dev/null
@@ -1,401 +0,0 @@
1#DPATCHLEVEL=1
2---
3# linux-user/signal.c | 371 ++++++++++++++++++++++++++++++++++++++++++++++++++++
4# 1 file changed, 371 insertions(+)
5#
6Index: qemu/linux-user/signal.c
7===================================================================
8--- qemu.orig/linux-user/signal.c 2007-06-13 11:51:54.000000000 +0100
9+++ qemu/linux-user/signal.c 2007-06-13 11:51:54.000000000 +0100
10@@ -2,6 +2,7 @@
11 * Emulation of Linux signals
12 *
13 * Copyright (c) 2003 Fabrice Bellard
14+ * Copyright (c) 2005 Josh Triplett <josh@psas.pdx.edu>
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18@@ -16,6 +17,12 @@
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22+ *
23+ * Various portions adapted from the Linux kernel:
24+ * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
25+ * Derived from "arch/i386/kernel/signal.c"
26+ * Copyright (C) 1991, 1992 Linus Torvalds
27+ * 1997-11-28 Modified for POSIX.1b signals by Richard Henderson
28 */
29 #include <stdlib.h>
30 #include <stdio.h>
31@@ -1964,6 +1971,370 @@ long do_rt_sigreturn(CPUState *env)
32 return -ENOSYS;
33 }
34
35+#elif defined(TARGET_PPC)
36+/* Adapted from the Linux kernel:
37+ * arch/ppc/kernel/signal.c
38+ * include/asm-ppc/elf.h
39+ * include/asm-ppc/ptrace.h
40+ * include/asm-ppc/sigcontext.h
41+ * include/asm-ppc/ucontext.h
42+ */
43+
44+/*
45+ * When we have signals to deliver, we set up on the
46+ * user stack, going down from the original stack pointer:
47+ * a sigregs struct
48+ * a sigcontext struct
49+ * a gap of __SIGNAL_FRAMESIZE bytes
50+ *
51+ * Each of these things must be a multiple of 16 bytes in size.
52+ *
53+ */
54+
55+#define TARGET_ELF_NGREG 48 /* includes nip, msr, lr, etc. */
56+#define TARGET_ELF_NFPREG 33 /* includes fpscr */
57+#define TARGET_ELF_NVRREG 33 /* includes vscr */
58+
59+/* General registers */
60+typedef unsigned long target_elf_greg_t;
61+typedef target_elf_greg_t target_elf_gregset_t[TARGET_ELF_NGREG];
62+
63+/* Floating point registers */
64+typedef double target_elf_fpreg_t;
65+typedef target_elf_fpreg_t target_elf_fpregset_t[TARGET_ELF_NFPREG];
66+
67+/* Altivec registers */
68+/* FIXME: Altivec not supported yet. */
69+/* typedef __vector128 elf_vrreg_t; */
70+typedef uint64_t target_elf_vrreg_t[2];
71+typedef target_elf_vrreg_t target_elf_vrregset_t[TARGET_ELF_NVRREG];
72+
73+struct target_mcontext {
74+ target_elf_gregset_t mc_gregs;
75+ target_elf_fpregset_t mc_fregs;
76+ /* The kernel calls this mc_pad, but does #define tramp mc_pad */
77+ target_ulong tramp[2];
78+ target_elf_vrregset_t mc_vregs __attribute__((__aligned__(16)));
79+};
80+
81+struct target_sigregs {
82+ struct target_mcontext mctx; /* all the register values */
83+ /* Programs using the rs6000/xcoff abi can save up to 19 gp regs
84+ and 18 fp regs below sp before decrementing it. */
85+ int abigap[56];
86+};
87+
88+struct target_sigcontext {
89+ target_ulong _unused[4];
90+ uint32_t signal;
91+ target_ulong handler;
92+ target_ulong oldmask;
93+ struct target_pt_regs *regs;
94+};
95+
96+#define __SIGNAL_FRAMESIZE 64
97+
98+static int
99+save_user_regs(CPUState *env, struct target_mcontext *frame, int sigret)
100+{
101+ /* save general and floating-point registers */
102+#if 0 /* FIXME: handle floating-point, Altivec, SPE */
103+ CHECK_FULL_REGS(regs);
104+ preempt_disable();
105+ if (regs->msr & MSR_FP)
106+ giveup_fpu(current);
107+#ifdef CONFIG_ALTIVEC
108+ if (current->thread.used_vr && (regs->msr & MSR_VEC))
109+ giveup_altivec(current);
110+#endif /* CONFIG_ALTIVEC */
111+#ifdef CONFIG_SPE
112+ if (current->thread.used_spe && (regs->msr & MSR_SPE))
113+ giveup_spe(current);
114+#endif /* CONFIG_ALTIVEC */
115+ preempt_enable();
116+#endif /* 0 */
117+
118+ /* Note: this needs to be in the same order as target_pt_regs */
119+ if(!memcpy(&frame->mc_gregs, env->gpr,
120+ 32*sizeof(target_elf_greg_t))
121+ || __put_user(env->nip, &frame->mc_gregs[32])
122+ || __put_user(do_load_msr(env), &frame->mc_gregs[33])
123+ /* FIXME: || __put_user(orig_gpr3, &frame->mc_gregs[34]) */
124+ || __put_user(env->ctr, &frame->mc_gregs[35])
125+ || __put_user(env->lr, &frame->mc_gregs[36])
126+ || __put_user(do_load_xer(env), &frame->mc_gregs[37])
127+ || __put_user(do_load_cr(env), &frame->mc_gregs[38])
128+ || __put_user(env->spr[SPR_MQ], &frame->mc_gregs[39])
129+ /* FIXME: || __put_user(trap, &frame->mc_gregs[40]) */
130+ || __put_user(env->spr[SPR_DAR], &frame->mc_gregs[41])
131+ || __put_user(env->spr[SPR_DSISR], &frame->mc_gregs[42])
132+ /* FIXME: || __put_user(result, &frame->mc_gregs[43]) */)
133+ return 1;
134+
135+ if(!memcpy(&frame->mc_fregs, env->fpr,
136+ 32*sizeof(target_elf_fpreg_t))
137+ || __put_user(do_load_fpscr(env), &frame->mc_fregs[32]))
138+
139+ do_store_fpscr(env, 0, 0xFF); /* turn off all fp exceptions */
140+
141+#if 0 /* FIXME: handle Altivec, SPE */
142+#ifdef CONFIG_ALTIVEC
143+ /* save altivec registers */
144+ if (current->thread.used_vr) {
145+ if (!memcpy(&frame->mc_vregs, current->thread.vr,
146+ ELF_NVRREG * sizeof(vector128)))
147+ return 1;
148+ /* set MSR_VEC in the saved MSR value to indicate that
149+ frame->mc_vregs contains valid data */
150+ if (__put_user(regs->msr | MSR_VEC, &frame->mc_gregs[PT_MSR]))
151+ return 1;
152+ }
153+ /* else assert((regs->msr & MSR_VEC) == 0) */
154+
155+ /* We always copy to/from vrsave, it's 0 if we don't have or don't
156+ * use altivec. Since VSCR only contains 32 bits saved in the least
157+ * significant bits of a vector, we "cheat" and stuff VRSAVE in the
158+ * most significant bits of that same vector. --BenH
159+ */
160+ if (__put_user(current->thread.vrsave, (u32 __user *)&frame->mc_vregs[32]))
161+ return 1;
162+#endif /* CONFIG_ALTIVEC */
163+
164+#ifdef CONFIG_SPE
165+ /* save spe registers */
166+ if (current->thread.used_spe) {
167+ if (!memcpy(&frame->mc_vregs, current->thread.evr,
168+ ELF_NEVRREG * sizeof(u32)))
169+ return 1;
170+ /* set MSR_SPE in the saved MSR value to indicate that
171+ frame->mc_vregs contains valid data */
172+ if (__put_user(regs->msr | MSR_SPE, &frame->mc_gregs[PT_MSR]))
173+ return 1;
174+ }
175+ /* else assert((regs->msr & MSR_SPE) == 0) */
176+
177+ /* We always copy to/from spefscr */
178+ if (__put_user(current->thread.spefscr, (u32 *)&frame->mc_vregs + ELF_NEVRREG))
179+ return 1;
180+#endif /* CONFIG_SPE */
181+#endif /* 0 */
182+
183+ if (sigret) {
184+ /* Set up the sigreturn trampoline: li r0,sigret; sc */
185+ if (__put_user(0x38000000UL + sigret, &frame->tramp[0])
186+ || __put_user(0x44000002UL, &frame->tramp[1]))
187+ return 1;
188+#if 0
189+ flush_icache_range((unsigned long) &frame->tramp[0],
190+ (unsigned long) &frame->tramp[2]);
191+#endif
192+ }
193+
194+ return 0;
195+}
196+
197+static int
198+restore_user_regs(CPUState *env, struct target_mcontext *sr, int sig)
199+{
200+ target_ulong save_r2 = 0;
201+ target_ulong saved_xer;
202+ target_ulong saved_cr;
203+ double saved_fpscr;
204+
205+#if 0 /* FIXME: handle Altivec, SPE */
206+#if defined(CONFIG_ALTIVEC) || defined(CONFIG_SPE)
207+ unsigned long msr;
208+#endif
209+#endif /* 0 */
210+
211+ /* backup/restore the TLS as we don't want it to be modified */
212+ if (!sig)
213+ save_r2 = env->gpr[2];
214+
215+ /* Copy all registers except MSR */
216+ /* Note: this needs to be in the same order as target_pt_regs */
217+ if(!memcpy(env->gpr, &sr->mc_gregs,
218+ 32*sizeof(target_elf_greg_t))
219+ || __get_user(env->nip, &sr->mc_gregs[32])
220+ /* FIXME: || __get_user(orig_gpr3, &sr->mc_gregs[34]) */
221+ || __get_user(env->ctr, &sr->mc_gregs[35])
222+ || __get_user(env->lr, &sr->mc_gregs[36])
223+ || __get_user(saved_xer, &sr->mc_gregs[37])
224+ || __get_user(saved_cr, &sr->mc_gregs[38])
225+ || __get_user(env->spr[SPR_MQ], &sr->mc_gregs[39])
226+ /* FIXME: || __get_user(trap, &sr->mc_gregs[40]) */
227+ || __get_user(env->spr[SPR_DAR], &sr->mc_gregs[41])
228+ || __get_user(env->spr[SPR_DSISR], &sr->mc_gregs[42])
229+ /* FIXME: || __get_user(result, &sr->mc_gregs[43]) */)
230+ return 1;
231+ do_store_xer(env, saved_xer);
232+ do_store_cr(env, saved_cr, 0xFF);
233+
234+ if (!sig)
235+ env->gpr[2] = save_r2;
236+
237+ /* The kernel delays restoring the floating-point registers until the
238+ * thread uses floating-point again. For simplicity, just restore the
239+ * registers now. */
240+ if(!memcpy(env->fpr, &sr->mc_fregs,
241+ 32*sizeof(target_elf_fpreg_t))
242+ || __get_user(saved_fpscr, &sr->mc_fregs[32]))
243+ return 1;
244+ do_store_fpscr(env, saved_fpscr, 0xFF);
245+
246+#if 0 /* FIXME: handle Altivec, SPE */
247+#ifdef CONFIG_ALTIVEC
248+ /* force the process to reload the altivec registers from
249+ current->thread when it next does altivec instructions */
250+ regs->msr &= ~MSR_VEC;
251+ if (!__get_user(msr, &sr->mc_gregs[PT_MSR]) && (msr & MSR_VEC) != 0) {
252+ /* restore altivec registers from the stack */
253+ if (!memcpy(current->thread.vr, &sr->mc_vregs,
254+ sizeof(sr->mc_vregs)))
255+ return 1;
256+ } else if (current->thread.used_vr)
257+ memset(&current->thread.vr, 0, ELF_NVRREG * sizeof(vector128));
258+
259+ /* Always get VRSAVE back */
260+ if (__get_user(current->thread.vrsave, (u32 __user *)&sr->mc_vregs[32]))
261+ return 1;
262+#endif /* CONFIG_ALTIVEC */
263+
264+#ifdef CONFIG_SPE
265+ /* force the process to reload the spe registers from
266+ current->thread when it next does spe instructions */
267+ regs->msr &= ~MSR_SPE;
268+ if (!__get_user(msr, &sr->mc_gregs[PT_MSR]) && (msr & MSR_SPE) != 0) {
269+ /* restore spe registers from the stack */
270+ if (!memcpy(current->thread.evr, &sr->mc_vregs,
271+ ELF_NEVRREG * sizeof(u32)))
272+ return 1;
273+ } else if (current->thread.used_spe)
274+ memset(&current->thread.evr, 0, ELF_NEVRREG * sizeof(u32));
275+
276+ /* Always get SPEFSCR back */
277+ if (__get_user(current->thread.spefscr, (u32 *)&sr->mc_vregs + ELF_NEVRREG))
278+ return 1;
279+#endif /* CONFIG_SPE */
280+#endif /* 0 */
281+
282+#if 0 /* FIXME: handle floating-point, Altivec, SPE */
283+#ifndef CONFIG_SMP
284+ preempt_disable();
285+ if (last_task_used_math == current)
286+ last_task_used_math = NULL;
287+ if (last_task_used_altivec == current)
288+ last_task_used_altivec = NULL;
289+ if (last_task_used_spe == current)
290+ last_task_used_spe = NULL;
291+ preempt_enable();
292+#endif
293+#endif /* 0 */
294+ return 0;
295+}
296+
297+static void setup_frame(int sig, struct emulated_sigaction *ka,
298+ target_sigset_t *oldset, CPUState *env)
299+{
300+ struct target_sigcontext *sc;
301+ struct target_sigregs *frame;
302+ target_ulong origsp = env->gpr[1];
303+ target_ulong newsp = origsp;
304+
305+ /* Set up Signal Frame */
306+ newsp -= sizeof(struct target_sigregs);
307+ frame = (struct target_sigregs *) newsp;
308+
309+ /* Put a sigcontext on the stack */
310+ newsp -= sizeof(*sc);
311+ sc = (struct target_sigcontext *) newsp;
312+
313+ /* create a stack frame for the caller of the handler */
314+ newsp -= __SIGNAL_FRAMESIZE;
315+
316+ if (!access_ok(VERIFY_WRITE, (void *) newsp, origsp - newsp))
317+ goto badframe;
318+
319+#if TARGET_NSIG != 64
320+#error "Please adjust handle_signal()"
321+#endif
322+ if (__put_user((target_ulong) ka->sa._sa_handler, &sc->handler)
323+ || __put_user(oldset->sig[0], &sc->oldmask)
324+ || __put_user(oldset->sig[1], &sc->_unused[3])
325+ || __put_user(frame, (target_ulong *)&sc->regs)
326+ || __put_user(sig, &sc->signal))
327+ goto badframe;
328+
329+ if (save_user_regs(env, &frame->mctx, TARGET_NR_sigreturn))
330+ goto badframe;
331+
332+ if (put_user(env->gpr[1], (unsigned long *)newsp))
333+ goto badframe;
334+ env->gpr[1] = newsp;
335+ env->gpr[3] = sig;
336+ env->gpr[4] = (unsigned long) sc;
337+ env->nip = (unsigned long) ka->sa._sa_handler;
338+ env->lr = (unsigned long) frame->mctx.tramp;
339+ /* FIXME: env->trap = 0; */
340+
341+ return;
342+
343+badframe:
344+#ifdef DEBUG_SIGNAL
345+ fprintf(stderr,
346+ "badframe in handle_signal, frame=%p newsp=%lx\n",
347+ frame, newsp);
348+#endif
349+ force_sig(TARGET_SIGSEGV);
350+}
351+
352+static void setup_rt_frame(int sig, struct emulated_sigaction *ka,
353+ target_siginfo_t *info,
354+ target_sigset_t *set, CPUState *env)
355+{
356+ fprintf(stderr, "setup_rt_frame: not implemented\n");
357+}
358+
359+long do_sigreturn(CPUState *env)
360+{
361+ struct target_sigcontext *sc;
362+ struct target_sigcontext sigctx;
363+ struct target_mcontext *sr;
364+ target_sigset_t set;
365+ sigset_t host_set;
366+
367+ /* Always make any pending restarted system calls return -EINTR */
368+#if 0 /* FIXME */
369+ current_thread_info()->restart_block.fn = do_no_restart_syscall;
370+#endif
371+
372+ sc = (struct target_sigcontext *)(env->gpr[1] + __SIGNAL_FRAMESIZE);
373+ if (!memcpy(&sigctx, sc, sizeof(sigctx)))
374+ goto badframe;
375+
376+ set.sig[0] = sigctx.oldmask;
377+ set.sig[1] = sigctx._unused[3];
378+ target_to_host_sigset_internal(&host_set, &set);
379+ sigprocmask(SIG_SETMASK, &host_set, NULL);
380+
381+ sr = (struct target_mcontext *) tswapl((target_ulong)sigctx.regs);
382+ if (!access_ok(VERIFY_READ, sr, sizeof(*sr))
383+ || restore_user_regs(env, sr, 1))
384+ goto badframe;
385+
386+ return 0;
387+
388+badframe:
389+ force_sig(TARGET_SIGSEGV);
390+ return 0;
391+}
392+
393+long do_rt_sigreturn(CPUState *env)
394+{
395+ fprintf(stderr, "do_rt_sigreturn: not implemented\n");
396+ return -ENOSYS;
397+}
398+
399 #else
400
401 static void setup_frame(int sig, struct emulated_sigaction *ka,
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/22_net_tuntap_stall.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/22_net_tuntap_stall.patch
deleted file mode 100644
index e9b31dfe40..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/22_net_tuntap_stall.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1#DPATCHLEVEL=0
2---
3# vl.c | 2 +-
4# 1 file changed, 1 insertion(+), 1 deletion(-)
5#
6Index: vl.c
7===================================================================
8--- vl.c.orig 2007-06-13 11:51:53.000000000 +0100
9+++ vl.c 2007-06-13 11:52:10.000000000 +0100
10@@ -3617,7 +3617,7 @@ static int tap_open(char *ifname, int if
11 return -1;
12 }
13 memset(&ifr, 0, sizeof(ifr));
14- ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
15+ ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_ONE_QUEUE;
16 if (ifname[0] != '\0')
17 pstrcpy(ifr.ifr_name, IFNAMSIZ, ifname);
18 else
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/30_syscall_ipc.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/30_syscall_ipc.patch
deleted file mode 100644
index 3dc58102ad..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/30_syscall_ipc.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1#DPATCHLEVEL=0
2---
3# linux-user/syscall.c | 7 +++++--
4# 1 file changed, 5 insertions(+), 2 deletions(-)
5#
6Index: linux-user/syscall.c
7===================================================================
8--- linux-user/syscall.c.orig 2007-04-18 13:25:40.000000000 +0100
9+++ linux-user/syscall.c 2007-04-18 13:37:27.000000000 +0100
10@@ -43,7 +43,10 @@
11 #include <sys/poll.h>
12 #include <sys/times.h>
13 #include <sys/shm.h>
14+#include <sys/ipc.h>
15 #include <sys/sem.h>
16+#include <sys/shm.h>
17+#include <sys/msg.h>
18 #include <sys/statfs.h>
19 #include <utime.h>
20 #include <sys/sysinfo.h>
21@@ -1240,11 +1243,11 @@ static long do_ipc(long call, long first
22 ret = get_errno(shmctl(first, second, NULL));
23 break;
24 default:
25- goto unimplemented;
26+ ret = get_errno(shmctl(first, second, (struct shmid_ds *) ptr));
27+ break;
28 }
29 break;
30 default:
31- unimplemented:
32 gemu_log("Unsupported ipc call: %ld (version %d)\n", call, version);
33 ret = -ENOSYS;
34 break;
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/31_syscalls.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/31_syscalls.patch
deleted file mode 100644
index 3878079f19..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/31_syscalls.patch
+++ /dev/null
@@ -1,49 +0,0 @@
1#DPATCHLEVEL=0
2---
3# Makefile.target | 2 +-
4# linux-user/syscall.c | 11 ++++++++---
5# 2 files changed, 9 insertions(+), 4 deletions(-)
6#
7Index: linux-user/syscall.c
8===================================================================
9--- linux-user/syscall.c.orig 2007-06-13 11:51:52.000000000 +0100
10+++ linux-user/syscall.c 2007-06-13 11:52:18.000000000 +0100
11@@ -180,6 +180,7 @@ extern int getresuid(uid_t *, uid_t *, u
12 extern int setresgid(gid_t, gid_t, gid_t);
13 extern int getresgid(gid_t *, gid_t *, gid_t *);
14 extern int setgroups(int, gid_t *);
15+extern int uselib(const char*);
16
17 /*
18 * This list is the union of errno values overidden in asm-<arch>/errno.h
19@@ -3215,7 +3216,8 @@ long do_syscall(void *cpu_env, int num,
20 break;
21 #ifdef TARGET_NR_uselib
22 case TARGET_NR_uselib:
23- goto unimplemented;
24+ ret = get_errno(uselib(path((const char*)arg1)));
25+ break;
26 #endif
27 #ifdef TARGET_NR_swapon
28 case TARGET_NR_swapon:
29@@ -4405,7 +4407,9 @@ long do_syscall(void *cpu_env, int num,
30 goto unimplemented;
31 #ifdef TARGET_NR_mincore
32 case TARGET_NR_mincore:
33- goto unimplemented;
34+ page_unprotect_range((void*)arg3, ((size_t)arg2 + TARGET_PAGE_SIZE - 1) / TARGET_PAGE_SIZE);
35+ ret = get_errno(mincore((void*)arg1, (size_t)arg2, (unsigned char*)arg3));
36+ break;
37 #endif
38 #ifdef TARGET_NR_madvise
39 case TARGET_NR_madvise:
40@@ -4539,7 +4543,8 @@ long do_syscall(void *cpu_env, int num,
41 break;
42 #ifdef TARGET_NR_readahead
43 case TARGET_NR_readahead:
44- goto unimplemented;
45+ ret = get_errno(readahead((int)arg1, (off64_t)arg2, (size_t)arg3));
46+ break;
47 #endif
48 #ifdef TARGET_NR_setxattr
49 case TARGET_NR_setxattr:
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/32_syscall_sysctl.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/32_syscall_sysctl.patch
deleted file mode 100644
index d175cf96ba..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/32_syscall_sysctl.patch
+++ /dev/null
@@ -1,56 +0,0 @@
1#DPATCHLEVEL=0
2---
3# linux-user/syscall.c | 33 ++++++++++++++++++++++++++++++---
4# 1 file changed, 30 insertions(+), 3 deletions(-)
5#
6Index: linux-user/syscall.c
7===================================================================
8--- linux-user/syscall.c.orig 2007-06-13 11:51:54.000000000 +0100
9+++ linux-user/syscall.c 2007-06-13 11:52:17.000000000 +0100
10@@ -52,6 +52,7 @@
11 //#include <sys/user.h>
12 #include <netinet/ip.h>
13 #include <netinet/tcp.h>
14+#include <sys/sysctl.h>
15
16 #define termios host_termios
17 #define winsize host_winsize
18@@ -3912,9 +3913,35 @@ long do_syscall(void *cpu_env, int num,
19 break;
20 #endif
21 case TARGET_NR__sysctl:
22- /* We don't implement this, but ENODIR is always a safe
23- return value. */
24- return -ENOTDIR;
25+ {
26+ struct __sysctl_args *args = (struct __sysctl_args *) arg1;
27+ int *name_target, *name, nlen, *oldlenp, oldlen, newlen, i;
28+ void *oldval, *newval;
29+
30+ name_target = (int *) tswapl((long) args->name);
31+ nlen = tswapl(args->nlen);
32+ oldval = (void *) tswapl((long) args->oldval);
33+ oldlenp = (int *) tswapl((long) args->oldlenp);
34+ oldlen = tswapl(*oldlenp);
35+ newval = (void *) tswapl((long) args->newval);
36+ newlen = tswapl(args->newlen);
37+
38+ name = alloca(nlen * sizeof (int));
39+ for (i = 0; i < nlen; i++)
40+ name[i] = tswapl(name_target[i]);
41+
42+ if (nlen == 2 && name[0] == CTL_KERN && name[1] == KERN_VERSION) {
43+ ret = get_errno(
44+ sysctl(name, nlen, oldval, &oldlen, newval, newlen));
45+ if (!is_error(ret)) {
46+ *oldlenp = tswapl(oldlen);
47+ }
48+ } else {
49+ gemu_log("qemu: Unsupported sysctl name\n");
50+ ret = -ENOSYS;
51+ }
52+ }
53+ break;
54 case TARGET_NR_sched_setparam:
55 {
56 struct sched_param *target_schp;
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/33_syscall_ppc_clone.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/33_syscall_ppc_clone.patch
deleted file mode 100644
index a71f8b1944..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/33_syscall_ppc_clone.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1#DPATCHLEVEL=0
2---
3# linux-user/syscall.c | 6 +-----
4# 1 file changed, 1 insertion(+), 5 deletions(-)
5#
6Index: linux-user/syscall.c
7===================================================================
8--- linux-user/syscall.c.orig 2007-06-13 11:51:54.000000000 +0100
9+++ linux-user/syscall.c 2007-06-13 11:52:17.000000000 +0100
10@@ -2177,11 +2177,7 @@ int do_fork(CPUState *env, unsigned int
11 if (!newsp)
12 newsp = env->gpr[1];
13 new_env->gpr[1] = newsp;
14- {
15- int i;
16- for (i = 7; i < 32; i++)
17- new_env->gpr[i] = 0;
18- }
19+ new_env->gpr[3] = 0;
20 #elif defined(TARGET_SH4)
21 if (!newsp)
22 newsp = env->gregs[15];
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/39_syscall_fadvise64.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/39_syscall_fadvise64.patch
deleted file mode 100644
index 0a7f4c48dd..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/39_syscall_fadvise64.patch
+++ /dev/null
@@ -1,21 +0,0 @@
1---
2 linux-user/syscall.c | 6 ++++++
3 1 file changed, 6 insertions(+)
4
5Index: linux-user/syscall.c
6===================================================================
7--- linux-user/syscall.c.orig 2007-06-13 11:51:55.000000000 +0100
8+++ linux-user/syscall.c 2007-06-13 11:52:13.000000000 +0100
9@@ -4434,6 +4434,12 @@ long do_syscall(void *cpu_env, int num,
10 ret = get_errno(mincore((void*)arg1, (size_t)arg2, (unsigned char*)arg3));
11 break;
12 #endif
13+#ifdef TARGET_NR_fadvise64_64
14+ case TARGET_NR_fadvise64_64:
15+ /* Just return success */
16+ ret = get_errno(0);
17+ break;
18+#endif
19 #ifdef TARGET_NR_madvise
20 case TARGET_NR_madvise:
21 /* A straight passthrough may not be safe because qemu sometimes
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/41_arm_fpa_sigfpe.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/41_arm_fpa_sigfpe.patch
deleted file mode 100644
index d579dbc66e..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/41_arm_fpa_sigfpe.patch
+++ /dev/null
@@ -1,105 +0,0 @@
1#DPATCHLEVEL=0
2---
3# linux-user/main.c | 53 +++++++++++++++++++++++++++++++++++++++++++++--
4# target-arm/nwfpe/fpa11.c | 7 ++++++
5# 2 files changed, 58 insertions(+), 2 deletions(-)
6#
7Index: linux-user/main.c
8===================================================================
9--- linux-user/main.c.orig 2007-06-13 11:51:53.000000000 +0100
10+++ linux-user/main.c 2007-06-13 11:52:07.000000000 +0100
11@@ -339,18 +339,67 @@ void cpu_loop(CPUARMState *env)
12 {
13 TaskState *ts = env->opaque;
14 uint32_t opcode;
15+ int rc;
16
17 /* we handle the FPU emulation here, as Linux */
18 /* we get the opcode */
19 opcode = tget32(env->regs[15]);
20
21- if (EmulateAll(opcode, &ts->fpa, env) == 0) {
22+ rc = EmulateAll(opcode, &ts->fpa, env);
23+ if (rc == 0) { /* illegal instruction */
24 info.si_signo = SIGILL;
25 info.si_errno = 0;
26 info.si_code = TARGET_ILL_ILLOPN;
27 info._sifields._sigfault._addr = env->regs[15];
28 queue_signal(info.si_signo, &info);
29- } else {
30+ } else if (rc < 0) { /* FP exception */
31+ int arm_fpe=0;
32+
33+ /* translate softfloat flags to FPSR flags */
34+ if (-rc & float_flag_invalid)
35+ arm_fpe |= BIT_IOC;
36+ if (-rc & float_flag_divbyzero)
37+ arm_fpe |= BIT_DZC;
38+ if (-rc & float_flag_overflow)
39+ arm_fpe |= BIT_OFC;
40+ if (-rc & float_flag_underflow)
41+ arm_fpe |= BIT_UFC;
42+ if (-rc & float_flag_inexact)
43+ arm_fpe |= BIT_IXC;
44+
45+ FPSR fpsr = ts->fpa.fpsr;
46+ //printf("fpsr 0x%x, arm_fpe 0x%x\n",fpsr,arm_fpe);
47+
48+ if (fpsr & (arm_fpe << 16)) { /* exception enabled? */
49+ info.si_signo = SIGFPE;
50+ info.si_errno = 0;
51+
52+ /* ordered by priority, least first */
53+ if (arm_fpe & BIT_IXC) info.si_code = TARGET_FPE_FLTRES;
54+ if (arm_fpe & BIT_UFC) info.si_code = TARGET_FPE_FLTUND;
55+ if (arm_fpe & BIT_OFC) info.si_code = TARGET_FPE_FLTOVF;
56+ if (arm_fpe & BIT_DZC) info.si_code = TARGET_FPE_FLTDIV;
57+ if (arm_fpe & BIT_IOC) info.si_code = TARGET_FPE_FLTINV;
58+
59+ info._sifields._sigfault._addr = env->regs[15];
60+ queue_signal(info.si_signo, &info);
61+ } else {
62+ env->regs[15] += 4;
63+ }
64+
65+ /* accumulate unenabled exceptions */
66+ if ((!(fpsr & BIT_IXE)) && (arm_fpe & BIT_IXC))
67+ fpsr |= BIT_IXC;
68+ if ((!(fpsr & BIT_UFE)) && (arm_fpe & BIT_UFC))
69+ fpsr |= BIT_UFC;
70+ if ((!(fpsr & BIT_OFE)) && (arm_fpe & BIT_OFC))
71+ fpsr |= BIT_OFC;
72+ if ((!(fpsr & BIT_DZE)) && (arm_fpe & BIT_DZC))
73+ fpsr |= BIT_DZC;
74+ if ((!(fpsr & BIT_IOE)) && (arm_fpe & BIT_IOC))
75+ fpsr |= BIT_IOC;
76+ ts->fpa.fpsr=fpsr;
77+ } else { /* everything OK */
78 /* increment PC */
79 env->regs[15] += 4;
80 }
81Index: target-arm/nwfpe/fpa11.c
82===================================================================
83--- target-arm/nwfpe/fpa11.c.orig 2007-06-13 11:51:52.000000000 +0100
84+++ target-arm/nwfpe/fpa11.c 2007-06-13 11:51:55.000000000 +0100
85@@ -162,6 +162,8 @@ unsigned int EmulateAll(unsigned int opc
86 fpa11->initflag = 1;
87 }
88
89+ set_float_exception_flags(0, &fpa11->fp_status);
90+
91 if (TEST_OPCODE(opcode,MASK_CPRT))
92 {
93 //fprintf(stderr,"emulating CPRT\n");
94@@ -191,6 +193,11 @@ unsigned int EmulateAll(unsigned int opc
95 }
96
97 // restore_flags(flags);
98+ if(nRc == 1 && get_float_exception_flags(&fpa11->fp_status))
99+ {
100+ //printf("fef 0x%x\n",float_exception_flags);
101+ nRc=-get_float_exception_flags(&fpa11->fp_status);
102+ }
103
104 //printf("returning %d\n",nRc);
105 return(nRc);
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/52_ne2000_return.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/52_ne2000_return.patch
deleted file mode 100644
index f0316c8042..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/52_ne2000_return.patch
+++ /dev/null
@@ -1,17 +0,0 @@
1---
2 hw/ne2000.c | 2 +-
3 1 file changed, 1 insertion(+), 1 deletion(-)
4
5Index: qemu/hw/ne2000.c
6===================================================================
7--- qemu.orig/hw/ne2000.c 2007-06-13 11:51:52.000000000 +0100
8+++ qemu/hw/ne2000.c 2007-06-13 11:51:55.000000000 +0100
9@@ -214,7 +214,7 @@ static int ne2000_can_receive(void *opaq
10 NE2000State *s = opaque;
11
12 if (s->cmd & E8390_STOP)
13- return 1;
14+ return 0;
15 return !ne2000_buffer_full(s);
16 }
17
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/61_safe_64bit_int.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/61_safe_64bit_int.patch
deleted file mode 100644
index 553e57623e..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/61_safe_64bit_int.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1#DPATCHLEVEL=0
2---
3# dyngen-exec.h | 4 ++--
4# 1 file changed, 2 insertions(+), 2 deletions(-)
5#
6Index: dyngen-exec.h
7===================================================================
8--- dyngen-exec.h.orig 2007-06-13 11:48:22.000000000 +0100
9+++ dyngen-exec.h 2007-06-13 11:51:55.000000000 +0100
10@@ -38,7 +38,7 @@ typedef unsigned int uint32_t;
11 // Linux/Sparc64 defines uint64_t
12 #if !(defined (__sparc_v9__) && defined(__linux__))
13 /* XXX may be done for all 64 bits targets ? */
14-#if defined (__x86_64__) || defined(__ia64)
15+#if defined (__x86_64__) || defined(__ia64) || defined(__alpha__) || defined(__sparc__)
16 typedef unsigned long uint64_t;
17 #else
18 typedef unsigned long long uint64_t;
19@@ -55,7 +55,7 @@ typedef signed short int16_t;
20 typedef signed int int32_t;
21 // Linux/Sparc64 defines int64_t
22 #if !(defined (__sparc_v9__) && defined(__linux__))
23-#if defined (__x86_64__) || defined(__ia64)
24+#if defined (__x86_64__) || defined(__ia64) || defined(__alpha__) || defined(__sparc__)
25 typedef signed long int64_t;
26 #else
27 typedef signed long long int64_t;
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/63_sparc_build.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/63_sparc_build.patch
deleted file mode 100644
index 32a6bc0ee0..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/63_sparc_build.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1#DPATCHLEVEL=0
2---
3# sparc.ld | 2 +-
4# 1 file changed, 1 insertion(+), 1 deletion(-)
5#
6Index: sparc.ld
7===================================================================
8--- sparc.ld.orig 2007-06-13 11:48:22.000000000 +0100
9+++ sparc.ld 2007-06-13 11:51:56.000000000 +0100
10@@ -6,7 +6,7 @@ ENTRY(_start)
11 SECTIONS
12 {
13 /* Read-only sections, merged into text segment: */
14- . = 0x60000000 + SIZEOF_HEADERS;
15+ . = 0x60000000 + 0x400;
16 .interp : { *(.interp) }
17 .hash : { *(.hash) }
18 .dynsym : { *(.dynsym) }
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/64_ppc_asm_constraints.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/64_ppc_asm_constraints.patch
deleted file mode 100644
index e4858b79d7..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/64_ppc_asm_constraints.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1#DPATCHLEVEL=1
2---
3# cpu-all.h | 2 +-
4# 1 file changed, 1 insertion(+), 1 deletion(-)
5#
6Index: qemu/cpu-all.h
7===================================================================
8--- qemu.orig/cpu-all.h 2007-06-13 11:48:22.000000000 +0100
9+++ qemu/cpu-all.h 2007-06-13 11:51:56.000000000 +0100
10@@ -250,7 +250,7 @@ static inline void stw_le_p(void *ptr, i
11 static inline void stl_le_p(void *ptr, int v)
12 {
13 #ifdef __powerpc__
14- __asm__ __volatile__ ("stwbrx %1,0,%2" : "=m" (*(uint32_t *)ptr) : "r" (v), "r" (ptr));
15+ __asm__ __volatile__ ("stwbrx %0,0,%1" : : "r" (v), "r" (ptr) : "memory");
16 #else
17 uint8_t *p = ptr;
18 p[0] = v;
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/65_kfreebsd.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/65_kfreebsd.patch
deleted file mode 100644
index ea060811a1..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/65_kfreebsd.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1---
2 configure | 6 ++++++
3 vl.c | 4 +++-
4 2 files changed, 9 insertions(+), 1 deletion(-)
5
6Index: configure
7===================================================================
8--- configure.orig 2007-06-13 11:48:22.000000000 +0100
9+++ configure 2007-06-13 11:52:07.000000000 +0100
10@@ -112,6 +112,12 @@ OS_CFLAGS="-mno-cygwin"
11 MINGW32*)
12 mingw32="yes"
13 ;;
14+GNU/kFreeBSD)
15+oss="yes"
16+if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
17+ kqemu="yes"
18+fi
19+;;
20 FreeBSD)
21 bsd="yes"
22 oss="yes"
23Index: vl.c
24===================================================================
25--- vl.c.orig 2007-06-13 11:51:54.000000000 +0100
26+++ vl.c 2007-06-13 11:51:56.000000000 +0100
27@@ -47,6 +47,8 @@
28 #ifndef __APPLE__
29 #include <libutil.h>
30 #endif
31+#elif defined (__GLIBC__) && defined (__FreeBSD_kernel__)
32+#include <freebsd/stdlib.h>
33 #else
34 #ifndef __sun__
35 #include <linux/if.h>
36@@ -3454,7 +3456,7 @@ static TAPState *net_tap_fd_init(VLANSta
37 return s;
38 }
39
40-#ifdef _BSD
41+#if defined (_BSD) || defined (__FreeBSD_kernel__)
42 static int tap_open(char *ifname, int ifname_size)
43 {
44 int fd;
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/66_tls_ld.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/66_tls_ld.patch
deleted file mode 100644
index 54e02eff8b..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/66_tls_ld.patch
+++ /dev/null
@@ -1,55 +0,0 @@
1---
2 arm.ld | 7 +++++++
3 i386.ld | 7 +++++++
4 2 files changed, 14 insertions(+)
5
6Index: arm.ld
7===================================================================
8--- arm.ld.orig 2007-06-13 11:48:22.000000000 +0100
9+++ arm.ld 2007-06-13 11:51:56.000000000 +0100
10@@ -26,6 +26,10 @@ SECTIONS
11 { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
12 .rela.rodata :
13 { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
14+ .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
15+ .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
16+ .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
17+ .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
18 .rel.got : { *(.rel.got) }
19 .rela.got : { *(.rela.got) }
20 .rel.ctors : { *(.rel.ctors) }
21@@ -58,6 +62,9 @@ SECTIONS
22 .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }
23 __exidx_end = .;
24 .reginfo : { *(.reginfo) }
25+ /* Thread Local Storage sections */
26+ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
27+ .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
28 /* Adjust the address for the data segment. We want to adjust up to
29 the same address within the page on the next page up. */
30 . = ALIGN(0x100000) + (. & (0x100000 - 1));
31Index: i386.ld
32===================================================================
33--- i386.ld.orig 2007-06-13 11:48:22.000000000 +0100
34+++ i386.ld 2007-06-13 11:51:56.000000000 +0100
35@@ -28,6 +28,10 @@ SECTIONS
36 { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
37 .rela.rodata :
38 { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
39+ .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
40+ .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
41+ .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
42+ .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
43 .rel.got : { *(.rel.got) }
44 .rela.got : { *(.rela.got) }
45 .rel.ctors : { *(.rel.ctors) }
46@@ -53,6 +57,9 @@ SECTIONS
47 _etext = .;
48 PROVIDE (etext = .);
49 .fini : { *(.fini) } =0x47ff041f
50+ /* Thread Local Storage sections */
51+ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
52+ .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
53 . = ALIGN(32 / 8);
54 PROVIDE (__preinit_array_start = .);
55 .preinit_array : { *(.preinit_array) }
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/91-oh-sdl-cursor.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/91-oh-sdl-cursor.patch
deleted file mode 100644
index 5280a5bd4a..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/91-oh-sdl-cursor.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1=== modified file 'sdl.c'
2---
3 sdl.c | 2 +-
4 1 file changed, 1 insertion(+), 1 deletion(-)
5
6Index: sdl.c
7===================================================================
8--- sdl.c.orig 2007-06-13 11:48:22.000000000 +0100
9+++ sdl.c 2007-06-13 11:51:56.000000000 +0100
10@@ -241,7 +241,7 @@ static void sdl_hide_cursor(void)
11
12 if (kbd_mouse_is_absolute()) {
13 SDL_ShowCursor(1);
14- SDL_SetCursor(sdl_cursor_hidden);
15+ /* SDL_SetCursor(sdl_cursor_hidden); */
16 } else {
17 SDL_ShowCursor(0);
18 }
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/93-oh-pl110-rgb.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/93-oh-pl110-rgb.patch
deleted file mode 100644
index 4911ac131f..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/93-oh-pl110-rgb.patch
+++ /dev/null
@@ -1,223 +0,0 @@
1=== modified file 'hw/pl110.c'
2---
3 hw/pl110.c | 13 ++++--
4 hw/pl110_template.h | 107 ++++++++++++++++++++++++++++++++++++----------------
5 2 files changed, 86 insertions(+), 34 deletions(-)
6
7Index: hw/pl110.c
8===================================================================
9--- hw/pl110.c.orig 2007-06-13 11:48:22.000000000 +0100
10+++ hw/pl110.c 2007-06-13 11:51:57.000000000 +0100
11@@ -10,6 +10,7 @@
12 #include "vl.h"
13
14 #define PL110_CR_EN 0x001
15+#define PL110_CR_BGR 0x100
16 #define PL110_CR_BEBO 0x200
17 #define PL110_CR_BEPO 0x400
18 #define PL110_CR_PWR 0x800
19@@ -114,6 +115,7 @@ static void pl110_update_display(void *o
20 int first, last = 0;
21 int dirty, new_dirty;
22 int i;
23+ int bpp_offset;
24
25 if (!pl110_enabled(s))
26 return;
27@@ -145,12 +147,17 @@ static void pl110_update_display(void *o
28 fprintf(stderr, "pl110: Bad color depth\n");
29 exit(1);
30 }
31+ if (s->cr & PL110_CR_BGR)
32+ bpp_offset = 0;
33+ else
34+ bpp_offset = 18;
35+
36 if (s->cr & PL110_CR_BEBO)
37- fn = fntable[s->bpp + 6];
38+ fn = fntable[s->bpp + 6 + bpp_offset];
39 else if (s->cr & PL110_CR_BEPO)
40- fn = fntable[s->bpp + 12];
41+ fn = fntable[s->bpp + 12 + bpp_offset];
42 else
43- fn = fntable[s->bpp];
44+ fn = fntable[s->bpp + bpp_offset];
45
46 src_width = s->cols;
47 switch (s->bpp) {
48Index: hw/pl110_template.h
49===================================================================
50--- hw/pl110_template.h.orig 2007-06-13 11:48:22.000000000 +0100
51+++ hw/pl110_template.h 2007-06-13 11:51:57.000000000 +0100
52@@ -24,6 +24,16 @@
53 #error unknown bit depth
54 #endif
55
56+#undef RGB
57+#define BORDER bgr
58+#define ORDER 0
59+#include "pl110_template.h"
60+#define ORDER 1
61+#include "pl110_template.h"
62+#define ORDER 2
63+#include "pl110_template.h"
64+#define RGB
65+#define BORDER rgb
66 #define ORDER 0
67 #include "pl110_template.h"
68 #define ORDER 1
69@@ -33,26 +43,47 @@
70
71 static drawfn glue(pl110_draw_fn_,BITS)[18] =
72 {
73- glue(pl110_draw_line1_lblp,BITS),
74- glue(pl110_draw_line2_lblp,BITS),
75- glue(pl110_draw_line4_lblp,BITS),
76- glue(pl110_draw_line8_lblp,BITS),
77- glue(pl110_draw_line16_lblp,BITS),
78- glue(pl110_draw_line32_lblp,BITS),
79+ glue(pl110_draw_line1_lblp_bgr,BITS),
80+ glue(pl110_draw_line2_lblp_bgr,BITS),
81+ glue(pl110_draw_line4_lblp_bgr,BITS),
82+ glue(pl110_draw_line8_lblp_bgr,BITS),
83+ glue(pl110_draw_line16_lblp_bgr,BITS),
84+ glue(pl110_draw_line32_lblp_bgr,BITS),
85
86- glue(pl110_draw_line1_bbbp,BITS),
87- glue(pl110_draw_line2_bbbp,BITS),
88- glue(pl110_draw_line4_bbbp,BITS),
89- glue(pl110_draw_line8_bbbp,BITS),
90- glue(pl110_draw_line16_bbbp,BITS),
91- glue(pl110_draw_line32_bbbp,BITS),
92+ glue(pl110_draw_line1_bbbp_bgr,BITS),
93+ glue(pl110_draw_line2_bbbp_bgr,BITS),
94+ glue(pl110_draw_line4_bbbp_bgr,BITS),
95+ glue(pl110_draw_line8_bbbp_bgr,BITS),
96+ glue(pl110_draw_line16_bbbp_bgr,BITS),
97+ glue(pl110_draw_line32_bbbp_bgr,BITS),
98
99- glue(pl110_draw_line1_lbbp,BITS),
100- glue(pl110_draw_line2_lbbp,BITS),
101- glue(pl110_draw_line4_lbbp,BITS),
102- glue(pl110_draw_line8_lbbp,BITS),
103- glue(pl110_draw_line16_lbbp,BITS),
104- glue(pl110_draw_line32_lbbp,BITS)
105+ glue(pl110_draw_line1_lbbp_bgr,BITS),
106+ glue(pl110_draw_line2_lbbp_bgr,BITS),
107+ glue(pl110_draw_line4_lbbp_bgr,BITS),
108+ glue(pl110_draw_line8_lbbp_bgr,BITS),
109+ glue(pl110_draw_line16_lbbp_bgr,BITS),
110+ glue(pl110_draw_line32_lbbp_bgr,BITS),
111+
112+ glue(pl110_draw_line1_lblp_rgb,BITS),
113+ glue(pl110_draw_line2_lblp_rgb,BITS),
114+ glue(pl110_draw_line4_lblp_rgb,BITS),
115+ glue(pl110_draw_line8_lblp_rgb,BITS),
116+ glue(pl110_draw_line16_lblp_rgb,BITS),
117+ glue(pl110_draw_line32_lblp_rgb,BITS),
118+
119+ glue(pl110_draw_line1_bbbp_rgb,BITS),
120+ glue(pl110_draw_line2_bbbp_rgb,BITS),
121+ glue(pl110_draw_line4_bbbp_rgb,BITS),
122+ glue(pl110_draw_line8_bbbp_rgb,BITS),
123+ glue(pl110_draw_line16_bbbp_rgb,BITS),
124+ glue(pl110_draw_line32_bbbp_rgb,BITS),
125+
126+ glue(pl110_draw_line1_lbbp_rgb,BITS),
127+ glue(pl110_draw_line2_lbbp_rgb,BITS),
128+ glue(pl110_draw_line4_lbbp_rgb,BITS),
129+ glue(pl110_draw_line8_lbbp_rgb,BITS),
130+ glue(pl110_draw_line16_lbbp_rgb,BITS),
131+ glue(pl110_draw_line32_lbbp_rgb,BITS),
132 };
133
134 #undef BITS
135@@ -61,18 +92,18 @@ static drawfn glue(pl110_draw_fn_,BITS)[
136 #else
137
138 #if ORDER == 0
139-#define NAME glue(lblp, BITS)
140+#define NAME glue(glue(lblp_, BORDER), BITS)
141 #ifdef WORDS_BIGENDIAN
142 #define SWAP_WORDS 1
143 #endif
144 #elif ORDER == 1
145-#define NAME glue(bbbp, BITS)
146+#define NAME glue(glue(bbbp_, BORDER), BITS)
147 #ifndef WORDS_BIGENDIAN
148 #define SWAP_WORDS 1
149 #endif
150 #else
151 #define SWAP_PIXELS 1
152-#define NAME glue(lbbp, BITS)
153+#define NAME glue(glue(lbbp_, BORDER), BITS)
154 #ifdef WORDS_BIGENDIAN
155 #define SWAP_WORDS 1
156 #endif
157@@ -195,27 +226,34 @@ static void glue(pl110_draw_line16_,NAME
158 #ifdef SWAP_WORDS
159 data = bswap32(data);
160 #endif
161+#ifdef RGB
162+#define LSB r
163+#define MSB b
164+#else
165+#define LSB b
166+#define MSB r
167+#endif
168 #if 0
169- r = data & 0x1f;
170+ LSB = data & 0x1f;
171 data >>= 5;
172 g = data & 0x3f;
173 data >>= 6;
174- b = data & 0x1f;
175+ MSB = data & 0x1f;
176 data >>= 5;
177 #else
178- r = (data & 0x1f) << 3;
179+ LSB = (data & 0x1f) << 3;
180 data >>= 5;
181 g = (data & 0x3f) << 2;
182 data >>= 6;
183- b = (data & 0x1f) << 3;
184+ MSB = (data & 0x1f) << 3;
185 data >>= 5;
186 #endif
187 COPY_PIXEL(d, glue(rgb_to_pixel,BITS)(r, g, b));
188- r = (data & 0x1f) << 3;
189+ LSB = (data & 0x1f) << 3;
190 data >>= 5;
191 g = (data & 0x3f) << 2;
192 data >>= 6;
193- b = (data & 0x1f) << 3;
194+ MSB = (data & 0x1f) << 3;
195 data >>= 5;
196 COPY_PIXEL(d, glue(rgb_to_pixel,BITS)(r, g, b));
197 width -= 2;
198@@ -229,14 +267,21 @@ static void glue(pl110_draw_line32_,NAME
199 unsigned int r, g, b;
200 while (width > 0) {
201 data = *(uint32_t *)src;
202+#ifdef RGB
203+#define LSB r
204+#define MSB b
205+#else
206+#define LSB b
207+#define MSB r
208+#endif
209 #ifdef SWAP_WORDS
210- r = data & 0xff;
211+ LSB = data & 0xff;
212 g = (data >> 8) & 0xff;
213- b = (data >> 16) & 0xff;
214+ MSB = (data >> 16) & 0xff;
215 #else
216- r = (data >> 24) & 0xff;
217+ LSB = (data >> 24) & 0xff;
218 g = (data >> 16) & 0xff;
219- b = (data >> 8) & 0xff;
220+ MSB = (data >> 8) & 0xff;
221 #endif
222 COPY_PIXEL(d, glue(rgb_to_pixel,BITS)(r, g, b));
223 width--;
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/fix_segfault.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/fix_segfault.patch
deleted file mode 100644
index 976c75cd60..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/fix_segfault.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1Index: qemu/Makefile.target
2===================================================================
3--- qemu.orig/Makefile.target 2007-06-29 10:57:58.000000000 +0000
4+++ qemu/Makefile.target 2007-06-29 10:58:01.000000000 +0000
5@@ -241,7 +241,6 @@
6 ifdef CONFIG_LINUX_USER
7 OBJS= main.o syscall.o mmap.o signal.o path.o osdep.o thunk.o \
8 elfload.o linuxload.o
9-LIBS+= $(AIOLIBS)
10 ifdef TARGET_HAS_BFLT
11 OBJS+= flatload.o
12 endif
13Index: qemu/linux-user/syscall.c
14===================================================================
15--- qemu.orig/linux-user/syscall.c 2007-06-29 10:58:01.000000000 +0000
16+++ qemu/linux-user/syscall.c 2007-06-29 10:58:30.000000000 +0000
17@@ -4872,29 +4872,6 @@
18 goto unimplemented_nowarn;
19 #endif
20
21-#ifdef TARGET_NR_clock_gettime
22- case TARGET_NR_clock_gettime:
23- {
24- struct timespec ts;
25- ret = get_errno(clock_gettime(arg1, &ts));
26- if (!is_error(ret)) {
27- host_to_target_timespec(arg2, &ts);
28- }
29- break;
30- }
31-#endif
32-#ifdef TARGET_NR_clock_getres
33- case TARGET_NR_clock_getres:
34- {
35- struct timespec ts;
36- ret = get_errno(clock_getres(arg1, &ts));
37- if (!is_error(ret)) {
38- host_to_target_timespec(arg2, &ts);
39- }
40- break;
41- }
42-#endif
43-
44 default:
45 unimplemented:
46 gemu_log("qemu: Unsupported syscall: %d\n", num);
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/qemu-0.9.0-nptl-update.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/qemu-0.9.0-nptl-update.patch
deleted file mode 100644
index 869acba2cf..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/qemu-0.9.0-nptl-update.patch
+++ /dev/null
@@ -1,294 +0,0 @@
1Index: qemu/linux-user/main.c
2===================================================================
3--- qemu.orig/linux-user/main.c 2007-06-29 10:47:58.000000000 +0000
4+++ qemu/linux-user/main.c 2007-06-29 10:47:58.000000000 +0000
5@@ -156,7 +156,7 @@
6 p[1] = tswapl(e2);
7 }
8
9-uint64_t gdt_table[6];
10+uint64_t gdt_table[9];
11 uint64_t idt_table[256];
12
13 /* only dpl matters as we do only user space emulation */
14@@ -1768,7 +1768,11 @@
15 int optind;
16 const char *r;
17 int gdbstub_port = 0;
18-
19+ char *assume_kernel = getenv("QEMU_ASSUME_KERNEL");
20+
21+ if (assume_kernel)
22+ setenv("LD_ASSUME_KERNEL", assume_kernel, 1);
23+
24 if (argc <= 1)
25 usage();
26
27Index: qemu/linux-user/syscall.c
28===================================================================
29--- qemu.orig/linux-user/syscall.c 2007-06-29 10:47:58.000000000 +0000
30+++ qemu/linux-user/syscall.c 2007-06-29 10:53:44.000000000 +0000
31@@ -60,6 +60,7 @@
32 #define tchars host_tchars /* same as target */
33 #define ltchars host_ltchars /* same as target */
34
35+#include <linux/futex.h>
36 #include <linux/termios.h>
37 #include <linux/unistd.h>
38 #include <linux/utsname.h>
39@@ -2122,6 +2123,80 @@
40 return ret;
41 }
42
43+int do_set_thread_area(CPUX86State *env, target_ulong ptr)
44+{
45+ uint64_t *gdt_table = g2h(env->gdt.base);
46+ struct target_modify_ldt_ldt_s ldt_info;
47+ struct target_modify_ldt_ldt_s *target_ldt_info;
48+ int seg_32bit, contents, read_exec_only, limit_in_pages;
49+ int seg_not_present, useable;
50+ uint32_t *lp, entry_1, entry_2;
51+ int i;
52+
53+ lock_user_struct(target_ldt_info, ptr, 1);
54+ ldt_info.entry_number = tswap32(target_ldt_info->entry_number);
55+ ldt_info.base_addr = tswapl(target_ldt_info->base_addr);
56+ ldt_info.limit = tswap32(target_ldt_info->limit);
57+ ldt_info.flags = tswap32(target_ldt_info->flags);
58+ if (ldt_info.entry_number == -1) {
59+ for (i=6; i<8; i++)
60+ if (gdt_table[i] == 0) {
61+ ldt_info.entry_number = i;
62+ target_ldt_info->entry_number = tswap32(i);
63+ break;
64+ }
65+ }
66+ unlock_user_struct(target_ldt_info, ptr, 0);
67+
68+ if (ldt_info.entry_number < 6 || ldt_info.entry_number > 8)
69+ return -EINVAL;
70+ seg_32bit = ldt_info.flags & 1;
71+ contents = (ldt_info.flags >> 1) & 3;
72+ read_exec_only = (ldt_info.flags >> 3) & 1;
73+ limit_in_pages = (ldt_info.flags >> 4) & 1;
74+ seg_not_present = (ldt_info.flags >> 5) & 1;
75+ useable = (ldt_info.flags >> 6) & 1;
76+
77+ if (contents == 3) {
78+ if (seg_not_present == 0)
79+ return -EINVAL;
80+ }
81+
82+ /* NOTE: same code as Linux kernel */
83+ /* Allow LDTs to be cleared by the user. */
84+ if (ldt_info.base_addr == 0 && ldt_info.limit == 0) {
85+ if ((contents == 0 &&
86+ read_exec_only == 1 &&
87+ seg_32bit == 0 &&
88+ limit_in_pages == 0 &&
89+ seg_not_present == 1 &&
90+ useable == 0 )) {
91+ entry_1 = 0;
92+ entry_2 = 0;
93+ goto install;
94+ }
95+ }
96+
97+ entry_1 = ((ldt_info.base_addr & 0x0000ffff) << 16) |
98+ (ldt_info.limit & 0x0ffff);
99+ entry_2 = (ldt_info.base_addr & 0xff000000) |
100+ ((ldt_info.base_addr & 0x00ff0000) >> 16) |
101+ (ldt_info.limit & 0xf0000) |
102+ ((read_exec_only ^ 1) << 9) |
103+ (contents << 10) |
104+ ((seg_not_present ^ 1) << 15) |
105+ (seg_32bit << 22) |
106+ (limit_in_pages << 23) |
107+ (useable << 20) |
108+ 0x7000;
109+
110+ /* Install the new entry ... */
111+install:
112+ lp = (uint32_t *)(gdt_table + ldt_info.entry_number);
113+ lp[0] = tswap32(entry_1);
114+ lp[1] = tswap32(entry_2);
115+ return 0;
116+}
117 #endif /* defined(TARGET_I386) */
118
119 /* this stack is the equivalent of the kernel stack associated with a
120@@ -2154,15 +2229,20 @@
121 TaskState *ts;
122 uint8_t *new_stack;
123 CPUState *new_env;
124+#if defined(TARGET_I386)
125+ uint64_t *new_gdt_table;
126+#endif
127 #ifdef USE_NPTL
128 unsigned int nptl_flags;
129
130 if (flags & CLONE_PARENT_SETTID)
131 *parent_tidptr = gettid();
132 #endif
133-
134+
135 if (flags & CLONE_VM) {
136 ts = malloc(sizeof(TaskState) + NEW_STACK_SIZE);
137+ if (!ts)
138+ return -ENOMEM;
139 memset(ts, 0, sizeof(TaskState));
140 new_stack = ts->stack;
141 ts->used = 1;
142@@ -2174,6 +2254,29 @@
143 #if defined(TARGET_I386)
144 if (!newsp)
145 newsp = env->regs[R_ESP];
146+ new_gdt_table = malloc(9 * 8);
147+ if (!new_gdt_table) {
148+ free(new_env);
149+ return -ENOMEM;
150+ }
151+ /* Copy main GDT table from parent, but clear TLS entries */
152+ memcpy(new_gdt_table, g2h(env->gdt.base), 6 * 8);
153+ memset(&new_gdt_table[6], 0, 3 * 8);
154+ new_env->gdt.base = h2g(new_gdt_table);
155+ if (flags & 0x00080000 /* CLONE_SETTLS */) {
156+ ret = do_set_thread_area(new_env, new_env->regs[R_ESI]);
157+ if (ret) {
158+ free(new_gdt_table);
159+ free(new_env);
160+ return ret;
161+ }
162+ }
163+ cpu_x86_load_seg(env, R_CS, new_env->regs[R_CS]);
164+ cpu_x86_load_seg(env, R_DS, new_env->regs[R_DS]);
165+ cpu_x86_load_seg(env, R_ES, new_env->regs[R_ES]);
166+ cpu_x86_load_seg(env, R_SS, new_env->regs[R_SS]);
167+ cpu_x86_load_seg(env, R_FS, new_env->regs[R_FS]);
168+ cpu_x86_load_seg(env, R_GS, new_env->regs[R_GS]);
169 new_env->regs[R_ESP] = newsp;
170 new_env->regs[R_EAX] = 0;
171 #elif defined(TARGET_ARM)
172@@ -2517,6 +2620,68 @@
173 unlock_user_struct(target_ts, target_addr, 1);
174 }
175
176+static long do_futex(target_ulong uaddr, int op, uint32_t val,
177+ target_ulong utime, target_ulong uaddr2,
178+ uint32_t val3)
179+{
180+ struct timespec host_utime;
181+ unsigned long val2 = utime;
182+
183+ if (utime && (op == FUTEX_WAIT || op == FUTEX_LOCK_PI)) {
184+ target_to_host_timespec(&host_utime, utime);
185+ val2 = (unsigned long)&host_utime;
186+ }
187+
188+#ifdef BSWAP_NEEDED
189+ switch(op) {
190+ case FUTEX_CMP_REQUEUE:
191+ val3 = tswap32(val3);
192+ case FUTEX_REQUEUE:
193+ val2 = tswap32(val2);
194+ case FUTEX_WAIT:
195+ case FUTEX_WAKE:
196+ val = tswap32(val);
197+ case FUTEX_LOCK_PI: /* This one's icky, but comes out OK */
198+ case FUTEX_UNLOCK_PI:
199+ break;
200+ default:
201+ gemu_log("qemu: Unsupported futex op %d\n", op);
202+ return -ENOSYS;
203+ }
204+#if 0 /* No, it's worse than this */
205+ if (op == FUTEX_WAKE_OP) {
206+ /* Need to munge the secondary operation (val3) */
207+ val3 = tswap32(val3);
208+ int op2 = (val3 >> 28) & 7;
209+ int cmp = (val3 >> 24) & 15;
210+ int oparg = (val3 << 8) >> 20;
211+ int cmparg = (val3 << 20) >> 20;
212+ int shift = val3 & (FUTEX_OP_OPARG_SHIFT << 28);
213+
214+ if (shift)
215+ oparg = (oparg & 7) + 24 - (oparg & 24);
216+ else oparg =
217+ if (op2 == FUTEX_OP_ADD) {
218+ gemu_log("qemu: Unsupported wrong-endian FUTEX_OP_ADD\n");
219+ return -ENOSYS;
220+ }
221+ if (cmparg == FUTEX_OP_CMP_LT || cmparg == FUTEX_OP_CMP_GE ||
222+ cmparg == FUTEX_OP_CMP_LE || cmparg == FUTEX_OP_CMP_GT) {
223+ gemu_log("qemu: Unsupported wrong-endian futex cmparg %d\n", cmparg);
224+ return -ENOSYS;
225+ }
226+ val3 = shift | (op2<<28) | (cmp<<24) | (oparg<<12) | cmparg;
227+ }
228+#endif
229+#endif
230+ return syscall(__NR_futex, g2h(uaddr), op, val, val2, g2h(uaddr2), val3);
231+}
232+
233+int do_set_tid_address(target_ulong tidptr)
234+{
235+ return syscall(__NR_set_tid_address, g2h(tidptr));
236+}
237+
238 long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
239 long arg4, long arg5, long arg6)
240 {
241@@ -2534,7 +2699,7 @@
242 _mcleanup();
243 #endif
244 gdb_exit(cpu_env, arg1);
245- /* XXX: should free thread stack and CPU env */
246+ /* XXX: should free thread stack, GDT and CPU env */
247 _exit(arg1);
248 ret = 0; /* avoid warning */
249 break;
250@@ -4642,6 +4807,9 @@
251 ((CPUMIPSState *) cpu_env)->tls_value = arg1;
252 ret = 0;
253 break;
254+#elif TARGET_i386
255+ ret = get_errno(do_set_thread_area(cpu_env, arg1));
256+ break;
257 #else
258 goto unimplemented_nowarn;
259 #endif
260@@ -4655,6 +4823,21 @@
261 goto unimplemented_nowarn;
262 #endif
263
264+#ifdef TARGET_NR_futex
265+ case TARGET_NR_futex:
266+ ret = get_errno(do_futex(arg1, arg2, arg3, arg4, arg5, arg6));
267+ break;
268+#endif
269+#ifdef TARGET_NR_set_tid_address
270+ case TARGET_NR_set_tid_address:
271+ ret = get_errno(do_set_tid_address(arg1));
272+ break;
273+#endif
274+#ifdef TARGET_NR_set_robust_list
275+ case TARGET_NR_set_robust_list:
276+ goto unimplemented_nowarn;
277+#endif
278+
279 #ifdef TARGET_NR_clock_gettime
280 case TARGET_NR_clock_gettime:
281 {
282@@ -4678,12 +4861,6 @@
283 }
284 #endif
285
286-#if defined(TARGET_NR_set_tid_address) && defined(__NR_set_tid_address)
287- case TARGET_NR_set_tid_address:
288- ret = get_errno(set_tid_address((int *) arg1));
289- break;
290-#endif
291-
292 default:
293 unimplemented:
294 gemu_log("qemu: Unsupported syscall: %d\n", num);
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/qemu-0.9.0-nptl.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/qemu-0.9.0-nptl.patch
deleted file mode 100644
index fc7b0cfa4b..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/qemu-0.9.0-nptl.patch
+++ /dev/null
@@ -1,892 +0,0 @@
1These are Paul Brook's patches to QEMU-0.8.2 to enable the running of single
2ARM binaries under QEMU's user-emulation mode. Without them, QEMU-0.8.1
3immediately dies saying:
4 Error: f0005
5 qemu: uncaught target signal 6 (Aborted) - exiting
6while qemu-0.8.2 dies saying:
7 qemu: Unsupported syscall: 983045
8 cannot set up thread-local storage: unknown error
9
10This file is a rediffing of the patches visible at
11https://nowt.dyndns.org/patch.qemu_nptl on 27 Sept 2006
12which "patch" fails to apply automatically.
13See also http://lists.gnu.org/archive/html/qemu-devel/2006-09/msg00194.html
14
15 Martin Guy, 27 Sept 2006
16
17Index: qemu/configure
18===================================================================
19--- qemu.orig/configure 2007-06-29 10:47:39.000000000 +0000
20+++ qemu/configure 2007-06-29 10:47:58.000000000 +0000
21@@ -101,6 +101,7 @@
22 darwin_user="no"
23 build_docs="no"
24 uname_release=""
25+nptl="yes"
26
27 # OS specific
28 targetos=`uname -s`
29@@ -281,6 +282,8 @@
30 *) echo "undefined SPARC architecture. Exiting";exit 1;;
31 esac
32 ;;
33+ --disable-nptl) nptl="no"
34+ ;;
35 esac
36 done
37
38@@ -355,6 +358,7 @@
39 echo " --disable-linux-user disable all linux usermode emulation targets"
40 echo " --enable-darwin-user enable all darwin usermode emulation targets"
41 echo " --disable-darwin-user disable all darwin usermode emulation targets"
42+echo " --disable-nptl disable usermode NPTL guest support"
43 echo " --fmod-lib path to FMOD library"
44 echo " --fmod-inc path to FMOD includes"
45 echo " --enable-uname-release=R Return R for uname -r in usermode emulation"
46@@ -524,6 +528,23 @@
47 }
48 EOF
49
50+# check NPTL support
51+cat > $TMPC <<EOF
52+#include <sched.h>
53+void foo()
54+{
55+#ifndef CLONE_SETTLS
56+#error bork
57+#endif
58+}
59+EOF
60+
61+if $cc -c -o $TMPO $TMPC 2> /dev/null ; then
62+ :
63+else
64+ nptl="no"
65+fi
66+
67 ##########################################
68 # SDL probe
69
70@@ -678,6 +699,7 @@
71 echo "Documentation $build_docs"
72 [ ! -z "$uname_release" ] && \
73 echo "uname -r $uname_release"
74+echo "NPTL support $nptl"
75
76 if test $sdl_too_old = "yes"; then
77 echo "-> Your SDL version is too old - please upgrade to have SDL support"
78@@ -1057,6 +1079,14 @@
79 echo "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak
80 fi
81 fi
82+else
83+ if test "$nptl" = "yes" ; then
84+ case "$target_cpu" in
85+ arm | armeb)
86+ echo "#define USE_NPTL 1" >> $config_h
87+ ;;
88+ esac
89+ fi
90 fi
91
92 if test "$cocoa" = "yes" ; then
93Index: qemu/exec-all.h
94===================================================================
95--- qemu.orig/exec-all.h 2007-06-29 10:47:39.000000000 +0000
96+++ qemu/exec-all.h 2007-06-29 10:47:58.000000000 +0000
97@@ -360,170 +360,7 @@
98 extern CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4];
99 extern void *io_mem_opaque[IO_MEM_NB_ENTRIES];
100
101-#if defined(__powerpc__)
102-static inline int testandset (int *p)
103-{
104- int ret;
105- __asm__ __volatile__ (
106- "0: lwarx %0,0,%1\n"
107- " xor. %0,%3,%0\n"
108- " bne 1f\n"
109- " stwcx. %2,0,%1\n"
110- " bne- 0b\n"
111- "1: "
112- : "=&r" (ret)
113- : "r" (p), "r" (1), "r" (0)
114- : "cr0", "memory");
115- return ret;
116-}
117-#elif defined(__i386__)
118-static inline int testandset (int *p)
119-{
120- long int readval = 0;
121-
122- __asm__ __volatile__ ("lock; cmpxchgl %2, %0"
123- : "+m" (*p), "+a" (readval)
124- : "r" (1)
125- : "cc");
126- return readval;
127-}
128-#elif defined(__x86_64__)
129-static inline int testandset (int *p)
130-{
131- long int readval = 0;
132-
133- __asm__ __volatile__ ("lock; cmpxchgl %2, %0"
134- : "+m" (*p), "+a" (readval)
135- : "r" (1)
136- : "cc");
137- return readval;
138-}
139-#elif defined(__s390__)
140-static inline int testandset (int *p)
141-{
142- int ret;
143-
144- __asm__ __volatile__ ("0: cs %0,%1,0(%2)\n"
145- " jl 0b"
146- : "=&d" (ret)
147- : "r" (1), "a" (p), "0" (*p)
148- : "cc", "memory" );
149- return ret;
150-}
151-#elif defined(__alpha__)
152-static inline int testandset (int *p)
153-{
154- int ret;
155- unsigned long one;
156-
157- __asm__ __volatile__ ("0: mov 1,%2\n"
158- " ldl_l %0,%1\n"
159- " stl_c %2,%1\n"
160- " beq %2,1f\n"
161- ".subsection 2\n"
162- "1: br 0b\n"
163- ".previous"
164- : "=r" (ret), "=m" (*p), "=r" (one)
165- : "m" (*p));
166- return ret;
167-}
168-#elif defined(__sparc__)
169-static inline int testandset (int *p)
170-{
171- int ret;
172-
173- __asm__ __volatile__("ldstub [%1], %0"
174- : "=r" (ret)
175- : "r" (p)
176- : "memory");
177-
178- return (ret ? 1 : 0);
179-}
180-#elif defined(__arm__)
181-static inline int testandset (int *spinlock)
182-{
183- register unsigned int ret;
184- __asm__ __volatile__("swp %0, %1, [%2]"
185- : "=r"(ret)
186- : "0"(1), "r"(spinlock));
187-
188- return ret;
189-}
190-#elif defined(__mc68000)
191-static inline int testandset (int *p)
192-{
193- char ret;
194- __asm__ __volatile__("tas %1; sne %0"
195- : "=r" (ret)
196- : "m" (p)
197- : "cc","memory");
198- return ret;
199-}
200-#elif defined(__ia64)
201-
202-#include <ia64intrin.h>
203-
204-static inline int testandset (int *p)
205-{
206- return __sync_lock_test_and_set (p, 1);
207-}
208-#elif defined(__mips__)
209-static inline int testandset (int *p)
210-{
211- int ret;
212-
213- __asm__ __volatile__ (
214- " .set push \n"
215- " .set noat \n"
216- " .set mips2 \n"
217- "1: li $1, 1 \n"
218- " ll %0, %1 \n"
219- " sc $1, %1 \n"
220- " beqz $1, 1b \n"
221- " .set pop "
222- : "=r" (ret), "+R" (*p)
223- :
224- : "memory");
225-
226- return ret;
227-}
228-#else
229-#error unimplemented CPU support
230-#endif
231-
232-typedef int spinlock_t;
233-
234-#define SPIN_LOCK_UNLOCKED 0
235-
236-#if defined(CONFIG_USER_ONLY)
237-static inline void spin_lock(spinlock_t *lock)
238-{
239- while (testandset(lock));
240-}
241-
242-static inline void spin_unlock(spinlock_t *lock)
243-{
244- *lock = 0;
245-}
246-
247-static inline int spin_trylock(spinlock_t *lock)
248-{
249- return !testandset(lock);
250-}
251-#else
252-static inline void spin_lock(spinlock_t *lock)
253-{
254-}
255-
256-static inline void spin_unlock(spinlock_t *lock)
257-{
258-}
259-
260-static inline int spin_trylock(spinlock_t *lock)
261-{
262- return 1;
263-}
264-#endif
265+#include "qemu_spinlock.h"
266
267 extern spinlock_t tb_lock;
268
269Index: qemu/linux-user/arm/syscall.h
270===================================================================
271--- qemu.orig/linux-user/arm/syscall.h 2007-06-29 10:47:39.000000000 +0000
272+++ qemu/linux-user/arm/syscall.h 2007-06-29 10:47:58.000000000 +0000
273@@ -28,7 +28,9 @@
274 #define ARM_SYSCALL_BASE 0x900000
275 #define ARM_THUMB_SYSCALL 0
276
277-#define ARM_NR_cacheflush (ARM_SYSCALL_BASE + 0xf0000 + 2)
278+#define ARM_NR_BASE 0xf0000
279+#define ARM_NR_cacheflush (ARM_NR_BASE + 2)
280+#define ARM_NR_set_tls (ARM_NR_BASE + 5)
281
282 #define ARM_NR_semihosting 0x123456
283 #define ARM_NR_thumb_semihosting 0xAB
284Index: qemu/linux-user/main.c
285===================================================================
286--- qemu.orig/linux-user/main.c 2007-06-29 10:47:39.000000000 +0000
287+++ qemu/linux-user/main.c 2007-06-29 10:53:47.000000000 +0000
288@@ -325,6 +325,50 @@
289 }
290 }
291
292+/* Handle a jump to the kernel code page. */
293+static int
294+do_kernel_trap(CPUARMState *env)
295+{
296+ uint32_t addr;
297+ uint32_t *ptr;
298+ uint32_t cpsr;
299+
300+ switch (env->regs[15]) {
301+ case 0xffff0fc0: /* __kernel_cmpxchg */
302+ /* XXX: This only works between threads, not between processes.
303+ Use native atomic operations. */
304+ /* ??? This probably breaks horribly if the access segfaults. */
305+ cpu_lock();
306+ ptr = (uint32_t *)env->regs[2];
307+ cpsr = cpsr_read(env);
308+ if (*ptr == env->regs[0]) {
309+ *ptr = env->regs[1];
310+ env->regs[0] = 0;
311+ cpsr |= CPSR_C;
312+ } else {
313+ env->regs[0] = -1;
314+ cpsr &= ~CPSR_C;
315+ }
316+ cpsr_write(env, cpsr, CPSR_C);
317+ cpu_unlock();
318+ break;
319+ case 0xffff0fe0: /* __kernel_get_tls */
320+ env->regs[0] = env->cp15.c13_tls;
321+ break;
322+ default:
323+ return 1;
324+ }
325+ /* Jump back to the caller. */
326+ addr = env->regs[14];
327+ if (addr & 1) {
328+ env->thumb = 1;
329+ addr &= ~1;
330+ }
331+ env->regs[15] = addr;
332+
333+ return 0;
334+}
335+
336 void cpu_loop(CPUARMState *env)
337 {
338 int trapnr;
339@@ -381,10 +425,8 @@
340 }
341 }
342
343- if (n == ARM_NR_cacheflush) {
344- arm_cache_flush(env->regs[0], env->regs[1]);
345- } else if (n == ARM_NR_semihosting
346- || n == ARM_NR_thumb_semihosting) {
347+ if (n == ARM_NR_semihosting
348+ || n == ARM_NR_thumb_semihosting) {
349 env->regs[0] = do_arm_semihosting (env);
350 } else if (n == 0 || n >= ARM_SYSCALL_BASE
351 || (env->thumb && n == ARM_THUMB_SYSCALL)) {
352@@ -395,14 +437,34 @@
353 n -= ARM_SYSCALL_BASE;
354 env->eabi = 0;
355 }
356- env->regs[0] = do_syscall(env,
357- n,
358- env->regs[0],
359- env->regs[1],
360- env->regs[2],
361- env->regs[3],
362- env->regs[4],
363- env->regs[5]);
364+ if ( n > ARM_NR_BASE) {
365+ switch (n)
366+ {
367+ case ARM_NR_cacheflush:
368+ arm_cache_flush(env->regs[0], env->regs[1]);
369+ break;
370+#ifdef USE_NPTL
371+ case ARM_NR_set_tls:
372+ cpu_set_tls(env, env->regs[0]);
373+ env->regs[0] = 0;
374+ break;
375+#endif
376+ default:
377+ printf ("Error: Bad syscall: %x\n", n);
378+ goto error;
379+ }
380+ }
381+ else
382+ {
383+ env->regs[0] = do_syscall(env,
384+ n,
385+ env->regs[0],
386+ env->regs[1],
387+ env->regs[2],
388+ env->regs[3],
389+ env->regs[4],
390+ env->regs[5]);
391+ }
392 } else {
393 goto error;
394 }
395@@ -441,6 +503,10 @@
396 }
397 }
398 break;
399+ case EXCP_KERNEL_TRAP:
400+ if (do_kernel_trap(env))
401+ goto error;
402+ break;
403 default:
404 error:
405 fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n",
406@@ -2047,6 +2113,10 @@
407 ts->heap_base = info->brk;
408 /* This will be filled in on the first SYS_HEAPINFO call. */
409 ts->heap_limit = 0;
410+ /* Register the magic kernel code page. The cpu will generate a
411+ special exception when it tries to execute code here. We can't
412+ put real code here because it may be in use by the host kernel. */
413+ page_set_flags(0xffff0000, 0xffff0fff, 0);
414 #endif
415
416 if (gdbstub_port) {
417Index: qemu/linux-user/qemu.h
418===================================================================
419--- qemu.orig/linux-user/qemu.h 2007-06-29 10:47:39.000000000 +0000
420+++ qemu/linux-user/qemu.h 2007-06-29 10:47:58.000000000 +0000
421@@ -80,6 +80,9 @@
422 uint32_t heap_base;
423 uint32_t heap_limit;
424 #endif
425+#ifdef USE_NPTL
426+ uint32_t *child_tidptr;
427+#endif
428 int used; /* non zero if used */
429 struct image_info *info;
430 uint8_t stack[0];
431Index: qemu/linux-user/syscall.c
432===================================================================
433--- qemu.orig/linux-user/syscall.c 2007-06-29 10:47:39.000000000 +0000
434+++ qemu/linux-user/syscall.c 2007-06-29 10:53:47.000000000 +0000
435@@ -70,9 +70,18 @@
436 #include <linux/kd.h>
437
438 #include "qemu.h"
439+#include "qemu_spinlock.h"
440
441 //#define DEBUG
442
443+#ifdef USE_NPTL
444+#define CLONE_NPTL_FLAGS2 (CLONE_SETTLS | \
445+ CLONE_PARENT_SETTID | CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID)
446+#else
447+/* XXX: Hardcode the above values. */
448+#define CLONE_NPTL_FLAGS2 0
449+#endif
450+
451 #if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC) \
452 || defined(TARGET_M68K) || defined(TARGET_SH4)
453 /* 16 bit uid wrappers emulation */
454@@ -2119,20 +2128,38 @@
455 thread/process */
456 #define NEW_STACK_SIZE 8192
457
458+#ifdef USE_NPTL
459+static spinlock_t nptl_lock = SPIN_LOCK_UNLOCKED;
460+#endif
461+
462 static int clone_func(void *arg)
463 {
464 CPUState *env = arg;
465+#ifdef HAVE_NPTL
466+ /* Wait until the parent has finshed initializing the tls state. */
467+ while (!spin_trylock(&nptl_lock))
468+ usleep(1);
469+ spin_unlock(&nptl_lock);
470+#endif
471 cpu_loop(env);
472 /* never exits */
473 return 0;
474 }
475
476-int do_fork(CPUState *env, unsigned int flags, unsigned long newsp)
477+int do_fork(CPUState *env, unsigned int flags, unsigned long newsp,
478+ uint32_t *parent_tidptr, void *newtls,
479+ uint32_t *child_tidptr)
480 {
481 int ret;
482 TaskState *ts;
483 uint8_t *new_stack;
484 CPUState *new_env;
485+#ifdef USE_NPTL
486+ unsigned int nptl_flags;
487+
488+ if (flags & CLONE_PARENT_SETTID)
489+ *parent_tidptr = gettid();
490+#endif
491
492 if (flags & CLONE_VM) {
493 ts = malloc(sizeof(TaskState) + NEW_STACK_SIZE);
494@@ -2199,16 +2226,67 @@
495 #error unsupported target CPU
496 #endif
497 new_env->opaque = ts;
498+#ifdef USE_NPTL
499+ nptl_flags = flags;
500+ flags &= ~CLONE_NPTL_FLAGS2;
501+
502+ if (nptl_flags & CLONE_CHILD_CLEARTID) {
503+ ts->child_tidptr = child_tidptr;
504+ }
505+
506+ if (nptl_flags & CLONE_SETTLS)
507+ cpu_set_tls (new_env, newtls);
508+
509+ /* Grab the global cpu lock so that the thread setup appears
510+ atomic. */
511+ if (nptl_flags & CLONE_CHILD_SETTID)
512+ spin_lock(&nptl_lock);
513+
514+#else
515+ if (flags & CLONE_NPTL_FLAGS2)
516+ return -EINVAL;
517+#endif
518+
519+ if (CLONE_VFORK & flags)
520+ flags ^= CLONE_VM;
521 #ifdef __ia64__
522 ret = __clone2(clone_func, new_stack + NEW_STACK_SIZE, flags, new_env);
523 #else
524 ret = clone(clone_func, new_stack + NEW_STACK_SIZE, flags, new_env);
525 #endif
526+#ifdef USE_NPTL
527+ if (ret != -1) {
528+ if (nptl_flags & CLONE_CHILD_SETTID)
529+ *child_tidptr = ret;
530+ }
531+
532+ /* Allow the child to continue. */
533+ if (nptl_flags & CLONE_CHILD_SETTID)
534+ spin_unlock(&nptl_lock);
535+#endif
536 } else {
537 /* if no CLONE_VM, we consider it is a fork */
538- if ((flags & ~CSIGNAL) != 0)
539+ if ((flags & ~(CSIGNAL | CLONE_NPTL_FLAGS2)) != 0)
540 return -EINVAL;
541 ret = fork();
542+#ifdef USE_NPTL
543+ /* There is a race condition here. The parent process could
544+ theoretically read the TID in the child process before the child
545+ tid is set. This would require using either ptrace
546+ (not implemented) or having *_tidptr to point at a shared memory
547+ mapping. We can't repeat the spinlock hack used above because
548+ the child process gets its own copy of the lock. */
549+ if (ret == 0) {
550+ /* Child Process. */
551+ if (flags & CLONE_CHILD_SETTID)
552+ *child_tidptr = gettid();
553+ ts = (TaskState *)env->opaque;
554+ if (flags & CLONE_CHILD_CLEARTID)
555+ ts->child_tidptr = child_tidptr;
556+ if (flags & CLONE_SETTLS)
557+ cpu_set_tls (env, newtls);
558+ }
559+#endif
560 }
561 return ret;
562 }
563@@ -2485,7 +2563,7 @@
564 ret = do_brk(arg1);
565 break;
566 case TARGET_NR_fork:
567- ret = get_errno(do_fork(cpu_env, SIGCHLD, 0));
568+ ret = get_errno(do_fork(cpu_env, SIGCHLD, 0, NULL, NULL, NULL));
569 break;
570 #ifdef TARGET_NR_waitpid
571 case TARGET_NR_waitpid:
572@@ -3649,7 +3727,8 @@
573 ret = get_errno(fsync(arg1));
574 break;
575 case TARGET_NR_clone:
576- ret = get_errno(do_fork(cpu_env, arg1, arg2));
577+ ret = get_errno(do_fork(cpu_env, arg1, arg2, (uint32_t *)arg3,
578+ (void *)arg4, (uint32_t *)arg5));
579 break;
580 #ifdef __NR_exit_group
581 /* new thread calls */
582@@ -4037,7 +4116,8 @@
583 #endif
584 #ifdef TARGET_NR_vfork
585 case TARGET_NR_vfork:
586- ret = get_errno(do_fork(cpu_env, CLONE_VFORK | CLONE_VM | SIGCHLD, 0));
587+ ret = get_errno(do_fork(cpu_env, CLONE_VFORK | CLONE_VM | SIGCHLD, 0,
588+ NULL, NULL, NULL));
589 break;
590 #endif
591 #ifdef TARGET_NR_ugetrlimit
592@@ -4619,4 +4699,3 @@
593 #endif
594 return ret;
595 }
596-
597Index: qemu/qemu_spinlock.h
598===================================================================
599--- /dev/null 1970-01-01 00:00:00.000000000 +0000
600+++ qemu/qemu_spinlock.h 2007-06-29 10:47:58.000000000 +0000
601@@ -0,0 +1,181 @@
602+/*
603+ * Atomic operation helper include
604+ *
605+ * Copyright (c) 2005 Fabrice Bellard
606+ *
607+ * This library is free software; you can redistribute it and/or
608+ * modify it under the terms of the GNU Lesser General Public
609+ * License as published by the Free Software Foundation; either
610+ * version 2 of the License, or (at your option) any later version.
611+ *
612+ * This library is distributed in the hope that it will be useful,
613+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
614+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
615+ * Lesser General Public License for more details.
616+ *
617+ * You should have received a copy of the GNU Lesser General Public
618+ * License along with this library; if not, write to the Free Software
619+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
620+ */
621+#ifndef QEMU_SPINLOCK_H
622+#define QEMU_SPINLOCK_H
623+
624+#ifdef __powerpc__
625+static inline int testandset (int *p)
626+{
627+ int ret;
628+ __asm__ __volatile__ (
629+ "0: lwarx %0,0,%1\n"
630+ " xor. %0,%3,%0\n"
631+ " bne 1f\n"
632+ " stwcx. %2,0,%1\n"
633+ " bne- 0b\n"
634+ "1: "
635+ : "=&r" (ret)
636+ : "r" (p), "r" (1), "r" (0)
637+ : "cr0", "memory");
638+ return ret;
639+}
640+#endif
641+
642+#ifdef __i386__
643+static inline int testandset (int *p)
644+{
645+ long int readval = 0;
646+
647+ __asm__ __volatile__ ("lock; cmpxchgl %2, %0"
648+ : "+m" (*p), "+a" (readval)
649+ : "r" (1)
650+ : "cc");
651+ return readval;
652+}
653+#endif
654+
655+#ifdef __x86_64__
656+static inline int testandset (int *p)
657+{
658+ long int readval = 0;
659+
660+ __asm__ __volatile__ ("lock; cmpxchgl %2, %0"
661+ : "+m" (*p), "+a" (readval)
662+ : "r" (1)
663+ : "cc");
664+ return readval;
665+}
666+#endif
667+
668+#ifdef __s390__
669+static inline int testandset (int *p)
670+{
671+ int ret;
672+
673+ __asm__ __volatile__ ("0: cs %0,%1,0(%2)\n"
674+ " jl 0b"
675+ : "=&d" (ret)
676+ : "r" (1), "a" (p), "0" (*p)
677+ : "cc", "memory" );
678+ return ret;
679+}
680+#endif
681+
682+#ifdef __alpha__
683+static inline int testandset (int *p)
684+{
685+ int ret;
686+ unsigned long one;
687+
688+ __asm__ __volatile__ ("0: mov 1,%2\n"
689+ " ldl_l %0,%1\n"
690+ " stl_c %2,%1\n"
691+ " beq %2,1f\n"
692+ ".subsection 2\n"
693+ "1: br 0b\n"
694+ ".previous"
695+ : "=r" (ret), "=m" (*p), "=r" (one)
696+ : "m" (*p));
697+ return ret;
698+}
699+#endif
700+
701+#ifdef __sparc__
702+static inline int testandset (int *p)
703+{
704+ int ret;
705+
706+ __asm__ __volatile__("ldstub [%1], %0"
707+ : "=r" (ret)
708+ : "r" (p)
709+ : "memory");
710+
711+ return (ret ? 1 : 0);
712+}
713+#endif
714+
715+#ifdef __arm__
716+static inline int testandset (int *spinlock)
717+{
718+ register unsigned int ret;
719+ __asm__ __volatile__("swp %0, %1, [%2]"
720+ : "=r"(ret)
721+ : "0"(1), "r"(spinlock));
722+
723+ return ret;
724+}
725+#endif
726+
727+#ifdef __mc68000
728+static inline int testandset (int *p)
729+{
730+ char ret;
731+ __asm__ __volatile__("tas %1; sne %0"
732+ : "=r" (ret)
733+ : "m" (p)
734+ : "cc","memory");
735+ return ret;
736+}
737+#endif
738+
739+#ifdef __ia64
740+#include <ia64intrin.h>
741+
742+static inline int testandset (int *p)
743+{
744+ return __sync_lock_test_and_set (p, 1);
745+}
746+#endif
747+
748+typedef int spinlock_t;
749+
750+#define SPIN_LOCK_UNLOCKED 0
751+
752+#if defined(CONFIG_USER_ONLY)
753+static inline void spin_lock(spinlock_t *lock)
754+{
755+ while (testandset(lock));
756+}
757+
758+static inline void spin_unlock(spinlock_t *lock)
759+{
760+ *lock = 0;
761+}
762+
763+static inline int spin_trylock(spinlock_t *lock)
764+{
765+ return !testandset(lock);
766+}
767+#else
768+static inline void spin_lock(spinlock_t *lock)
769+{
770+}
771+
772+static inline void spin_unlock(spinlock_t *lock)
773+{
774+}
775+
776+static inline int spin_trylock(spinlock_t *lock)
777+{
778+ return 1;
779+}
780+#endif
781+
782+#endif
783Index: qemu/target-arm/cpu.h
784===================================================================
785--- qemu.orig/target-arm/cpu.h 2007-06-29 10:47:39.000000000 +0000
786+++ qemu/target-arm/cpu.h 2007-06-29 10:47:58.000000000 +0000
787@@ -37,6 +37,7 @@
788 #define EXCP_IRQ 5
789 #define EXCP_FIQ 6
790 #define EXCP_BKPT 7
791+#define EXCP_KERNEL_TRAP 8 /* Jumped to kernel code page. */
792
793 typedef void ARMWriteCPFunc(void *opaque, int cp_info,
794 int srcreg, int operand, uint32_t value);
795@@ -97,6 +98,7 @@
796 uint32_t c9_data;
797 uint32_t c13_fcse; /* FCSE PID. */
798 uint32_t c13_context; /* Context ID. */
799+ uint32_t c13_tls; /* Context ID. */
800 uint32_t c15_cpar; /* XScale Coprocessor Access Register */
801 } cp15;
802
803@@ -169,6 +171,15 @@
804 int cpu_arm_signal_handler(int host_signum, void *pinfo,
805 void *puc);
806
807+void cpu_lock(void);
808+void cpu_unlock(void);
809+#if defined(USE_NPTL)
810+static inline void cpu_set_tls(CPUARMState *env, void *newtls)
811+{
812+ env->cp15.c13_tls = (uint32_t)(long)newtls;
813+}
814+#endif
815+
816 #define CPSR_M (0x1f)
817 #define CPSR_T (1 << 5)
818 #define CPSR_F (1 << 6)
819@@ -180,7 +191,11 @@
820 #define CPSR_J (1 << 24)
821 #define CPSR_IT_0_1 (3 << 25)
822 #define CPSR_Q (1 << 27)
823-#define CPSR_NZCV (0xf << 28)
824+#define CPSR_V (1 << 28)
825+#define CPSR_C (1 << 29)
826+#define CPSR_Z (1 << 30)
827+#define CPSR_N (1 << 31)
828+#define CPSR_NZCV (CPSR_N | CPSR_Z | CPSR_C | CPSR_V)
829
830 #define CACHED_CPSR_BITS (CPSR_T | CPSR_Q | CPSR_NZCV)
831 /* Return the current CPSR value. */
832Index: qemu/target-arm/exec.h
833===================================================================
834--- qemu.orig/target-arm/exec.h 2007-06-29 10:47:39.000000000 +0000
835+++ qemu/target-arm/exec.h 2007-06-29 10:47:58.000000000 +0000
836@@ -68,8 +68,6 @@
837
838 /* In op_helper.c */
839
840-void cpu_lock(void);
841-void cpu_unlock(void);
842 void helper_set_cp(CPUState *, uint32_t, uint32_t);
843 uint32_t helper_get_cp(CPUState *, uint32_t);
844 void helper_set_cp15(CPUState *, uint32_t, uint32_t);
845Index: qemu/target-arm/op.c
846===================================================================
847--- qemu.orig/target-arm/op.c 2007-06-29 10:47:39.000000000 +0000
848+++ qemu/target-arm/op.c 2007-06-29 10:47:58.000000000 +0000
849@@ -891,6 +891,12 @@
850 cpu_loop_exit();
851 }
852
853+void OPPROTO op_kernel_trap(void)
854+{
855+ env->exception_index = EXCP_KERNEL_TRAP;
856+ cpu_loop_exit();
857+}
858+
859 /* VFP support. We follow the convention used for VFP instrunctions:
860 Single precition routines have a "s" suffix, double precision a
861 "d" suffix. */
862Index: qemu/target-arm/op_mem.h
863===================================================================
864--- qemu.orig/target-arm/op_mem.h 2007-06-29 10:47:39.000000000 +0000
865+++ qemu/target-arm/op_mem.h 2007-06-29 10:47:58.000000000 +0000
866@@ -1,5 +1,6 @@
867 /* ARM memory operations. */
868
869+void helper_ld(uint32_t);
870 /* Load from address T1 into T0. */
871 #define MEM_LD_OP(name) \
872 void OPPROTO glue(op_ld##name,MEMSUFFIX)(void) \
873Index: qemu/target-arm/translate.c
874===================================================================
875--- qemu.orig/target-arm/translate.c 2007-06-29 10:47:39.000000000 +0000
876+++ qemu/target-arm/translate.c 2007-06-29 10:47:58.000000000 +0000
877@@ -3548,6 +3548,15 @@
878 nb_gen_labels = 0;
879 lj = -1;
880 do {
881+#ifdef CONFIG_USER_ONLY
882+ /* Intercept jump to the magic kernel page. */
883+ if (dc->pc > 0xffff0000) {
884+ gen_op_kernel_trap();
885+ dc->is_jmp = DISAS_UPDATE;
886+ break;
887+ }
888+#endif
889+
890 if (env->nb_breakpoints > 0) {
891 for(j = 0; j < env->nb_breakpoints; j++) {
892 if (env->breakpoints[j] == dc->pc) {
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/qemu-amd64-32b-mapping-0.9.0.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/qemu-amd64-32b-mapping-0.9.0.patch
deleted file mode 100644
index d9303e3464..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/qemu-amd64-32b-mapping-0.9.0.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1--- qemu.orig/linux-user/mmap.c
2+++ qemu/linux-user/mmap.c
3@@ -29,6 +29,10 @@
4
5 //#define DEBUG_MMAP
6
7+#ifndef MAP_32BIT
8+#define MAP_32BIT 0
9+#endif
10+
11 /* NOTE: all the constants are the HOST ones, but addresses are target. */
12 int target_mprotect(target_ulong start, target_ulong len, int prot)
13 {
14@@ -234,7 +238,7 @@
15 host_offset = offset & qemu_host_page_mask;
16 host_len = len + offset - host_offset;
17 host_start = (long)mmap(real_start ? g2h(real_start) : NULL,
18- host_len, prot, flags, fd, host_offset);
19+ host_len, prot, (flags | MAP_32BIT), fd, host_offset);
20 if (host_start == -1)
21 return host_start;
22 /* update start so that it points to the file position at 'offset' */
23@@ -388,7 +392,7 @@
24 int prot;
25
26 /* XXX: use 5 args syscall */
27- new_addr = (long)mremap(g2h(old_addr), old_size, new_size, flags);
28+ new_addr = (long)mremap(g2h(old_addr), old_size, new_size, (flags | MAP_32BIT));
29 if (new_addr == -1)
30 return new_addr;
31 new_addr = h2g(new_addr);
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/workaround_bad_futex_headers.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/workaround_bad_futex_headers.patch
deleted file mode 100644
index cc122ebdba..0000000000
--- a/meta/packages/qemu/qemu-0.9.0+cvs20070613/workaround_bad_futex_headers.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1---
2 linux-user/syscall.c | 10 +++++++++-
3 1 file changed, 9 insertions(+), 1 deletion(-)
4
5Index: qemu/linux-user/syscall.c
6===================================================================
7--- qemu.orig/linux-user/syscall.c 2007-08-09 20:28:06.000000000 +0100
8+++ qemu/linux-user/syscall.c 2007-08-09 20:28:41.000000000 +0100
9@@ -61,7 +61,15 @@
10 #define tchars host_tchars /* same as target */
11 #define ltchars host_ltchars /* same as target */
12
13-#include <linux/futex.h>
14+#define FUTEX_WAIT 0
15+#define FUTEX_WAKE 1
16+#define FUTEX_FD 2
17+#define FUTEX_REQUEUE 3
18+#define FUTEX_CMP_REQUEUE 4
19+#define FUTEX_WAKE_OP 5
20+#define FUTEX_LOCK_PI 6
21+#define FUTEX_UNLOCK_PI 7
22+
23 #include <linux/termios.h>
24 #include <linux/unistd.h>
25 #include <linux/utsname.h>
diff --git a/meta/packages/qemu/qemu-native.inc b/meta/packages/qemu/qemu-native.inc
index 53b869506d..db405c940d 100644
--- a/meta/packages/qemu/qemu-native.inc
+++ b/meta/packages/qemu/qemu-native.inc
@@ -1,4 +1,5 @@
1inherit native 1inherit native
2DEPENDS = "zlib-native" 2
3DEPENDS = "zlib-native gcc-native3"
3 4
4require qemu-gcc3-check.inc 5require qemu-gcc3-check.inc
diff --git a/meta/packages/qemu/qemu-native_20070613.bb b/meta/packages/qemu/qemu-native_20070613.bb
deleted file mode 100644
index 16984a3f6a..0000000000
--- a/meta/packages/qemu/qemu-native_20070613.bb
+++ /dev/null
@@ -1,2 +0,0 @@
1require qemu_${PV}.bb
2require qemu-native.inc
diff --git a/meta/packages/qemu/qemu_0.9.1.bb b/meta/packages/qemu/qemu_0.9.1.bb
index 030eb83507..59aa55bbed 100644
--- a/meta/packages/qemu/qemu_0.9.1.bb
+++ b/meta/packages/qemu/qemu_0.9.1.bb
@@ -1,9 +1,8 @@
1LICENSE = "GPL" 1LICENSE = "GPL"
2DEPENDS = "zlib" 2DEPENDS = "zlib"
3SRCDATE = "20071230"
4PR = "r4" 3PR = "r4"
5 4
6FILESPATH = "${FILE_DIRNAME}/qemu-${PV}:${FILE_DIRNAME}/files" 5FILESPATH = "${FILE_DIRNAME}/qemu-${PV}"
7FILESDIR = "${WORKDIR}" 6FILESDIR = "${WORKDIR}"
8 7
9SRC_URI = "\ 8SRC_URI = "\
@@ -35,15 +34,6 @@ SRC_URI = "\
35 file://configure_symlinkpath_fix.patch;patch=1 \ 34 file://configure_symlinkpath_fix.patch;patch=1 \
36 file://disable-error-in-configure.patch;patch=1" 35 file://disable-error-in-configure.patch;patch=1"
37 36
38# svn://svn.o-hand.com/repos/misc/trunk/qemu-packaging/qemu;module=debian;proto=http;srcdate=20070119 \
39# file://debian/patches/21_net_soopts.patch;patch=1;pnum=0 \
40# file://debian/patches/35_syscall_sockaddr.patch;patch=1;pnum=0 \
41# file://debian/patches/43_arm_cpustate.patch;patch=1;pnum=0 \
42# file://debian/patches/62_linux_boot_nasm.patch;patch=1;pnum=0 \
43# file://debian/patches/67_ppc_ftbfs.patch;patch=1;pnum=0 \
44# file://debian/patches/80_ui_curses.patch;patch=1;pnum=0 \
45# file://debian/patches/96-x.patch;patch=1"
46
47S = "${WORKDIR}/qemu-${PV}" 37S = "${WORKDIR}/qemu-${PV}"
48 38
49#EXTRA_OECONF += "--disable-sdl" 39#EXTRA_OECONF += "--disable-sdl"
diff --git a/meta/packages/qemu/qemu_20070613.bb b/meta/packages/qemu/qemu_20070613.bb
deleted file mode 100644
index 9d4a5c605b..0000000000
--- a/meta/packages/qemu/qemu_20070613.bb
+++ /dev/null
@@ -1,56 +0,0 @@
1LICENSE = "GPL"
2DEPENDS = "zlib"
3SRCDATE = "20070613"
4PV = "0.9.0+cvs${SRCDATE}"
5PR = "r4"
6
7FILESPATH = "${FILE_DIRNAME}/qemu-${PV}:${FILE_DIRNAME}/files"
8FILESDIR = "${WORKDIR}"
9
10SRC_URI = "\
11 cvs://anonymous@cvs.savannah.nongnu.org/sources/qemu;method=pserver;rsh=ssh;module=qemu \
12 file://02_snapshot_use_tmpdir.patch;patch=1;pnum=0 \
13 file://03_machines_list_no_error.patch;patch=1;pnum=0 \
14 file://04_do_not_print_rtc_freq_if_ok.patch;patch=1;pnum=1 \
15 file://05_non-fatal_if_linux_hd_missing.patch;patch=1;pnum=1 \
16 file://06_exit_segfault.patch;patch=1;pnum=0 \
17 file://10_signal_jobs.patch;patch=1;pnum=0 \
18 file://11_signal_sigaction.patch;patch=1;pnum=0 \
19 file://12_signal_powerpc_support.patch;patch=1;pnum=1 \
20 file://22_net_tuntap_stall.patch;patch=1;pnum=0 \
21 file://31_syscalls.patch;patch=1;pnum=0 \
22 file://32_syscall_sysctl.patch;patch=1;pnum=0 \
23 file://33_syscall_ppc_clone.patch;patch=1;pnum=0 \
24 file://39_syscall_fadvise64.patch;patch=1;pnum=0 \
25 file://41_arm_fpa_sigfpe.patch;patch=1;pnum=0 \
26 file://52_ne2000_return.patch;patch=1;pnum=1 \
27 file://61_safe_64bit_int.patch;patch=1;pnum=0 \
28 file://63_sparc_build.patch;patch=1;pnum=0 \
29 file://64_ppc_asm_constraints.patch;patch=1;pnum=1 \
30 file://65_kfreebsd.patch;patch=1;pnum=0 \
31 file://66_tls_ld.patch;patch=1;pnum=0 \
32 file://91-oh-sdl-cursor.patch;patch=1;pnum=0 \
33 file://93-oh-pl110-rgb.patch;patch=1;pnum=0 \
34 file://qemu-0.9.0-nptl.patch;patch=1 \
35 file://qemu-0.9.0-nptl-update.patch;patch=1 \
36 file://qemu-amd64-32b-mapping-0.9.0.patch;patch=1 \
37 file://workaround_bad_futex_headers.patch;patch=1 \
38 file://fix_segfault.patch;patch=1"
39
40# svn://svn.o-hand.com/repos/misc/trunk/qemu-packaging/qemu;module=debian;proto=http;srcdate=20070119 \
41# file://debian/patches/21_net_soopts.patch;patch=1;pnum=0 \
42# file://debian/patches/35_syscall_sockaddr.patch;patch=1;pnum=0 \
43# file://debian/patches/43_arm_cpustate.patch;patch=1;pnum=0 \
44# file://debian/patches/62_linux_boot_nasm.patch;patch=1;pnum=0 \
45# file://debian/patches/67_ppc_ftbfs.patch;patch=1;pnum=0 \
46# file://debian/patches/80_ui_curses.patch;patch=1;pnum=0 \
47# file://debian/patches/96-x.patch;patch=1"
48
49S = "${WORKDIR}/qemu"
50
51#EXTRA_OECONF += "--disable-sdl"
52#EXTRA_OECONF += "--target-list=arm-linux-user"
53EXTRA_OECONF += "--disable-gfx-check"
54
55inherit autotools
56