summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-06-13 11:55:58 +0000
committerRichard Purdie <richard@openedhand.com>2007-06-13 11:55:58 +0000
commitc6a97a06968d062b742d458f86cb8fbf6ab63e99 (patch)
tree3b684d87ce2dcf944ddb0acf1a6c609c9b22036a /meta
parent4b747705b4adc0085f131e2b6bd8f01fe306e59b (diff)
downloadpoky-c6a97a06968d062b742d458f86cb8fbf6ab63e99.tar.gz
qemu: Update to a recent version
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1923 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta')
-rw-r--r--meta/conf/distro/poky.conf4
-rw-r--r--meta/packages/qemu/files/02_snapshot_use_tmpdir.patch23
-rw-r--r--meta/packages/qemu/files/03_machines_list_no_error.patch18
-rw-r--r--meta/packages/qemu/files/04_do_not_print_rtc_freq_if_ok.patch25
-rw-r--r--meta/packages/qemu/files/05_non-fatal_if_linux_hd_missing.patch17
-rw-r--r--meta/packages/qemu/files/06_exit_segfault.patch45
-rw-r--r--meta/packages/qemu/files/10_signal_jobs.patch26
-rw-r--r--meta/packages/qemu/files/11_signal_sigaction.patch21
-rw-r--r--meta/packages/qemu/files/12_signal_powerpc_support.patch401
-rw-r--r--meta/packages/qemu/files/22_net_tuntap_stall.patch18
-rw-r--r--meta/packages/qemu/files/30_syscall_ipc.patch34
-rw-r--r--meta/packages/qemu/files/31_syscalls.patch62
-rw-r--r--meta/packages/qemu/files/32_syscall_sysctl.patch56
-rw-r--r--meta/packages/qemu/files/33_syscall_ppc_clone.patch22
-rw-r--r--meta/packages/qemu/files/39_syscall_fadvise64.patch21
-rw-r--r--meta/packages/qemu/files/41_arm_fpa_sigfpe.patch105
-rw-r--r--meta/packages/qemu/files/52_ne2000_return.patch17
-rw-r--r--meta/packages/qemu/files/61_safe_64bit_int.patch27
-rw-r--r--meta/packages/qemu/files/63_sparc_build.patch18
-rw-r--r--meta/packages/qemu/files/64_ppc_asm_constraints.patch18
-rw-r--r--meta/packages/qemu/files/65_kfreebsd.patch44
-rw-r--r--meta/packages/qemu/files/66_tls_ld.patch55
-rw-r--r--meta/packages/qemu/files/91-oh-sdl-cursor.patch (renamed from meta/packages/qemu/files/qemu-sdl-cursor.patch)15
-rw-r--r--meta/packages/qemu/files/93-oh-pl110-rgb.patch (renamed from meta/packages/qemu/files/pl110_rgb-r0.patch)58
-rw-r--r--meta/packages/qemu/files/94-oh-arm-nptl.patch (renamed from meta/packages/qemu/files/arm_nptl.patch)243
-rw-r--r--meta/packages/qemu/files/compiler.patch10
-rw-r--r--meta/packages/qemu/files/configure.patch13
-rw-r--r--meta/packages/qemu/files/mouse_fix-r0.patch25
-rw-r--r--meta/packages/qemu/files/nodocs_cvs.patch44
-rw-r--r--meta/packages/qemu/files/qemu-pci-irq-sharing.patch52
-rw-r--r--meta/packages/qemu/files/qemu-usb-wacom-0.8.2.patch445
-rw-r--r--meta/packages/qemu/files/qemu-usb-wacom-buttons.patch23
-rw-r--r--meta/packages/qemu/files/qemu-usb-wacom-pressure.patch28
-rw-r--r--meta/packages/qemu/files/qemu-usb-wacom.patch444
-rw-r--r--meta/packages/qemu/files/qemu-x-no-sdl.patch630
-rw-r--r--meta/packages/qemu/qemu_cvs.bb86
36 files changed, 1292 insertions, 1901 deletions
diff --git a/meta/conf/distro/poky.conf b/meta/conf/distro/poky.conf
index 8f607cdc03..86a1cfd4d5 100644
--- a/meta/conf/distro/poky.conf
+++ b/meta/conf/distro/poky.conf
@@ -93,8 +93,8 @@ SRCDATE_screenshot ?= "20070529"
93SRCDATE_xcalibrateext ?= "20051101" 93SRCDATE_xcalibrateext ?= "20051101"
94SRCDATE_libfakekey ?= "20051101" 94SRCDATE_libfakekey ?= "20051101"
95SRCDATE_xcalibrate ?= "20060312" 95SRCDATE_xcalibrate ?= "20060312"
96SRCDATE_qemu ?= "20060723" 96SRCDATE_qemu ?= "20070613"
97SRCDATE_qemu-native ?= "20060723" 97SRCDATE_qemu-native ?= "20070613"
98SRCDATE_oprofile ?= "20070529" 98SRCDATE_oprofile ?= "20070529"
99SRCDATE_oprofileui ?= "20070529" 99SRCDATE_oprofileui ?= "20070529"
100SRCDATE_zaurusd ?= "20070529" 100SRCDATE_zaurusd ?= "20070529"
diff --git a/meta/packages/qemu/files/02_snapshot_use_tmpdir.patch b/meta/packages/qemu/files/02_snapshot_use_tmpdir.patch
new file mode 100644
index 0000000000..bd955b6db3
--- /dev/null
+++ b/meta/packages/qemu/files/02_snapshot_use_tmpdir.patch
@@ -0,0 +1,23 @@
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/files/03_machines_list_no_error.patch b/meta/packages/qemu/files/03_machines_list_no_error.patch
new file mode 100644
index 0000000000..73f31550fe
--- /dev/null
+++ b/meta/packages/qemu/files/03_machines_list_no_error.patch
@@ -0,0 +1,18 @@
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/files/04_do_not_print_rtc_freq_if_ok.patch b/meta/packages/qemu/files/04_do_not_print_rtc_freq_if_ok.patch
new file mode 100644
index 0000000000..1575cbce63
--- /dev/null
+++ b/meta/packages/qemu/files/04_do_not_print_rtc_freq_if_ok.patch
@@ -0,0 +1,25 @@
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/files/05_non-fatal_if_linux_hd_missing.patch b/meta/packages/qemu/files/05_non-fatal_if_linux_hd_missing.patch
new file mode 100644
index 0000000000..b7c4732f24
--- /dev/null
+++ b/meta/packages/qemu/files/05_non-fatal_if_linux_hd_missing.patch
@@ -0,0 +1,17 @@
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/files/06_exit_segfault.patch b/meta/packages/qemu/files/06_exit_segfault.patch
new file mode 100644
index 0000000000..447c3550b8
--- /dev/null
+++ b/meta/packages/qemu/files/06_exit_segfault.patch
@@ -0,0 +1,45 @@
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/files/10_signal_jobs.patch b/meta/packages/qemu/files/10_signal_jobs.patch
new file mode 100644
index 0000000000..794a538676
--- /dev/null
+++ b/meta/packages/qemu/files/10_signal_jobs.patch
@@ -0,0 +1,26 @@
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/files/11_signal_sigaction.patch b/meta/packages/qemu/files/11_signal_sigaction.patch
new file mode 100644
index 0000000000..5446efc562
--- /dev/null
+++ b/meta/packages/qemu/files/11_signal_sigaction.patch
@@ -0,0 +1,21 @@
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/files/12_signal_powerpc_support.patch b/meta/packages/qemu/files/12_signal_powerpc_support.patch
new file mode 100644
index 0000000000..d8d4198784
--- /dev/null
+++ b/meta/packages/qemu/files/12_signal_powerpc_support.patch
@@ -0,0 +1,401 @@
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/files/22_net_tuntap_stall.patch b/meta/packages/qemu/files/22_net_tuntap_stall.patch
new file mode 100644
index 0000000000..e9b31dfe40
--- /dev/null
+++ b/meta/packages/qemu/files/22_net_tuntap_stall.patch
@@ -0,0 +1,18 @@
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/files/30_syscall_ipc.patch b/meta/packages/qemu/files/30_syscall_ipc.patch
new file mode 100644
index 0000000000..3dc58102ad
--- /dev/null
+++ b/meta/packages/qemu/files/30_syscall_ipc.patch
@@ -0,0 +1,34 @@
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/files/31_syscalls.patch b/meta/packages/qemu/files/31_syscalls.patch
new file mode 100644
index 0000000000..e7a1b338f3
--- /dev/null
+++ b/meta/packages/qemu/files/31_syscalls.patch
@@ -0,0 +1,62 @@
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:
50Index: Makefile.target
51===================================================================
52--- Makefile.target.orig 2007-06-13 11:51:52.000000000 +0100
53+++ Makefile.target 2007-06-13 11:51:54.000000000 +0100
54@@ -215,7 +215,7 @@ OP_LDFLAGS+=$(OS_LDFLAGS) $(ARCH_LDFLAGS
55 #########################################################
56
57 CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
58-LIBS+=-lm
59+LIBS+=-lm -lrt
60 ifndef CONFIG_USER_ONLY
61 LIBS+=-lz
62 endif
diff --git a/meta/packages/qemu/files/32_syscall_sysctl.patch b/meta/packages/qemu/files/32_syscall_sysctl.patch
new file mode 100644
index 0000000000..d175cf96ba
--- /dev/null
+++ b/meta/packages/qemu/files/32_syscall_sysctl.patch
@@ -0,0 +1,56 @@
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/files/33_syscall_ppc_clone.patch b/meta/packages/qemu/files/33_syscall_ppc_clone.patch
new file mode 100644
index 0000000000..a71f8b1944
--- /dev/null
+++ b/meta/packages/qemu/files/33_syscall_ppc_clone.patch
@@ -0,0 +1,22 @@
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/files/39_syscall_fadvise64.patch b/meta/packages/qemu/files/39_syscall_fadvise64.patch
new file mode 100644
index 0000000000..0a7f4c48dd
--- /dev/null
+++ b/meta/packages/qemu/files/39_syscall_fadvise64.patch
@@ -0,0 +1,21 @@
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/files/41_arm_fpa_sigfpe.patch b/meta/packages/qemu/files/41_arm_fpa_sigfpe.patch
new file mode 100644
index 0000000000..d579dbc66e
--- /dev/null
+++ b/meta/packages/qemu/files/41_arm_fpa_sigfpe.patch
@@ -0,0 +1,105 @@
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/files/52_ne2000_return.patch b/meta/packages/qemu/files/52_ne2000_return.patch
new file mode 100644
index 0000000000..f0316c8042
--- /dev/null
+++ b/meta/packages/qemu/files/52_ne2000_return.patch
@@ -0,0 +1,17 @@
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/files/61_safe_64bit_int.patch b/meta/packages/qemu/files/61_safe_64bit_int.patch
new file mode 100644
index 0000000000..553e57623e
--- /dev/null
+++ b/meta/packages/qemu/files/61_safe_64bit_int.patch
@@ -0,0 +1,27 @@
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/files/63_sparc_build.patch b/meta/packages/qemu/files/63_sparc_build.patch
new file mode 100644
index 0000000000..32a6bc0ee0
--- /dev/null
+++ b/meta/packages/qemu/files/63_sparc_build.patch
@@ -0,0 +1,18 @@
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/files/64_ppc_asm_constraints.patch b/meta/packages/qemu/files/64_ppc_asm_constraints.patch
new file mode 100644
index 0000000000..e4858b79d7
--- /dev/null
+++ b/meta/packages/qemu/files/64_ppc_asm_constraints.patch
@@ -0,0 +1,18 @@
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/files/65_kfreebsd.patch b/meta/packages/qemu/files/65_kfreebsd.patch
new file mode 100644
index 0000000000..ea060811a1
--- /dev/null
+++ b/meta/packages/qemu/files/65_kfreebsd.patch
@@ -0,0 +1,44 @@
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/files/66_tls_ld.patch b/meta/packages/qemu/files/66_tls_ld.patch
new file mode 100644
index 0000000000..54e02eff8b
--- /dev/null
+++ b/meta/packages/qemu/files/66_tls_ld.patch
@@ -0,0 +1,55 @@
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/files/qemu-sdl-cursor.patch b/meta/packages/qemu/files/91-oh-sdl-cursor.patch
index bd6a51a1f5..5280a5bd4a 100644
--- a/meta/packages/qemu/files/qemu-sdl-cursor.patch
+++ b/meta/packages/qemu/files/91-oh-sdl-cursor.patch
@@ -1,9 +1,14 @@
1Index: qemu/sdl.c 1=== modified file 'sdl.c'
2---
3 sdl.c | 2 +-
4 1 file changed, 1 insertion(+), 1 deletion(-)
5
6Index: sdl.c
2=================================================================== 7===================================================================
3--- qemu.orig/sdl.c 2006-10-02 17:06:12.000000000 +0100 8--- sdl.c.orig 2007-06-13 11:48:22.000000000 +0100
4+++ qemu/sdl.c 2006-10-02 17:06:59.000000000 +0100 9+++ sdl.c 2007-06-13 11:51:56.000000000 +0100
5@@ -287,7 +287,7 @@ 10@@ -241,7 +241,7 @@ static void sdl_hide_cursor(void)
6 { 11
7 if (kbd_mouse_is_absolute()) { 12 if (kbd_mouse_is_absolute()) {
8 SDL_ShowCursor(1); 13 SDL_ShowCursor(1);
9- SDL_SetCursor(sdl_cursor_hidden); 14- SDL_SetCursor(sdl_cursor_hidden);
diff --git a/meta/packages/qemu/files/pl110_rgb-r0.patch b/meta/packages/qemu/files/93-oh-pl110-rgb.patch
index 09e5898d3a..4911ac131f 100644
--- a/meta/packages/qemu/files/pl110_rgb-r0.patch
+++ b/meta/packages/qemu/files/93-oh-pl110-rgb.patch
@@ -1,7 +1,13 @@
1Index: qemu/hw/pl110.c 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
2=================================================================== 8===================================================================
3--- qemu.orig/hw/pl110.c 2006-04-11 21:49:46.000000000 +0100 9--- hw/pl110.c.orig 2007-06-13 11:48:22.000000000 +0100
4+++ qemu/hw/pl110.c 2006-05-24 22:53:00.000000000 +0100 10+++ hw/pl110.c 2007-06-13 11:51:57.000000000 +0100
5@@ -10,6 +10,7 @@ 11@@ -10,6 +10,7 @@
6 #include "vl.h" 12 #include "vl.h"
7 13
@@ -10,7 +16,7 @@ Index: qemu/hw/pl110.c
10 #define PL110_CR_BEBO 0x200 16 #define PL110_CR_BEBO 0x200
11 #define PL110_CR_BEPO 0x400 17 #define PL110_CR_BEPO 0x400
12 #define PL110_CR_PWR 0x800 18 #define PL110_CR_PWR 0x800
13@@ -115,6 +116,7 @@ 19@@ -114,6 +115,7 @@ static void pl110_update_display(void *o
14 int first, last = 0; 20 int first, last = 0;
15 int dirty, new_dirty; 21 int dirty, new_dirty;
16 int i; 22 int i;
@@ -18,7 +24,7 @@ Index: qemu/hw/pl110.c
18 24
19 if (!pl110_enabled(s)) 25 if (!pl110_enabled(s))
20 return; 26 return;
21@@ -146,12 +148,17 @@ 27@@ -145,12 +147,17 @@ static void pl110_update_display(void *o
22 fprintf(stderr, "pl110: Bad color depth\n"); 28 fprintf(stderr, "pl110: Bad color depth\n");
23 exit(1); 29 exit(1);
24 } 30 }
@@ -39,10 +45,10 @@ Index: qemu/hw/pl110.c
39 45
40 src_width = s->cols; 46 src_width = s->cols;
41 switch (s->bpp) { 47 switch (s->bpp) {
42Index: qemu/hw/pl110_template.h 48Index: hw/pl110_template.h
43=================================================================== 49===================================================================
44--- qemu.orig/hw/pl110_template.h 2006-02-19 12:31:32.000000000 +0000 50--- hw/pl110_template.h.orig 2007-06-13 11:48:22.000000000 +0100
45+++ qemu/hw/pl110_template.h 2006-05-24 23:04:03.000000000 +0100 51+++ hw/pl110_template.h 2007-06-13 11:51:57.000000000 +0100
46@@ -24,6 +24,16 @@ 52@@ -24,6 +24,16 @@
47 #error unknown bit depth 53 #error unknown bit depth
48 #endif 54 #endif
@@ -70,34 +76,32 @@ Index: qemu/hw/pl110_template.h
70- glue(pl110_draw_line8_lblp,BITS), 76- glue(pl110_draw_line8_lblp,BITS),
71- glue(pl110_draw_line16_lblp,BITS), 77- glue(pl110_draw_line16_lblp,BITS),
72- glue(pl110_draw_line32_lblp,BITS), 78- glue(pl110_draw_line32_lblp,BITS),
73-
74- glue(pl110_draw_line1_bbbp,BITS),
75- glue(pl110_draw_line2_bbbp,BITS),
76- glue(pl110_draw_line4_bbbp,BITS),
77- glue(pl110_draw_line8_bbbp,BITS),
78- glue(pl110_draw_line16_bbbp,BITS),
79- glue(pl110_draw_line32_bbbp,BITS),
80-
81- glue(pl110_draw_line1_lbbp,BITS),
82- glue(pl110_draw_line2_lbbp,BITS),
83- glue(pl110_draw_line4_lbbp,BITS),
84- glue(pl110_draw_line8_lbbp,BITS),
85- glue(pl110_draw_line16_lbbp,BITS),
86- glue(pl110_draw_line32_lbbp,BITS)
87+ glue(pl110_draw_line1_lblp_bgr,BITS), 79+ glue(pl110_draw_line1_lblp_bgr,BITS),
88+ glue(pl110_draw_line2_lblp_bgr,BITS), 80+ glue(pl110_draw_line2_lblp_bgr,BITS),
89+ glue(pl110_draw_line4_lblp_bgr,BITS), 81+ glue(pl110_draw_line4_lblp_bgr,BITS),
90+ glue(pl110_draw_line8_lblp_bgr,BITS), 82+ glue(pl110_draw_line8_lblp_bgr,BITS),
91+ glue(pl110_draw_line16_lblp_bgr,BITS), 83+ glue(pl110_draw_line16_lblp_bgr,BITS),
92+ glue(pl110_draw_line32_lblp_bgr,BITS), 84+ glue(pl110_draw_line32_lblp_bgr,BITS),
93+ 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),
94+ glue(pl110_draw_line1_bbbp_bgr,BITS), 92+ glue(pl110_draw_line1_bbbp_bgr,BITS),
95+ glue(pl110_draw_line2_bbbp_bgr,BITS), 93+ glue(pl110_draw_line2_bbbp_bgr,BITS),
96+ glue(pl110_draw_line4_bbbp_bgr,BITS), 94+ glue(pl110_draw_line4_bbbp_bgr,BITS),
97+ glue(pl110_draw_line8_bbbp_bgr,BITS), 95+ glue(pl110_draw_line8_bbbp_bgr,BITS),
98+ glue(pl110_draw_line16_bbbp_bgr,BITS), 96+ glue(pl110_draw_line16_bbbp_bgr,BITS),
99+ glue(pl110_draw_line32_bbbp_bgr,BITS), 97+ glue(pl110_draw_line32_bbbp_bgr,BITS),
100+ 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)
101+ glue(pl110_draw_line1_lbbp_bgr,BITS), 105+ glue(pl110_draw_line1_lbbp_bgr,BITS),
102+ glue(pl110_draw_line2_lbbp_bgr,BITS), 106+ glue(pl110_draw_line2_lbbp_bgr,BITS),
103+ glue(pl110_draw_line4_lbbp_bgr,BITS), 107+ glue(pl110_draw_line4_lbbp_bgr,BITS),
@@ -128,7 +132,7 @@ Index: qemu/hw/pl110_template.h
128 }; 132 };
129 133
130 #undef BITS 134 #undef BITS
131@@ -61,18 +92,18 @@ 135@@ -61,18 +92,18 @@ static drawfn glue(pl110_draw_fn_,BITS)[
132 #else 136 #else
133 137
134 #if ORDER == 0 138 #if ORDER == 0
@@ -150,7 +154,7 @@ Index: qemu/hw/pl110_template.h
150 #ifdef WORDS_BIGENDIAN 154 #ifdef WORDS_BIGENDIAN
151 #define SWAP_WORDS 1 155 #define SWAP_WORDS 1
152 #endif 156 #endif
153@@ -195,27 +226,34 @@ 157@@ -195,27 +226,34 @@ static void glue(pl110_draw_line16_,NAME
154 #ifdef SWAP_WORDS 158 #ifdef SWAP_WORDS
155 data = bswap32(data); 159 data = bswap32(data);
156 #endif 160 #endif
@@ -191,7 +195,7 @@ Index: qemu/hw/pl110_template.h
191 data >>= 5; 195 data >>= 5;
192 COPY_PIXEL(d, glue(rgb_to_pixel,BITS)(r, g, b)); 196 COPY_PIXEL(d, glue(rgb_to_pixel,BITS)(r, g, b));
193 width -= 2; 197 width -= 2;
194@@ -229,14 +267,21 @@ 198@@ -229,14 +267,21 @@ static void glue(pl110_draw_line32_,NAME
195 unsigned int r, g, b; 199 unsigned int r, g, b;
196 while (width > 0) { 200 while (width > 0) {
197 data = *(uint32_t *)src; 201 data = *(uint32_t *)src;
diff --git a/meta/packages/qemu/files/arm_nptl.patch b/meta/packages/qemu/files/94-oh-arm-nptl.patch
index f9b10aebc5..37d7171983 100644
--- a/meta/packages/qemu/files/arm_nptl.patch
+++ b/meta/packages/qemu/files/94-oh-arm-nptl.patch
@@ -1,27 +1,41 @@
1---
2 configure | 29 ++++++
3 exec-all.h | 165 --------------------------------------
4 linux-user/arm/syscall.h | 4
5 linux-user/main.c | 94 ++++++++++++++++++---
6 linux-user/qemu.h | 3
7 linux-user/syscall.c | 90 ++++++++++++++++++--
8 qemu_spinlock.h | 204 +++++++++++++++++++++++++++++++++++++++++++++++
9 target-arm/cpu.h | 19 ++++
10 target-arm/exec.h | 2
11 target-arm/op.c | 6 +
12 target-arm/translate.c | 10 ++
13 11 files changed, 437 insertions(+), 189 deletions(-)
14
1Index: qemu/configure 15Index: qemu/configure
2=================================================================== 16===================================================================
3--- qemu.orig/configure 2006-08-26 16:31:53.000000000 +0100 17--- qemu.orig/configure 2007-06-13 11:51:56.000000000 +0100
4+++ qemu/configure 2006-08-26 16:31:53.000000000 +0100 18+++ qemu/configure 2007-06-13 11:51:57.000000000 +0100
5@@ -97,6 +97,7 @@ 19@@ -101,6 +101,7 @@ linux_user="no"
20 darwin_user="no"
6 build_docs="no" 21 build_docs="no"
7 build_acpi_tables="no"
8 uname_release="" 22 uname_release=""
9+nptl="yes" 23+nptl="yes"
10 24
11 # OS specific 25 # OS specific
12 targetos=`uname -s` 26 targetos=`uname -s`
13@@ -243,6 +244,8 @@ 27@@ -287,6 +288,8 @@ for opt do
14 ;; 28 *) echo "undefined SPARC architecture. Exiting";exit 1;;
15 --enable-iasl) build_acpi_tables="yes" 29 esac
16 ;; 30 ;;
17+ --disable-nptl) nptl="no" 31+ --disable-nptl) nptl="no"
18+ ;; 32+ ;;
19 esac 33 esac
20 done 34 done
21 35
22@@ -441,6 +444,23 @@ 36@@ -530,6 +533,23 @@ int main(void) {
23 fi 37 }
24 fi 38 EOF
25 39
26+# check NPTL support 40+# check NPTL support
27+cat > $TMPC <<EOF 41+cat > $TMPC <<EOF
@@ -43,15 +57,15 @@ Index: qemu/configure
43 ########################################## 57 ##########################################
44 # SDL probe 58 # SDL probe
45 59
46@@ -559,6 +579,7 @@ 60@@ -681,6 +701,7 @@ if test -n "$sparc_cpu"; then
61 echo "Target Sparc Arch $sparc_cpu"
47 fi 62 fi
48 echo "FMOD support $fmod $fmod_support"
49 echo "kqemu support $kqemu" 63 echo "kqemu support $kqemu"
50+echo "NPTL support $nptl" 64+echo "NPTL support $nptl"
51 echo "Documentation $build_docs" 65 echo "Documentation $build_docs"
52 [ ! -z "$uname_release" ] && \ 66 [ ! -z "$uname_release" ] && \
53 echo "uname -r $uname_release" 67 echo "uname -r $uname_release"
54@@ -880,6 +901,14 @@ 68@@ -1063,6 +1084,14 @@ if test "$target_user_only" = "no"; then
55 echo "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak 69 echo "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak
56 fi 70 fi
57 fi 71 fi
@@ -68,13 +82,13 @@ Index: qemu/configure
68 if test "$cocoa" = "yes" ; then 82 if test "$cocoa" = "yes" ; then
69Index: qemu/exec-all.h 83Index: qemu/exec-all.h
70=================================================================== 84===================================================================
71--- qemu.orig/exec-all.h 2006-08-26 16:28:32.000000000 +0100 85--- qemu.orig/exec-all.h 2007-06-13 11:48:22.000000000 +0100
72+++ qemu/exec-all.h 2006-08-26 16:31:53.000000000 +0100 86+++ qemu/exec-all.h 2007-06-13 11:51:57.000000000 +0100
73@@ -347,163 +347,7 @@ 87@@ -360,170 +360,7 @@ extern CPUWriteMemoryFunc *io_mem_write[
74 extern CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4]; 88 extern CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4];
75 extern void *io_mem_opaque[IO_MEM_NB_ENTRIES]; 89 extern void *io_mem_opaque[IO_MEM_NB_ENTRIES];
76 90
77-#ifdef __powerpc__ 91-#if defined(__powerpc__)
78-static inline int testandset (int *p) 92-static inline int testandset (int *p)
79-{ 93-{
80- int ret; 94- int ret;
@@ -90,9 +104,7 @@ Index: qemu/exec-all.h
90- : "cr0", "memory"); 104- : "cr0", "memory");
91- return ret; 105- return ret;
92-} 106-}
93-#endif 107-#elif defined(__i386__)
94-
95-#ifdef __i386__
96-static inline int testandset (int *p) 108-static inline int testandset (int *p)
97-{ 109-{
98- long int readval = 0; 110- long int readval = 0;
@@ -103,9 +115,7 @@ Index: qemu/exec-all.h
103- : "cc"); 115- : "cc");
104- return readval; 116- return readval;
105-} 117-}
106-#endif 118-#elif defined(__x86_64__)
107-
108-#ifdef __x86_64__
109-static inline int testandset (int *p) 119-static inline int testandset (int *p)
110-{ 120-{
111- long int readval = 0; 121- long int readval = 0;
@@ -116,9 +126,7 @@ Index: qemu/exec-all.h
116- : "cc"); 126- : "cc");
117- return readval; 127- return readval;
118-} 128-}
119-#endif 129-#elif defined(__s390__)
120-
121-#ifdef __s390__
122-static inline int testandset (int *p) 130-static inline int testandset (int *p)
123-{ 131-{
124- int ret; 132- int ret;
@@ -130,9 +138,7 @@ Index: qemu/exec-all.h
130- : "cc", "memory" ); 138- : "cc", "memory" );
131- return ret; 139- return ret;
132-} 140-}
133-#endif 141-#elif defined(__alpha__)
134-
135-#ifdef __alpha__
136-static inline int testandset (int *p) 142-static inline int testandset (int *p)
137-{ 143-{
138- int ret; 144- int ret;
@@ -149,9 +155,7 @@ Index: qemu/exec-all.h
149- : "m" (*p)); 155- : "m" (*p));
150- return ret; 156- return ret;
151-} 157-}
152-#endif 158-#elif defined(__sparc__)
153-
154-#ifdef __sparc__
155-static inline int testandset (int *p) 159-static inline int testandset (int *p)
156-{ 160-{
157- int ret; 161- int ret;
@@ -163,9 +167,7 @@ Index: qemu/exec-all.h
163- 167-
164- return (ret ? 1 : 0); 168- return (ret ? 1 : 0);
165-} 169-}
166-#endif 170-#elif defined(__arm__)
167-
168-#ifdef __arm__
169-static inline int testandset (int *spinlock) 171-static inline int testandset (int *spinlock)
170-{ 172-{
171- register unsigned int ret; 173- register unsigned int ret;
@@ -175,9 +177,7 @@ Index: qemu/exec-all.h
175- 177-
176- return ret; 178- return ret;
177-} 179-}
178-#endif 180-#elif defined(__mc68000)
179-
180-#ifdef __mc68000
181-static inline int testandset (int *p) 181-static inline int testandset (int *p)
182-{ 182-{
183- char ret; 183- char ret;
@@ -187,15 +187,36 @@ Index: qemu/exec-all.h
187- : "cc","memory"); 187- : "cc","memory");
188- return ret; 188- return ret;
189-} 189-}
190-#endif 190-#elif defined(__ia64)
191- 191-
192-#ifdef __ia64
193-#include <ia64intrin.h> 192-#include <ia64intrin.h>
194- 193-
195-static inline int testandset (int *p) 194-static inline int testandset (int *p)
196-{ 195-{
197- return __sync_lock_test_and_set (p, 1); 196- return __sync_lock_test_and_set (p, 1);
198-} 197-}
198-#elif defined(__mips__)
199-static inline int testandset (int *p)
200-{
201- int ret;
202-
203- __asm__ __volatile__ (
204- " .set push \n"
205- " .set noat \n"
206- " .set mips2 \n"
207- "1: li $1, 1 \n"
208- " ll %0, %1 \n"
209- " sc $1, %1 \n"
210- " beqz $1, 1b \n"
211- " .set pop "
212- : "=r" (ret), "+R" (*p)
213- :
214- : "memory");
215-
216- return ret;
217-}
218-#else
219-#error unimplemented CPU support
199-#endif 220-#endif
200- 221-
201-typedef int spinlock_t; 222-typedef int spinlock_t;
@@ -237,9 +258,9 @@ Index: qemu/exec-all.h
237 258
238Index: qemu/linux-user/arm/syscall.h 259Index: qemu/linux-user/arm/syscall.h
239=================================================================== 260===================================================================
240--- qemu.orig/linux-user/arm/syscall.h 2006-03-09 19:18:11.000000000 +0000 261--- qemu.orig/linux-user/arm/syscall.h 2007-06-13 11:48:22.000000000 +0100
241+++ qemu/linux-user/arm/syscall.h 2006-08-26 16:31:53.000000000 +0100 262+++ qemu/linux-user/arm/syscall.h 2007-06-13 11:51:57.000000000 +0100
242@@ -28,7 +28,9 @@ 263@@ -28,7 +28,9 @@ struct target_pt_regs {
243 #define ARM_SYSCALL_BASE 0x900000 264 #define ARM_SYSCALL_BASE 0x900000
244 #define ARM_THUMB_SYSCALL 0 265 #define ARM_THUMB_SYSCALL 0
245 266
@@ -252,9 +273,9 @@ Index: qemu/linux-user/arm/syscall.h
252 #define ARM_NR_thumb_semihosting 0xAB 273 #define ARM_NR_thumb_semihosting 0xAB
253Index: qemu/linux-user/main.c 274Index: qemu/linux-user/main.c
254=================================================================== 275===================================================================
255--- qemu.orig/linux-user/main.c 2006-08-26 16:28:40.000000000 +0100 276--- qemu.orig/linux-user/main.c 2007-06-13 11:51:55.000000000 +0100
256+++ qemu/linux-user/main.c 2006-08-26 16:31:53.000000000 +0100 277+++ qemu/linux-user/main.c 2007-06-13 11:51:57.000000000 +0100
257@@ -309,6 +309,50 @@ 278@@ -325,6 +325,50 @@ static void arm_cache_flush(target_ulong
258 } 279 }
259 } 280 }
260 281
@@ -305,7 +326,7 @@ Index: qemu/linux-user/main.c
305 void cpu_loop(CPUARMState *env) 326 void cpu_loop(CPUARMState *env)
306 { 327 {
307 int trapnr; 328 int trapnr;
308@@ -365,10 +409,8 @@ 329@@ -430,10 +474,8 @@ void cpu_loop(CPUARMState *env)
309 } 330 }
310 } 331 }
311 332
@@ -318,7 +339,7 @@ Index: qemu/linux-user/main.c
318 env->regs[0] = do_arm_semihosting (env); 339 env->regs[0] = do_arm_semihosting (env);
319 } else if (n == 0 || n >= ARM_SYSCALL_BASE 340 } else if (n == 0 || n >= ARM_SYSCALL_BASE
320 || (env->thumb && n == ARM_THUMB_SYSCALL)) { 341 || (env->thumb && n == ARM_THUMB_SYSCALL)) {
321@@ -379,14 +421,34 @@ 342@@ -444,14 +486,34 @@ void cpu_loop(CPUARMState *env)
322 n -= ARM_SYSCALL_BASE; 343 n -= ARM_SYSCALL_BASE;
323 env->eabi = 0; 344 env->eabi = 0;
324 } 345 }
@@ -361,7 +382,7 @@ Index: qemu/linux-user/main.c
361 } else { 382 } else {
362 goto error; 383 goto error;
363 } 384 }
364@@ -425,6 +487,10 @@ 385@@ -490,6 +552,10 @@ void cpu_loop(CPUARMState *env)
365 } 386 }
366 } 387 }
367 break; 388 break;
@@ -372,23 +393,23 @@ Index: qemu/linux-user/main.c
372 default: 393 default:
373 error: 394 error:
374 fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n", 395 fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n",
375@@ -1639,6 +1705,10 @@ 396@@ -2096,6 +2162,10 @@ int main(int argc, char **argv)
376 ts->heap_base = info->brk; 397 ts->heap_base = info->brk;
377 /* This will be filled in on the first SYS_HEAPINFO call. */ 398 /* This will be filled in on the first SYS_HEAPINFO call. */
378 ts->heap_limit = 0; 399 ts->heap_limit = 0;
379+ /* Register the magic kernel code page. The cpu will generate a 400+ /* Register the magic kernel code page. The cpu will generate a
380+ special exception when it tries to execute code here. We can't 401+ special exception when it tries to execute code here. We can't
381+ put real code here because it may be in use by the host kernel. */ 402+ put real code here because it may be in use by the host kernel. */
382+ page_set_flags(0xffff0000, 0xffff0fff, 0); 403+ page_set_flags(0xffff0000, 0xffff0fff, 0);
383 } 404 #endif
384 #elif defined(TARGET_SPARC) 405
385 { 406 if (gdbstub_port) {
386Index: qemu/linux-user/qemu.h 407Index: qemu/linux-user/qemu.h
387=================================================================== 408===================================================================
388--- qemu.orig/linux-user/qemu.h 2006-08-26 16:28:40.000000000 +0100 409--- qemu.orig/linux-user/qemu.h 2007-06-13 11:48:22.000000000 +0100
389+++ qemu/linux-user/qemu.h 2006-08-26 16:33:50.000000000 +0100 410+++ qemu/linux-user/qemu.h 2007-06-13 11:51:57.000000000 +0100
390@@ -75,6 +75,9 @@ 411@@ -81,6 +81,9 @@ typedef struct TaskState {
391 uint32_t v86mask; 412 uint32_t heap_limit;
392 #endif 413 #endif
393 int used; /* non zero if used */ 414 int used; /* non zero if used */
394+#ifdef USE_NPTL 415+#ifdef USE_NPTL
@@ -399,9 +420,9 @@ Index: qemu/linux-user/qemu.h
399 } __attribute__((aligned(16))) TaskState; 420 } __attribute__((aligned(16))) TaskState;
400Index: qemu/linux-user/syscall.c 421Index: qemu/linux-user/syscall.c
401=================================================================== 422===================================================================
402--- qemu.orig/linux-user/syscall.c 2006-08-26 16:28:40.000000000 +0100 423--- qemu.orig/linux-user/syscall.c 2007-06-13 11:51:55.000000000 +0100
403+++ qemu/linux-user/syscall.c 2006-08-26 16:31:53.000000000 +0100 424+++ qemu/linux-user/syscall.c 2007-06-13 11:51:57.000000000 +0100
404@@ -66,9 +66,18 @@ 425@@ -71,9 +71,18 @@
405 #include <linux/kd.h> 426 #include <linux/kd.h>
406 427
407 #include "qemu.h" 428 #include "qemu.h"
@@ -417,10 +438,10 @@ Index: qemu/linux-user/syscall.c
417+#define CLONE_NPTL_FLAGS2 0 438+#define CLONE_NPTL_FLAGS2 0
418+#endif 439+#endif
419+ 440+
420 #if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC) 441 #if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC) \
442 || defined(TARGET_M68K) || defined(TARGET_SH4)
421 /* 16 bit uid wrappers emulation */ 443 /* 16 bit uid wrappers emulation */
422 #define USE_UID16 444@@ -2121,20 +2130,38 @@ int do_modify_ldt(CPUX86State *env, int
423@@ -1602,20 +1611,38 @@
424 thread/process */ 445 thread/process */
425 #define NEW_STACK_SIZE 8192 446 #define NEW_STACK_SIZE 8192
426 447
@@ -460,7 +481,7 @@ Index: qemu/linux-user/syscall.c
460 481
461 if (flags & CLONE_VM) { 482 if (flags & CLONE_VM) {
462 ts = malloc(sizeof(TaskState) + NEW_STACK_SIZE); 483 ts = malloc(sizeof(TaskState) + NEW_STACK_SIZE);
463@@ -1665,16 +1692,60 @@ 484@@ -2197,16 +2224,60 @@ int do_fork(CPUState *env, unsigned int
464 #error unsupported target CPU 485 #error unsupported target CPU
465 #endif 486 #endif
466 new_env->opaque = ts; 487 new_env->opaque = ts;
@@ -525,16 +546,16 @@ Index: qemu/linux-user/syscall.c
525 } 546 }
526 return ret; 547 return ret;
527 } 548 }
528@@ -1918,7 +1989,7 @@ 549@@ -2483,7 +2554,7 @@ long do_syscall(void *cpu_env, int num,
529 ret = do_brk(arg1); 550 ret = do_brk(arg1);
530 break; 551 break;
531 case TARGET_NR_fork: 552 case TARGET_NR_fork:
532- ret = get_errno(do_fork(cpu_env, SIGCHLD, 0)); 553- ret = get_errno(do_fork(cpu_env, SIGCHLD, 0));
533+ ret = get_errno(do_fork(cpu_env, SIGCHLD, 0, NULL, NULL, NULL)); 554+ ret = get_errno(do_fork(cpu_env, SIGCHLD, 0, NULL, NULL, NULL));
534 break; 555 break;
556 #ifdef TARGET_NR_waitpid
535 case TARGET_NR_waitpid: 557 case TARGET_NR_waitpid:
536 { 558@@ -3648,7 +3719,8 @@ long do_syscall(void *cpu_env, int num,
537@@ -2989,7 +3060,8 @@
538 ret = get_errno(fsync(arg1)); 559 ret = get_errno(fsync(arg1));
539 break; 560 break;
540 case TARGET_NR_clone: 561 case TARGET_NR_clone:
@@ -544,7 +565,7 @@ Index: qemu/linux-user/syscall.c
544 break; 565 break;
545 #ifdef __NR_exit_group 566 #ifdef __NR_exit_group
546 /* new thread calls */ 567 /* new thread calls */
547@@ -3339,7 +3411,8 @@ 568@@ -4062,7 +4134,8 @@ long do_syscall(void *cpu_env, int num,
548 #endif 569 #endif
549 #ifdef TARGET_NR_vfork 570 #ifdef TARGET_NR_vfork
550 case TARGET_NR_vfork: 571 case TARGET_NR_vfork:
@@ -554,16 +575,16 @@ Index: qemu/linux-user/syscall.c
554 break; 575 break;
555 #endif 576 #endif
556 #ifdef TARGET_NR_ugetrlimit 577 #ifdef TARGET_NR_ugetrlimit
557@@ -3838,4 +3911,3 @@ 578@@ -4660,4 +4733,3 @@ long do_syscall(void *cpu_env, int num,
558 #endif 579 #endif
559 return ret; 580 return ret;
560 } 581 }
561- 582-
562Index: qemu/target-arm/cpu.h 583Index: qemu/target-arm/cpu.h
563=================================================================== 584===================================================================
564--- qemu.orig/target-arm/cpu.h 2006-03-09 19:18:27.000000000 +0000 585--- qemu.orig/target-arm/cpu.h 2007-06-13 11:48:22.000000000 +0100
565+++ qemu/target-arm/cpu.h 2006-08-26 16:31:53.000000000 +0100 586+++ qemu/target-arm/cpu.h 2007-06-13 11:51:57.000000000 +0100
566@@ -35,6 +35,9 @@ 587@@ -37,6 +37,9 @@
567 #define EXCP_IRQ 5 588 #define EXCP_IRQ 5
568 #define EXCP_FIQ 6 589 #define EXCP_FIQ 6
569 #define EXCP_BKPT 7 590 #define EXCP_BKPT 7
@@ -571,18 +592,18 @@ Index: qemu/target-arm/cpu.h
571+ 592+
572+ 593+
573 594
574 /* We currently assume float and double are IEEE single and double 595 typedef void ARMWriteCPFunc(void *opaque, int cp_info,
575 precision respectively. 596 int srcreg, int operand, uint32_t value);
576@@ -85,6 +88,7 @@ 597@@ -97,6 +100,7 @@ typedef struct CPUARMState {
577 uint32_t c9_data; 598 uint32_t c9_data;
578 uint32_t c13_fcse; /* FCSE PID. */ 599 uint32_t c13_fcse; /* FCSE PID. */
579 uint32_t c13_context; /* Context ID. */ 600 uint32_t c13_context; /* Context ID. */
580+ uint32_t c13_tls; /* Paul Brook told me to just add this ;) */ 601+ uint32_t c13_tls; /* Paul Brook told me to just add this ;) */
602 uint32_t c15_cpar; /* XScale Coprocessor Access Register */
581 } cp15; 603 } cp15;
582 604
583 /* Internal CPU feature flags. */ 605@@ -169,6 +173,15 @@ void switch_mode(CPUARMState *, int);
584@@ -135,6 +139,15 @@ 606 int cpu_arm_signal_handler(int host_signum, void *pinfo,
585 int cpu_arm_signal_handler(int host_signum, struct siginfo *info,
586 void *puc); 607 void *puc);
587 608
588+void cpu_lock(void); 609+void cpu_lock(void);
@@ -597,7 +618,7 @@ Index: qemu/target-arm/cpu.h
597 #define CPSR_M (0x1f) 618 #define CPSR_M (0x1f)
598 #define CPSR_T (1 << 5) 619 #define CPSR_T (1 << 5)
599 #define CPSR_F (1 << 6) 620 #define CPSR_F (1 << 6)
600@@ -146,7 +159,11 @@ 621@@ -180,7 +193,11 @@ int cpu_arm_signal_handler(int host_sign
601 #define CPSR_J (1 << 24) 622 #define CPSR_J (1 << 24)
602 #define CPSR_IT_0_1 (3 << 25) 623 #define CPSR_IT_0_1 (3 << 25)
603 #define CPSR_Q (1 << 27) 624 #define CPSR_Q (1 << 27)
@@ -612,22 +633,22 @@ Index: qemu/target-arm/cpu.h
612 /* Return the current CPSR value. */ 633 /* Return the current CPSR value. */
613Index: qemu/target-arm/exec.h 634Index: qemu/target-arm/exec.h
614=================================================================== 635===================================================================
615--- qemu.orig/target-arm/exec.h 2006-03-09 19:18:27.000000000 +0000 636--- qemu.orig/target-arm/exec.h 2007-06-13 11:48:22.000000000 +0100
616+++ qemu/target-arm/exec.h 2006-08-26 16:31:53.000000000 +0100 637+++ qemu/target-arm/exec.h 2007-06-13 11:51:57.000000000 +0100
617@@ -51,8 +51,6 @@ 638@@ -68,8 +68,6 @@ static inline int cpu_halted(CPUState *e
618 639
619 /* In op_helper.c */ 640 /* In op_helper.c */
620 641
621-void cpu_lock(void); 642-void cpu_lock(void);
622-void cpu_unlock(void); 643-void cpu_unlock(void);
644 void helper_set_cp(CPUState *, uint32_t, uint32_t);
645 uint32_t helper_get_cp(CPUState *, uint32_t);
623 void helper_set_cp15(CPUState *, uint32_t, uint32_t); 646 void helper_set_cp15(CPUState *, uint32_t, uint32_t);
624 uint32_t helper_get_cp15(CPUState *, uint32_t);
625
626Index: qemu/target-arm/op.c 647Index: qemu/target-arm/op.c
627=================================================================== 648===================================================================
628--- qemu.orig/target-arm/op.c 2006-08-26 16:28:48.000000000 +0100 649--- qemu.orig/target-arm/op.c 2007-06-13 11:48:22.000000000 +0100
629+++ qemu/target-arm/op.c 2006-08-26 16:31:53.000000000 +0100 650+++ qemu/target-arm/op.c 2007-06-13 11:51:57.000000000 +0100
630@@ -891,6 +891,12 @@ 651@@ -891,6 +891,12 @@ void OPPROTO op_bkpt(void)
631 cpu_loop_exit(); 652 cpu_loop_exit();
632 } 653 }
633 654
@@ -642,9 +663,9 @@ Index: qemu/target-arm/op.c
642 "d" suffix. */ 663 "d" suffix. */
643Index: qemu/target-arm/translate.c 664Index: qemu/target-arm/translate.c
644=================================================================== 665===================================================================
645--- qemu.orig/target-arm/translate.c 2006-08-26 16:28:48.000000000 +0100 666--- qemu.orig/target-arm/translate.c 2007-06-13 11:48:22.000000000 +0100
646+++ qemu/target-arm/translate.c 2006-08-26 16:31:53.000000000 +0100 667+++ qemu/target-arm/translate.c 2007-06-13 11:51:57.000000000 +0100
647@@ -2382,6 +2382,7 @@ 668@@ -3513,6 +3513,7 @@ undef:
648 s->is_jmp = DISAS_JUMP; 669 s->is_jmp = DISAS_JUMP;
649 } 670 }
650 671
@@ -652,7 +673,7 @@ Index: qemu/target-arm/translate.c
652 /* generate intermediate code in gen_opc_buf and gen_opparam_buf for 673 /* generate intermediate code in gen_opc_buf and gen_opparam_buf for
653 basic block 'tb'. If search_pc is TRUE, also generate PC 674 basic block 'tb'. If search_pc is TRUE, also generate PC
654 information for each intermediate instruction. */ 675 information for each intermediate instruction. */
655@@ -2416,6 +2417,15 @@ 676@@ -3548,6 +3549,15 @@ static inline int gen_intermediate_code_
656 nb_gen_labels = 0; 677 nb_gen_labels = 0;
657 lj = -1; 678 lj = -1;
658 do { 679 do {
@@ -671,8 +692,8 @@ Index: qemu/target-arm/translate.c
671Index: qemu/qemu_spinlock.h 692Index: qemu/qemu_spinlock.h
672=================================================================== 693===================================================================
673--- /dev/null 1970-01-01 00:00:00.000000000 +0000 694--- /dev/null 1970-01-01 00:00:00.000000000 +0000
674+++ qemu/qemu_spinlock.h 2006-08-26 16:31:53.000000000 +0100 695+++ qemu/qemu_spinlock.h 2007-06-13 11:51:57.000000000 +0100
675@@ -0,0 +1,182 @@ 696@@ -0,0 +1,204 @@
676+/* 697+/*
677+ * internal execution defines for qemu 698+ * internal execution defines for qemu
678+ * 699+ *
@@ -820,6 +841,28 @@ Index: qemu/qemu_spinlock.h
820+} 841+}
821+#endif 842+#endif
822+ 843+
844+#ifdef __mips__
845+static inline int testandset (int *p)
846+{
847+ int ret;
848+
849+ __asm__ __volatile__ (
850+ " .set push \n"
851+ " .set noat \n"
852+ " .set mips2 \n"
853+ "1: li $1, 1 \n"
854+ " ll %0, %1 \n"
855+ " sc $1, %1 \n"
856+ " beqz $1, 1b \n"
857+ " .set pop "
858+ : "=r" (ret), "+R" (*p)
859+ :
860+ : "memory");
861+
862+ return ret;
863+}
864+#endif
865+
823+typedef int spinlock_t; 866+typedef int spinlock_t;
824+ 867+
825+#define SPIN_LOCK_UNLOCKED 0 868+#define SPIN_LOCK_UNLOCKED 0
diff --git a/meta/packages/qemu/files/compiler.patch b/meta/packages/qemu/files/compiler.patch
deleted file mode 100644
index dad18b3a61..0000000000
--- a/meta/packages/qemu/files/compiler.patch
+++ /dev/null
@@ -1,10 +0,0 @@
1--- qemu/usb-linux.c~ 2006-07-19 19:06:15.000000000 +0100
2+++ qemu/usb-linux.c 2006-10-02 12:49:00.000000000 +0100
3@@ -26,7 +26,6 @@
4 #if defined(__linux__)
5 #include <dirent.h>
6 #include <sys/ioctl.h>
7-#include <linux/compiler.h>
8 #include <linux/usbdevice_fs.h>
9 #include <linux/version.h>
10
diff --git a/meta/packages/qemu/files/configure.patch b/meta/packages/qemu/files/configure.patch
deleted file mode 100644
index ea83f8cd6d..0000000000
--- a/meta/packages/qemu/files/configure.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1Index: qemu/configure
2===================================================================
3--- qemu.orig/configure 2006-02-09 17:58:47.000000000 +0000
4+++ qemu/configure 2006-02-21 17:47:31.000000000 +0000
5@@ -482,7 +482,7 @@
6 fi
7 echo "HOST_CC=$host_cc" >> $config_mak
8 echo "AR=$ar" >> $config_mak
9-echo "STRIP=$strip -s -R .comment -R .note" >> $config_mak
10+echo "STRIP=$strip" >> $config_mak
11 echo "CFLAGS=$CFLAGS" >> $config_mak
12 echo "LDFLAGS=$LDFLAGS" >> $config_mak
13 echo "EXESUF=$EXESUF" >> $config_mak
diff --git a/meta/packages/qemu/files/mouse_fix-r0.patch b/meta/packages/qemu/files/mouse_fix-r0.patch
deleted file mode 100644
index 8cc19f0392..0000000000
--- a/meta/packages/qemu/files/mouse_fix-r0.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1If the cursor is hidden (SDL_ShowCursor(0)) and the input is grabbed
2(SDL_WM_GrabInput(SDL_GRAB_ON)), then the mouse will give relative motion
3events even when the cursor reaches the edge fo the screen. This is currently
4only implemented on Windows and Linux/Unix-a-likes.
5
6Index: qemu/sdl.c
7===================================================================
8--- qemu.orig/sdl.c 2006-04-13 12:22:22.000000000 +0100
9+++ qemu/sdl.c 2006-05-25 00:28:25.000000000 +0100
10@@ -280,13 +280,13 @@
11
12 static void sdl_hide_cursor(void)
13 {
14- SDL_SetCursor(sdl_cursor_hidden);
15+ SDL_ShowCursor(0);
16 }
17
18 static void sdl_show_cursor(void)
19 {
20 if (!kbd_mouse_is_absolute()) {
21- SDL_SetCursor(sdl_cursor_normal);
22+ SDL_ShowCursor(1);
23 }
24 }
25
diff --git a/meta/packages/qemu/files/nodocs_cvs.patch b/meta/packages/qemu/files/nodocs_cvs.patch
deleted file mode 100644
index b52d860fb0..0000000000
--- a/meta/packages/qemu/files/nodocs_cvs.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1Index: qemu/Makefile
2===================================================================
3--- qemu.orig/Makefile 2006-04-18 11:11:37.000000000 +0100
4+++ qemu/Makefile 2006-04-18 11:14:34.000000000 +0100
5@@ -11,7 +11,7 @@
6 ifdef CONFIG_STATIC
7 LDFLAGS+=-static
8 endif
9-DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1
10+DOCS=
11
12 all: dyngen$(EXESUF) $(TOOLS) $(DOCS)
13 for d in $(TARGET_DIRS); do \
14@@ -51,11 +51,11 @@
15 video.x proll.elf linux_boot.bin; do \
16 $(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
17 done
18- mkdir -p "$(DESTDIR)$(docdir)"
19- $(INSTALL) -m 644 qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
20+# mkdir -p "$(DESTDIR)$(docdir)"
21+# $(INSTALL) -m 644 qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
22 ifndef CONFIG_WIN32
23- mkdir -p "$(DESTDIR)$(mandir)/man1"
24- $(INSTALL) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
25+# mkdir -p "$(DESTDIR)$(mandir)/man1"
26+# $(INSTALL) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
27 mkdir -p "$(DESTDIR)$(datadir)/keymaps"
28 for x in $(KEYMAPS); do \
29 $(INSTALL) -m 644 $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
30@@ -122,10 +122,10 @@
31 $(datadir)/ppc_rom.bin \
32 $(datadir)/video.x \
33 $(datadir)/proll.elf \
34- $(datadir)/linux_boot.bin \
35- $(docdir)/qemu-doc.html \
36- $(docdir)/qemu-tech.html \
37- $(mandir)/man1/qemu.1 $(mandir)/man1/qemu-img.1 )
38+ $(datadir)/linux_boot.bin
39+# $(docdir)/qemu-doc.html \
40+# $(docdir)/qemu-tech.html \
41+# $(mandir)/man1/qemu.1 $(mandir)/man1/qemu-img.1 )
42
43 ifneq ($(wildcard .depend),)
44 include .depend
diff --git a/meta/packages/qemu/files/qemu-pci-irq-sharing.patch b/meta/packages/qemu/files/qemu-pci-irq-sharing.patch
deleted file mode 100644
index c47e89895f..0000000000
--- a/meta/packages/qemu/files/qemu-pci-irq-sharing.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1diff -pNaur qemu-cvs-ts-orig/hw/pci.c qemu-cvs-ts/hw/pci.c
2--- qemu-cvs-ts-orig/hw/pci.c 2006-08-17 10:46:34.000000000 +0000
3+++ qemu-cvs-ts/hw/pci.c 2006-09-23 17:02:41.000000000 +0000
4@@ -34,6 +34,7 @@ struct PCIBus {
5 SetIRQFunc *low_set_irq;
6 void *irq_opaque;
7 PCIDevice *devices[256];
8+ int irq_count[4];
9 };
10
11 static void pci_update_mappings(PCIDevice *d);
12@@ -49,6 +50,7 @@ PCIBus *pci_register_bus(pci_set_irq_fn
13 bus->set_irq = set_irq;
14 bus->irq_opaque = pic;
15 bus->devfn_min = devfn_min;
16+ memset(bus->irq_count, 0, sizeof(bus->irq_count));
17 first_bus = bus;
18 return bus;
19 }
20@@ -100,6 +102,7 @@ PCIDevice *pci_register_device(PCIBus *b
21 pci_dev->bus = bus;
22 pci_dev->devfn = devfn;
23 pstrcpy(pci_dev->name, sizeof(pci_dev->name), name);
24+ memset(pci_dev->irq_state, 0, sizeof(pci_dev->irq_state));
25
26 if (!config_read)
27 config_read = pci_default_read_config;
28@@ -404,7 +407,10 @@ uint32_t pci_data_read(void *opaque, uin
29 void pci_set_irq(PCIDevice *pci_dev, int irq_num, int level)
30 {
31 PCIBus *bus = pci_dev->bus;
32- bus->set_irq(pci_dev, bus->irq_opaque, irq_num, level);
33+ bus->irq_count[irq_num] += level - pci_dev->irq_state[irq_num];
34+ pci_dev->irq_state[irq_num] = level;
35+ bus->set_irq(pci_dev, bus->irq_opaque,
36+ irq_num, !!bus->irq_count[irq_num]);
37 }
38
39 /***********************************************************/
40diff -pNaur qemu-cvs-ts-orig/vl.h qemu-cvs-ts/vl.h
41--- qemu-cvs-ts-orig/vl.h 2006-09-18 01:15:29.000000000 +0000
42+++ qemu-cvs-ts/vl.h 2006-09-23 17:15:21.000000000 +0000
43@@ -733,6 +733,9 @@ struct PCIDevice {
44 PCIConfigWriteFunc *config_write;
45 /* ??? This is a PC-specific hack, and should be removed. */
46 int irq_index;
47+
48+ /* remember last irq levels */
49+ int irq_state[4];
50 };
51
52 PCIDevice *pci_register_device(PCIBus *bus, const char *name,
diff --git a/meta/packages/qemu/files/qemu-usb-wacom-0.8.2.patch b/meta/packages/qemu/files/qemu-usb-wacom-0.8.2.patch
deleted file mode 100644
index 33a6db3f18..0000000000
--- a/meta/packages/qemu/files/qemu-usb-wacom-0.8.2.patch
+++ /dev/null
@@ -1,445 +0,0 @@
1diff -pNaur qemu-cvs-ts-orig/hw/usb-wacom.c qemu-cvs-ts/hw/usb-wacom.c
2--- qemu-cvs-ts-orig/hw/usb-wacom.c 1970-01-01 01:00:00.000000000 +0100
3+++ qemu-cvs-ts/hw/usb-wacom.c 2006-09-22 20:44:26.000000000 +0200
4@@ -0,0 +1,408 @@
5+/*
6+ * Wacom PenPartner USB tablet emulation.
7+ *
8+ * Copyright (c) 2006 Openedhand Ltd.
9+ *
10+ * Author: Andrzej Zaborowski <balrog@zabor.org>
11+ *
12+ * Based on hw/usb-hid.c:
13+ * Copyright (c) 2005 Fabrice Bellard
14+ *
15+ * Permission is hereby granted, free of charge, to any person obtaining a copy
16+ * of this software and associated documentation files (the "Software"), to deal
17+ * in the Software without restriction, including without limitation the rights
18+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19+ * copies of the Software, and to permit persons to whom the Software is
20+ * furnished to do so, subject to the following conditions:
21+ *
22+ * The above copyright notice and this permission notice shall be included in
23+ * all copies or substantial portions of the Software.
24+ *
25+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
28+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31+ * THE SOFTWARE.
32+ */
33+#include "vl.h"
34+
35+/* Interface requests */
36+#define WACOM_GET_REPORT 0x2101
37+#define WACOM_SET_REPORT 0x2109
38+
39+/* HID interface requests */
40+#define HID_GET_REPORT 0xa101
41+#define HID_GET_IDLE 0xa102
42+#define HID_GET_PROTOCOL 0xa103
43+#define HID_SET_IDLE 0x210a
44+#define HID_SET_PROTOCOL 0x210b
45+
46+#define WACOM_MODE_HID 1
47+#define WACOM_MODE_WACOM 2
48+
49+typedef struct USBWacomState {
50+ USBDevice dev;
51+ int dx, dy, dz, buttons_state;
52+ int x, y;
53+ int mouse_grabbed;
54+ int mode;
55+} USBWacomState;
56+
57+static const uint8_t qemu_wacom_dev_descriptor[] = {
58+ 0x12, /* u8 bLength; */
59+ 0x01, /* u8 bDescriptorType; Device */
60+ 0x10, 0x10, /* u16 bcdUSB; v1.10 */
61+
62+ 0x00, /* u8 bDeviceClass; */
63+ 0x00, /* u8 bDeviceSubClass; */
64+ 0x00, /* u8 bDeviceProtocol; [ low/full speeds only ] */
65+ 0x08, /* u8 bMaxPacketSize0; 8 Bytes */
66+
67+ 0x6a, 0x05, /* u16 idVendor; */
68+ 0x00, 0x00, /* u16 idProduct; */
69+ 0x10, 0x42, /* u16 bcdDevice */
70+
71+ 0x01, /* u8 iManufacturer; */
72+ 0x02, /* u8 iProduct; */
73+ 0x00, /* u8 iSerialNumber; */
74+ 0x01, /* u8 bNumConfigurations; */
75+};
76+
77+static const uint8_t qemu_wacom_config_descriptor[] = {
78+ /* one configuration */
79+ 0x09, /* u8 bLength; */
80+ 0x02, /* u8 bDescriptorType; Configuration */
81+ 0x22, 0x00, /* u16 wTotalLength; */
82+ 0x01, /* u8 bNumInterfaces; (1) */
83+ 0x01, /* u8 bConfigurationValue; */
84+ 0x00, /* u8 iConfiguration; */
85+ 0x80, /* u8 bmAttributes;
86+ Bit 7: must be set,
87+ 6: Self-powered,
88+ 5: Remote wakeup,
89+ 4..0: resvd */
90+ 40, /* u8 MaxPower; */
91+
92+ /* one interface */
93+ 0x09, /* u8 if_bLength; */
94+ 0x04, /* u8 if_bDescriptorType; Interface */
95+ 0x00, /* u8 if_bInterfaceNumber; */
96+ 0x00, /* u8 if_bAlternateSetting; */
97+ 0x01, /* u8 if_bNumEndpoints; */
98+ 0x03, /* u8 if_bInterfaceClass; HID */
99+ 0x01, /* u8 if_bInterfaceSubClass; Boot */
100+ 0x02, /* u8 if_bInterfaceProtocol; [usb1.1 or single tt] */
101+ 0x00, /* u8 if_iInterface; */
102+
103+ /* HID descriptor */
104+ 0x09, /* u8 bLength; */
105+ 0x21, /* u8 bDescriptorType; */
106+ 0x01, 0x10, /* u16 HID_class */
107+ 0x00, /* u8 country_code */
108+ 0x01, /* u8 num_descriptors */
109+ 0x22, /* u8 type; Report */
110+ 0x6e, 0x00, /* u16 len */
111+
112+ /* one endpoint (status change endpoint) */
113+ 0x07, /* u8 ep_bLength; */
114+ 0x05, /* u8 ep_bDescriptorType; Endpoint */
115+ 0x81, /* u8 ep_bEndpointAddress; IN Endpoint 1 */
116+ 0x03, /* u8 ep_bmAttributes; Interrupt */
117+ 0x08, 0x00, /* u16 ep_wMaxPacketSize; */
118+ 0x0a, /* u8 ep_bInterval; */
119+};
120+
121+static void usb_mouse_event(void *opaque,
122+ int dx1, int dy1, int dz1, int buttons_state)
123+{
124+ USBWacomState *s = opaque;
125+
126+ s->dx += dx1;
127+ s->dy += dy1;
128+ s->dz += dz1;
129+ s->buttons_state = buttons_state;
130+}
131+
132+static void usb_wacom_event(void *opaque,
133+ int x, int y, int dz, int buttons_state)
134+{
135+ USBWacomState *s = opaque;
136+
137+ s->x = x;
138+ s->y = y;
139+ s->dz += dz;
140+ s->buttons_state = buttons_state;
141+}
142+
143+static inline int int_clamp(int val, int vmin, int vmax)
144+{
145+ if (val < vmin)
146+ return vmin;
147+ else if (val > vmax)
148+ return vmax;
149+ else
150+ return val;
151+}
152+
153+static int usb_mouse_poll(USBWacomState *s, uint8_t *buf, int len)
154+{
155+ int dx, dy, dz, b, l;
156+
157+ if (!s->mouse_grabbed) {
158+ qemu_add_mouse_event_handler(usb_mouse_event, s, 1);
159+ s->mouse_grabbed = 1;
160+ }
161+
162+ dx = int_clamp(s->dx, -128, 127);
163+ dy = int_clamp(s->dy, -128, 127);
164+ dz = int_clamp(s->dz, -128, 127);
165+
166+ s->dx -= dx;
167+ s->dy -= dy;
168+ s->dz -= dz;
169+
170+ b = 0;
171+ if (s->buttons_state & MOUSE_EVENT_LBUTTON)
172+ b |= 0x01;
173+ if (s->buttons_state & MOUSE_EVENT_RBUTTON)
174+ b |= 0x02;
175+ if (s->buttons_state & MOUSE_EVENT_MBUTTON)
176+ b |= 0x04;
177+
178+ buf[0] = b;
179+ buf[1] = dx;
180+ buf[2] = dy;
181+ l = 3;
182+ if (len >= 4) {
183+ buf[3] = dz;
184+ l = 4;
185+ }
186+ return l;
187+}
188+
189+static int usb_wacom_poll(USBWacomState *s, uint8_t *buf, int len)
190+{
191+ int b;
192+
193+ if (!s->mouse_grabbed) {
194+ qemu_add_mouse_event_handler(usb_wacom_event, s, 1);
195+ s->mouse_grabbed = 1;
196+ }
197+
198+ b = 0;
199+ if (s->buttons_state & MOUSE_EVENT_LBUTTON)
200+ b |= 0x01;
201+ if (s->buttons_state & MOUSE_EVENT_RBUTTON)
202+ b |= 0x02;
203+ if (s->buttons_state & MOUSE_EVENT_MBUTTON)
204+ b |= 0x04;
205+
206+ if (len < 7)
207+ return 0;
208+
209+ buf[0] = s->mode;
210+ buf[1] = s->x & 0xff;
211+ buf[2] = s->x >> 8;
212+ buf[3] = s->y & 0xff;
213+ buf[4] = s->y >> 8;
214+ if (b) {
215+ buf[5] = 0x40;
216+ buf[6] = 0;
217+ } else {
218+ buf[5] = 0x00;
219+ buf[6] = (unsigned char) -120;
220+ }
221+
222+ return 7;
223+}
224+
225+static void usb_wacom_handle_reset(USBDevice *dev)
226+{
227+ USBWacomState *s = (USBWacomState *) dev;
228+
229+ s->dx = 0;
230+ s->dy = 0;
231+ s->dz = 0;
232+ s->x = 0;
233+ s->y = 0;
234+ s->buttons_state = 0;
235+ s->mode = WACOM_MODE_HID;
236+}
237+
238+static int usb_wacom_handle_control(USBDevice *dev, int request, int value,
239+ int index, int length, uint8_t *data)
240+{
241+ USBWacomState *s = (USBWacomState *) dev;
242+ int ret = 0;
243+
244+ switch (request) {
245+ case DeviceRequest | USB_REQ_GET_STATUS:
246+ data[0] = (1 << USB_DEVICE_SELF_POWERED) |
247+ (dev->remote_wakeup << USB_DEVICE_REMOTE_WAKEUP);
248+ data[1] = 0x00;
249+ ret = 2;
250+ break;
251+ case DeviceOutRequest | USB_REQ_CLEAR_FEATURE:
252+ if (value == USB_DEVICE_REMOTE_WAKEUP) {
253+ dev->remote_wakeup = 0;
254+ } else {
255+ goto fail;
256+ }
257+ ret = 0;
258+ break;
259+ case DeviceOutRequest | USB_REQ_SET_FEATURE:
260+ if (value == USB_DEVICE_REMOTE_WAKEUP) {
261+ dev->remote_wakeup = 1;
262+ } else {
263+ goto fail;
264+ }
265+ ret = 0;
266+ break;
267+ case DeviceOutRequest | USB_REQ_SET_ADDRESS:
268+ dev->addr = value;
269+ ret = 0;
270+ break;
271+ case DeviceRequest | USB_REQ_GET_DESCRIPTOR:
272+ switch (value >> 8) {
273+ case USB_DT_DEVICE:
274+ memcpy(data, qemu_wacom_dev_descriptor,
275+ sizeof(qemu_wacom_dev_descriptor));
276+ ret = sizeof(qemu_wacom_dev_descriptor);
277+ break;
278+ case USB_DT_CONFIG:
279+ memcpy(data, qemu_wacom_config_descriptor,
280+ sizeof(qemu_wacom_config_descriptor));
281+ ret = sizeof(qemu_wacom_config_descriptor);
282+ break;
283+ case USB_DT_STRING:
284+ switch (value & 0xff) {
285+ case 0:
286+ /* language ids */
287+ data[0] = 4;
288+ data[1] = 3;
289+ data[2] = 0x09;
290+ data[3] = 0x04;
291+ ret = 4;
292+ break;
293+ case 1:
294+ /* serial number */
295+ ret = set_usb_string(data, "1");
296+ break;
297+ case 2:
298+ ret = set_usb_string(data, "Wacom PenPartner");
299+ break;
300+ case 3:
301+ /* vendor description */
302+ ret = set_usb_string(data, "QEMU " QEMU_VERSION);
303+ break;
304+ case 4:
305+ ret = set_usb_string(data, "Wacom Tablet");
306+ break;
307+ case 5:
308+ ret = set_usb_string(data, "Endpoint1 Interrupt Pipe");
309+ break;
310+ default:
311+ goto fail;
312+ }
313+ break;
314+ default:
315+ goto fail;
316+ }
317+ break;
318+ case DeviceRequest | USB_REQ_GET_CONFIGURATION:
319+ data[0] = 1;
320+ ret = 1;
321+ break;
322+ case DeviceOutRequest | USB_REQ_SET_CONFIGURATION:
323+ ret = 0;
324+ break;
325+ case DeviceRequest | USB_REQ_GET_INTERFACE:
326+ data[0] = 0;
327+ ret = 1;
328+ break;
329+ case DeviceOutRequest | USB_REQ_SET_INTERFACE:
330+ ret = 0;
331+ break;
332+ case WACOM_SET_REPORT:
333+ qemu_add_mouse_event_handler(NULL, NULL, 0);
334+ s->mouse_grabbed = 0;
335+ s->mode = data[0];
336+ ret = 0;
337+ break;
338+ case WACOM_GET_REPORT:
339+ data[0] = 0;
340+ data[1] = s->mode;
341+ ret = 2;
342+ break;
343+ /* USB HID requests */
344+ case HID_GET_REPORT:
345+ if (s->mode == WACOM_MODE_HID)
346+ ret = usb_mouse_poll(s, data, length);
347+ else if (s->mode == WACOM_MODE_WACOM)
348+ ret = usb_wacom_poll(s, data, length);
349+ break;
350+ case HID_SET_IDLE:
351+ ret = 0;
352+ break;
353+ default:
354+ fail:
355+ ret = USB_RET_STALL;
356+ break;
357+ }
358+ return ret;
359+}
360+
361+static int usb_wacom_handle_data(USBDevice *dev, int pid,
362+ uint8_t devep, uint8_t *data, int len)
363+{
364+ USBWacomState *s = (USBWacomState *) dev;
365+ int ret = 0;
366+
367+ switch (pid) {
368+ case USB_TOKEN_IN:
369+ if (devep == 1) {
370+ if (s->mode == WACOM_MODE_HID)
371+ ret = usb_mouse_poll(s, data, len);
372+ else if (s->mode == WACOM_MODE_WACOM)
373+ ret = usb_wacom_poll(s, data, len);
374+ break;
375+ }
376+ /* Fall through. */
377+ case USB_TOKEN_OUT:
378+ default:
379+ ret = USB_RET_STALL;
380+ break;
381+ }
382+ return ret;
383+}
384+
385+static void usb_wacom_handle_destroy(USBDevice *dev)
386+{
387+ USBWacomState *s = (USBWacomState *) dev;
388+
389+ qemu_add_mouse_event_handler(NULL, NULL, 0);
390+ qemu_free(s);
391+}
392+
393+USBDevice *usb_wacom_init(void)
394+{
395+ USBWacomState *s;
396+
397+ s = qemu_mallocz(sizeof(USBWacomState));
398+ if (!s)
399+ return NULL;
400+ s->dev.speed = USB_SPEED_FULL;
401+ s->dev.handle_packet = usb_generic_handle_packet;
402+
403+ s->dev.handle_reset = usb_wacom_handle_reset;
404+ s->dev.handle_control = usb_wacom_handle_control;
405+ s->dev.handle_data = usb_wacom_handle_data;
406+ s->dev.handle_destroy = usb_wacom_handle_destroy;
407+
408+ pstrcpy(s->dev.devname, sizeof(s->dev.devname),
409+ "QEMU PenPartner Tablet");
410+
411+ return (USBDevice *) s;
412+}
413diff -pNaur qemu-cvs-ts-orig/hw/usb.h qemu-cvs-ts/hw/usb.h
414--- qemu-cvs-ts-orig/hw/usb.h 2006-08-12 03:04:27.000000000 +0200
415+++ qemu-cvs-ts/hw/usb.h 2006-09-21 01:40:40.000000000 +0200
416@@ -218,3 +218,6 @@ USBDevice *usb_tablet_init(void);
417
418 /* usb-msd.c */
419 USBDevice *usb_msd_init(const char *filename);
420+
421+/* usb-wacom.c */
422+USBDevice *usb_wacom_init(void);
423diff -pNaur qemu-cvs-ts-orig/vl.c qemu-cvs-ts/vl.c
424--- qemu-cvs-ts-orig/vl.c 2006-09-10 16:39:54.000000000 +0200
425+++ qemu-cvs-ts/vl.c 2006-09-21 01:45:16.000000000 +0200
426@@ -3765,6 +3765,8 @@ static int usb_device_add(const char *de
427 dev = usb_tablet_init();
428 } else if (strstart(devname, "disk:", &p)) {
429 dev = usb_msd_init(p);
430+ } else if (!strcmp(devname, "wacom-tablet")) {
431+ dev = usb_wacom_init();
432 } else {
433 return -1;
434 }
435diff -pNaur qemu-cvs-ts-orig/Makefile.target qemu-cvs-ts/Makefile.target
436--- qemu-cvs-ts-orig/Makefile.target 2006-09-18 03:15:29.000000000 +0200
437+++ qemu-cvs-ts/Makefile.target 2006-09-21 02:32:19.000000000 +0200
438@@ -330,6 +330,7 @@ VL_OBJS+= scsi-disk.o cdrom.o lsi53c895a
439
440 # USB layer
441 VL_OBJS+= usb.o usb-hub.o usb-linux.o usb-hid.o usb-ohci.o usb-msd.o
442+VL_OBJS+= usb-wacom.o
443
444 # PCI network cards
445 VL_OBJS+= ne2000.o rtl8139.o pcnet.o
diff --git a/meta/packages/qemu/files/qemu-usb-wacom-buttons.patch b/meta/packages/qemu/files/qemu-usb-wacom-buttons.patch
deleted file mode 100644
index ee24c15780..0000000000
--- a/meta/packages/qemu/files/qemu-usb-wacom-buttons.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1--- qemu-cvs-ts-orig/hw/usb-wacom.c 2006-09-29 22:53:06.000000000 +0000
2+++ qemu-cvs-ts/hw/usb-wacom.c 2006-09-29 22:44:14.000000000 +0000
3@@ -203,19 +203,18 @@ static int usb_wacom_poll(USBWacomState
4 return 0;
5
6 buf[0] = s->mode;
7+ buf[5] = 0x00;
8 if (b) {
9 buf[1] = s->x & 0xff;
10 buf[2] = s->x >> 8;
11 buf[3] = s->y & 0xff;
12 buf[4] = s->y >> 8;
13- buf[5] = 0x40;
14 buf[6] = 0;
15 } else {
16 buf[1] = 0;
17 buf[2] = 0;
18 buf[3] = 0;
19 buf[4] = 0;
20- buf[5] = 0x00;
21 buf[6] = (unsigned char) -127;
22 }
23
diff --git a/meta/packages/qemu/files/qemu-usb-wacom-pressure.patch b/meta/packages/qemu/files/qemu-usb-wacom-pressure.patch
deleted file mode 100644
index 668d50d5f2..0000000000
--- a/meta/packages/qemu/files/qemu-usb-wacom-pressure.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1--- qemu-cvs-ts-orig/hw/usb-wacom.c 2006-09-29 17:27:43.000000000 +0000
2+++ qemu-cvs-ts/hw/usb-wacom.c 2006-09-29 17:48:13.000000000 +0000
3@@ -203,16 +203,20 @@ static int usb_wacom_poll(USBWacomState
4 return 0;
5
6 buf[0] = s->mode;
7- buf[1] = s->x & 0xff;
8- buf[2] = s->x >> 8;
9- buf[3] = s->y & 0xff;
10- buf[4] = s->y >> 8;
11 if (b) {
12+ buf[1] = s->x & 0xff;
13+ buf[2] = s->x >> 8;
14+ buf[3] = s->y & 0xff;
15+ buf[4] = s->y >> 8;
16 buf[5] = 0x40;
17 buf[6] = 0;
18 } else {
19+ buf[1] = 0;
20+ buf[2] = 0;
21+ buf[3] = 0;
22+ buf[4] = 0;
23 buf[5] = 0x00;
24- buf[6] = (unsigned char) -120;
25+ buf[6] = (unsigned char) -127;
26 }
27
28 return 7;
diff --git a/meta/packages/qemu/files/qemu-usb-wacom.patch b/meta/packages/qemu/files/qemu-usb-wacom.patch
deleted file mode 100644
index c1c39eccaf..0000000000
--- a/meta/packages/qemu/files/qemu-usb-wacom.patch
+++ /dev/null
@@ -1,444 +0,0 @@
1diff -pNaur qemu-cvs-ts-orig/hw/usb-wacom.c qemu-cvs-ts/hw/usb-wacom.c
2--- qemu-cvs-ts-orig/hw/usb-wacom.c 1970-01-01 01:00:00.000000000 +0100
3+++ qemu-cvs-ts/hw/usb-wacom.c 2006-09-22 20:44:26.000000000 +0200
4@@ -0,0 +1,407 @@
5+/*
6+ * Wacom PenPartner USB tablet emulation.
7+ *
8+ * Copyright (c) 2006 Openedhand Ltd.
9+ *
10+ * Author: Andrzej Zaborowski <balrog@zabor.org>
11+ *
12+ * Based on hw/usb-hid.c:
13+ * Copyright (c) 2005 Fabrice Bellard
14+ *
15+ * Permission is hereby granted, free of charge, to any person obtaining a copy
16+ * of this software and associated documentation files (the "Software"), to deal
17+ * in the Software without restriction, including without limitation the rights
18+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19+ * copies of the Software, and to permit persons to whom the Software is
20+ * furnished to do so, subject to the following conditions:
21+ *
22+ * The above copyright notice and this permission notice shall be included in
23+ * all copies or substantial portions of the Software.
24+ *
25+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
28+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31+ * THE SOFTWARE.
32+ */
33+#include "vl.h"
34+
35+/* Interface requests */
36+#define WACOM_GET_REPORT 0x2101
37+#define WACOM_SET_REPORT 0x2109
38+
39+/* HID interface requests */
40+#define HID_GET_REPORT 0xa101
41+#define HID_GET_IDLE 0xa102
42+#define HID_GET_PROTOCOL 0xa103
43+#define HID_SET_IDLE 0x210a
44+#define HID_SET_PROTOCOL 0x210b
45+
46+#define WACOM_MODE_HID 1
47+#define WACOM_MODE_WACOM 2
48+
49+typedef struct USBWacomState {
50+ USBDevice dev;
51+ int dx, dy, dz, buttons_state;
52+ int x, y;
53+ int mouse_grabbed;
54+ int mode;
55+} USBWacomState;
56+
57+static const uint8_t qemu_wacom_dev_descriptor[] = {
58+ 0x12, /* u8 bLength; */
59+ 0x01, /* u8 bDescriptorType; Device */
60+ 0x10, 0x10, /* u16 bcdUSB; v1.10 */
61+
62+ 0x00, /* u8 bDeviceClass; */
63+ 0x00, /* u8 bDeviceSubClass; */
64+ 0x00, /* u8 bDeviceProtocol; [ low/full speeds only ] */
65+ 0x08, /* u8 bMaxPacketSize0; 8 Bytes */
66+
67+ 0x6a, 0x05, /* u16 idVendor; */
68+ 0x00, 0x00, /* u16 idProduct; */
69+ 0x10, 0x42, /* u16 bcdDevice */
70+
71+ 0x01, /* u8 iManufacturer; */
72+ 0x02, /* u8 iProduct; */
73+ 0x00, /* u8 iSerialNumber; */
74+ 0x01, /* u8 bNumConfigurations; */
75+};
76+
77+static const uint8_t qemu_wacom_config_descriptor[] = {
78+ /* one configuration */
79+ 0x09, /* u8 bLength; */
80+ 0x02, /* u8 bDescriptorType; Configuration */
81+ 0x22, 0x00, /* u16 wTotalLength; */
82+ 0x01, /* u8 bNumInterfaces; (1) */
83+ 0x01, /* u8 bConfigurationValue; */
84+ 0x00, /* u8 iConfiguration; */
85+ 0x80, /* u8 bmAttributes;
86+ Bit 7: must be set,
87+ 6: Self-powered,
88+ 5: Remote wakeup,
89+ 4..0: resvd */
90+ 40, /* u8 MaxPower; */
91+
92+ /* one interface */
93+ 0x09, /* u8 if_bLength; */
94+ 0x04, /* u8 if_bDescriptorType; Interface */
95+ 0x00, /* u8 if_bInterfaceNumber; */
96+ 0x00, /* u8 if_bAlternateSetting; */
97+ 0x01, /* u8 if_bNumEndpoints; */
98+ 0x03, /* u8 if_bInterfaceClass; HID */
99+ 0x01, /* u8 if_bInterfaceSubClass; Boot */
100+ 0x02, /* u8 if_bInterfaceProtocol; [usb1.1 or single tt] */
101+ 0x00, /* u8 if_iInterface; */
102+
103+ /* HID descriptor */
104+ 0x09, /* u8 bLength; */
105+ 0x21, /* u8 bDescriptorType; */
106+ 0x01, 0x10, /* u16 HID_class */
107+ 0x00, /* u8 country_code */
108+ 0x01, /* u8 num_descriptors */
109+ 0x22, /* u8 type; Report */
110+ 0x6e, 0x00, /* u16 len */
111+
112+ /* one endpoint (status change endpoint) */
113+ 0x07, /* u8 ep_bLength; */
114+ 0x05, /* u8 ep_bDescriptorType; Endpoint */
115+ 0x81, /* u8 ep_bEndpointAddress; IN Endpoint 1 */
116+ 0x03, /* u8 ep_bmAttributes; Interrupt */
117+ 0x08, 0x00, /* u16 ep_wMaxPacketSize; */
118+ 0x0a, /* u8 ep_bInterval; */
119+};
120+
121+static void usb_mouse_event(void *opaque,
122+ int dx1, int dy1, int dz1, int buttons_state)
123+{
124+ USBWacomState *s = opaque;
125+
126+ s->dx += dx1;
127+ s->dy += dy1;
128+ s->dz += dz1;
129+ s->buttons_state = buttons_state;
130+}
131+
132+static void usb_wacom_event(void *opaque,
133+ int x, int y, int dz, int buttons_state)
134+{
135+ USBWacomState *s = opaque;
136+
137+ s->x = x;
138+ s->y = y;
139+ s->dz += dz;
140+ s->buttons_state = buttons_state;
141+}
142+
143+static inline int int_clamp(int val, int vmin, int vmax)
144+{
145+ if (val < vmin)
146+ return vmin;
147+ else if (val > vmax)
148+ return vmax;
149+ else
150+ return val;
151+}
152+
153+static int usb_mouse_poll(USBWacomState *s, uint8_t *buf, int len)
154+{
155+ int dx, dy, dz, b, l;
156+
157+ if (!s->mouse_grabbed) {
158+ qemu_add_mouse_event_handler(usb_mouse_event, s, 1);
159+ s->mouse_grabbed = 1;
160+ }
161+
162+ dx = int_clamp(s->dx, -128, 127);
163+ dy = int_clamp(s->dy, -128, 127);
164+ dz = int_clamp(s->dz, -128, 127);
165+
166+ s->dx -= dx;
167+ s->dy -= dy;
168+ s->dz -= dz;
169+
170+ b = 0;
171+ if (s->buttons_state & MOUSE_EVENT_LBUTTON)
172+ b |= 0x01;
173+ if (s->buttons_state & MOUSE_EVENT_RBUTTON)
174+ b |= 0x02;
175+ if (s->buttons_state & MOUSE_EVENT_MBUTTON)
176+ b |= 0x04;
177+
178+ buf[0] = b;
179+ buf[1] = dx;
180+ buf[2] = dy;
181+ l = 3;
182+ if (len >= 4) {
183+ buf[3] = dz;
184+ l = 4;
185+ }
186+ return l;
187+}
188+
189+static int usb_wacom_poll(USBWacomState *s, uint8_t *buf, int len)
190+{
191+ int b;
192+
193+ if (!s->mouse_grabbed) {
194+ qemu_add_mouse_event_handler(usb_wacom_event, s, 1);
195+ s->mouse_grabbed = 1;
196+ }
197+
198+ b = 0;
199+ if (s->buttons_state & MOUSE_EVENT_LBUTTON)
200+ b |= 0x01;
201+ if (s->buttons_state & MOUSE_EVENT_RBUTTON)
202+ b |= 0x02;
203+ if (s->buttons_state & MOUSE_EVENT_MBUTTON)
204+ b |= 0x04;
205+
206+ if (len < 7)
207+ return 0;
208+
209+ buf[0] = s->mode;
210+ buf[1] = s->x & 0xff;
211+ buf[2] = s->x >> 8;
212+ buf[3] = s->y & 0xff;
213+ buf[4] = s->y >> 8;
214+ if (b) {
215+ buf[5] = 0x40;
216+ buf[6] = 0;
217+ } else {
218+ buf[5] = 0x00;
219+ buf[6] = (unsigned char) -120;
220+ }
221+
222+ return 7;
223+}
224+
225+static void usb_wacom_handle_reset(USBDevice *dev)
226+{
227+ USBWacomState *s = (USBWacomState *) dev;
228+
229+ s->dx = 0;
230+ s->dy = 0;
231+ s->dz = 0;
232+ s->x = 0;
233+ s->y = 0;
234+ s->buttons_state = 0;
235+ s->mode = WACOM_MODE_HID;
236+}
237+
238+static int usb_wacom_handle_control(USBDevice *dev, int request, int value,
239+ int index, int length, uint8_t *data)
240+{
241+ USBWacomState *s = (USBWacomState *) dev;
242+ int ret = 0;
243+
244+ switch (request) {
245+ case DeviceRequest | USB_REQ_GET_STATUS:
246+ data[0] = (1 << USB_DEVICE_SELF_POWERED) |
247+ (dev->remote_wakeup << USB_DEVICE_REMOTE_WAKEUP);
248+ data[1] = 0x00;
249+ ret = 2;
250+ break;
251+ case DeviceOutRequest | USB_REQ_CLEAR_FEATURE:
252+ if (value == USB_DEVICE_REMOTE_WAKEUP) {
253+ dev->remote_wakeup = 0;
254+ } else {
255+ goto fail;
256+ }
257+ ret = 0;
258+ break;
259+ case DeviceOutRequest | USB_REQ_SET_FEATURE:
260+ if (value == USB_DEVICE_REMOTE_WAKEUP) {
261+ dev->remote_wakeup = 1;
262+ } else {
263+ goto fail;
264+ }
265+ ret = 0;
266+ break;
267+ case DeviceOutRequest | USB_REQ_SET_ADDRESS:
268+ dev->addr = value;
269+ ret = 0;
270+ break;
271+ case DeviceRequest | USB_REQ_GET_DESCRIPTOR:
272+ switch (value >> 8) {
273+ case USB_DT_DEVICE:
274+ memcpy(data, qemu_wacom_dev_descriptor,
275+ sizeof(qemu_wacom_dev_descriptor));
276+ ret = sizeof(qemu_wacom_dev_descriptor);
277+ break;
278+ case USB_DT_CONFIG:
279+ memcpy(data, qemu_wacom_config_descriptor,
280+ sizeof(qemu_wacom_config_descriptor));
281+ ret = sizeof(qemu_wacom_config_descriptor);
282+ break;
283+ case USB_DT_STRING:
284+ switch (value & 0xff) {
285+ case 0:
286+ /* language ids */
287+ data[0] = 4;
288+ data[1] = 3;
289+ data[2] = 0x09;
290+ data[3] = 0x04;
291+ ret = 4;
292+ break;
293+ case 1:
294+ /* serial number */
295+ ret = set_usb_string(data, "1");
296+ break;
297+ case 2:
298+ ret = set_usb_string(data, "Wacom PenPartner");
299+ break;
300+ case 3:
301+ /* vendor description */
302+ ret = set_usb_string(data, "QEMU " QEMU_VERSION);
303+ break;
304+ case 4:
305+ ret = set_usb_string(data, "Wacom Tablet");
306+ break;
307+ case 5:
308+ ret = set_usb_string(data, "Endpoint1 Interrupt Pipe");
309+ break;
310+ default:
311+ goto fail;
312+ }
313+ break;
314+ default:
315+ goto fail;
316+ }
317+ break;
318+ case DeviceRequest | USB_REQ_GET_CONFIGURATION:
319+ data[0] = 1;
320+ ret = 1;
321+ break;
322+ case DeviceOutRequest | USB_REQ_SET_CONFIGURATION:
323+ ret = 0;
324+ break;
325+ case DeviceRequest | USB_REQ_GET_INTERFACE:
326+ data[0] = 0;
327+ ret = 1;
328+ break;
329+ case DeviceOutRequest | USB_REQ_SET_INTERFACE:
330+ ret = 0;
331+ break;
332+ case WACOM_SET_REPORT:
333+ qemu_add_mouse_event_handler(NULL, NULL, 0);
334+ s->mouse_grabbed = 0;
335+ s->mode = data[0];
336+ ret = 0;
337+ break;
338+ case WACOM_GET_REPORT:
339+ data[0] = 0;
340+ data[1] = s->mode;
341+ ret = 2;
342+ break;
343+ /* USB HID requests */
344+ case HID_GET_REPORT:
345+ if (s->mode == WACOM_MODE_HID)
346+ ret = usb_mouse_poll(s, data, length);
347+ else if (s->mode == WACOM_MODE_WACOM)
348+ ret = usb_wacom_poll(s, data, length);
349+ break;
350+ case HID_SET_IDLE:
351+ ret = 0;
352+ break;
353+ default:
354+ fail:
355+ ret = USB_RET_STALL;
356+ break;
357+ }
358+ return ret;
359+}
360+
361+static int usb_wacom_handle_data(USBDevice *dev, USBPacket *p)
362+{
363+ USBWacomState *s = (USBWacomState *) dev;
364+ int ret = 0;
365+
366+ switch (p->pid) {
367+ case USB_TOKEN_IN:
368+ if (p->devep == 1) {
369+ if (s->mode == WACOM_MODE_HID)
370+ ret = usb_mouse_poll(s, p->data, p->len);
371+ else if (s->mode == WACOM_MODE_WACOM)
372+ ret = usb_wacom_poll(s, p->data, p->len);
373+ break;
374+ }
375+ /* Fall through. */
376+ case USB_TOKEN_OUT:
377+ default:
378+ ret = USB_RET_STALL;
379+ break;
380+ }
381+ return ret;
382+}
383+
384+static void usb_wacom_handle_destroy(USBDevice *dev)
385+{
386+ USBWacomState *s = (USBWacomState *) dev;
387+
388+ qemu_add_mouse_event_handler(NULL, NULL, 0);
389+ qemu_free(s);
390+}
391+
392+USBDevice *usb_wacom_init(void)
393+{
394+ USBWacomState *s;
395+
396+ s = qemu_mallocz(sizeof(USBWacomState));
397+ if (!s)
398+ return NULL;
399+ s->dev.speed = USB_SPEED_FULL;
400+ s->dev.handle_packet = usb_generic_handle_packet;
401+
402+ s->dev.handle_reset = usb_wacom_handle_reset;
403+ s->dev.handle_control = usb_wacom_handle_control;
404+ s->dev.handle_data = usb_wacom_handle_data;
405+ s->dev.handle_destroy = usb_wacom_handle_destroy;
406+
407+ pstrcpy(s->dev.devname, sizeof(s->dev.devname),
408+ "QEMU PenPartner Tablet");
409+
410+ return (USBDevice *) s;
411+}
412diff -pNaur qemu-cvs-ts-orig/hw/usb.h qemu-cvs-ts/hw/usb.h
413--- qemu-cvs-ts-orig/hw/usb.h 2006-08-12 03:04:27.000000000 +0200
414+++ qemu-cvs-ts/hw/usb.h 2006-09-21 01:40:40.000000000 +0200
415@@ -218,3 +218,6 @@ USBDevice *usb_tablet_init(void);
416
417 /* usb-msd.c */
418 USBDevice *usb_msd_init(const char *filename);
419+
420+/* usb-wacom.c */
421+USBDevice *usb_wacom_init(void);
422diff -pNaur qemu-cvs-ts-orig/vl.c qemu-cvs-ts/vl.c
423--- qemu-cvs-ts-orig/vl.c 2006-09-10 16:39:54.000000000 +0200
424+++ qemu-cvs-ts/vl.c 2006-09-21 01:45:16.000000000 +0200
425@@ -3765,6 +3765,8 @@ static int usb_device_add(const char *de
426 dev = usb_tablet_init();
427 } else if (strstart(devname, "disk:", &p)) {
428 dev = usb_msd_init(p);
429+ } else if (!strcmp(devname, "wacom-tablet")) {
430+ dev = usb_wacom_init();
431 } else {
432 return -1;
433 }
434diff -pNaur qemu-cvs-ts-orig/Makefile.target qemu-cvs-ts/Makefile.target
435--- qemu-cvs-ts-orig/Makefile.target 2006-09-18 03:15:29.000000000 +0200
436+++ qemu-cvs-ts/Makefile.target 2006-09-21 02:32:19.000000000 +0200
437@@ -330,6 +330,7 @@ VL_OBJS+= scsi-disk.o cdrom.o lsi53c895a
438
439 # USB layer
440 VL_OBJS+= usb.o usb-hub.o usb-linux.o usb-hid.o usb-ohci.o usb-msd.o
441+VL_OBJS+= usb-wacom.o
442
443 # PCI network cards
444 VL_OBJS+= ne2000.o rtl8139.o pcnet.o
diff --git a/meta/packages/qemu/files/qemu-x-no-sdl.patch b/meta/packages/qemu/files/qemu-x-no-sdl.patch
deleted file mode 100644
index eb00d9806b..0000000000
--- a/meta/packages/qemu/files/qemu-x-no-sdl.patch
+++ /dev/null
@@ -1,630 +0,0 @@
1diff -urN qemu-0.8.2/configure qemu-0.8.2-x/configure
2--- qemu-0.8.2/configure 2006-07-22 18:23:34.000000000 +0100
3+++ qemu-0.8.2-x/configure 2006-08-24 14:24:33.000000000 +0100
4@@ -492,6 +492,21 @@
5 fi # cross compilation
6 fi # -z $sdl
7
8+##########################################
9+# X Probe
10+
11+x11=no
12+if test -z "$sdl" || test "$sdl" = "no"; then
13+ x11=yes
14+fi
15+
16+if test "$x11" = "yes"; then
17+ x11=no
18+ if `pkg-config --exists x11 xext`; then
19+ x11=yes
20+ fi
21+fi
22+
23 # Check if tools are available to build documentation.
24 if [ -x "`which texi2html`" ] && [ -x "`which pod2man`" ]; then
25 build_docs="yes"
26@@ -540,6 +555,7 @@
27 if test "$sdl" != "no" ; then
28 echo "SDL static link $sdl_static"
29 fi
30+echo "X11 support $x11"
31 echo "mingw32 support $mingw32"
32 echo "Adlib support $adlib"
33 echo "CoreAudio support $coreaudio"
34@@ -748,14 +764,14 @@
35 fi
36
37 if test "$target_user_only" = "no" -a "$check_gfx" = "yes" \
38- -a "$sdl" = "no" -a "$cocoa" = "no" ; then
39+ -a "$sdl" = "no" -a "$x11" = "no" -a "$cocoa" = "no" ; then
40 echo "ERROR: QEMU requires SDL or Cocoa for graphical output"
41 echo "To build QEMU without graphical output configure with --disable-gfx-check"
42 echo "Note that this will disable all output from the virtual graphics card."
43 exit 1;
44 fi
45
46-#echo "Creating $config_mak, $config_h and $target_dir/Makefile"
47+echo "Creating $config_mak, $config_h and $target_dir/Makefile"
48
49 mkdir -p $target_dir
50 mkdir -p $target_dir/fpu
51@@ -882,6 +898,14 @@
52 fi
53 fi
54
55+# x11
56+if test "$x11" = "yes"; then
57+ echo "#define CONFIG_X11 1" >> $config_h
58+ echo "CONFIG_X11=yes" >> $config_mak
59+ echo "X11_LIBS=`pkg-config --libs x11 xext`" >> $config_mak
60+ echo "X11_CFLAGS=`pkg-config --cflags x11 xext`" >> $config_mak
61+fi
62+
63 if test "$cocoa" = "yes" ; then
64 echo "#define CONFIG_COCOA 1" >> $config_h
65 echo "CONFIG_COCOA=yes" >> $config_mak
66diff -urN qemu-0.8.2/Makefile.target qemu-0.8.2-x/Makefile.target
67--- qemu-0.8.2/Makefile.target 2006-07-22 18:23:34.000000000 +0100
68+++ qemu-0.8.2-x/Makefile.target 2006-08-23 14:47:17.000000000 +0100
69@@ -376,6 +376,9 @@
70 ifdef CONFIG_SDL
71 VL_OBJS+=sdl.o
72 endif
73+ifdef CONFIG_X11
74+VL_OBJS+=x.o
75+endif
76 VL_OBJS+=vnc.o
77 ifdef CONFIG_COCOA
78 VL_OBJS+=cocoa.o
79@@ -426,7 +429,7 @@
80 endif
81
82 $(QEMU_SYSTEM): $(VL_OBJS) libqemu.a
83- $(CC) $(VL_LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(VL_LIBS)
84+ $(CC) $(VL_LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(X11_LIBS) $(COCOA_LIBS) $(VL_LIBS)
85
86 cocoa.o: cocoa.m
87 $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
88@@ -434,6 +437,10 @@
89 sdl.o: sdl.c keymaps.c sdl_keysym.h
90 $(CC) $(CFLAGS) $(DEFINES) $(SDL_CFLAGS) -c -o $@ $<
91
92+x.o: x.c keymaps.c
93+ $(CC) $(CFLAGS) $(DEFINES) $(X11_CFLAGS) -c -o $@ $<
94+
95+
96 vnc.o: vnc.c keymaps.c sdl_keysym.h vnchextile.h
97 $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
98
99diff -urN qemu-0.8.2/vl.c qemu-0.8.2-x/vl.c
100--- qemu-0.8.2/vl.c 2006-07-22 18:23:34.000000000 +0100
101+++ qemu-0.8.2-x/vl.c 2006-09-29 18:58:26.000000000 +0100
102@@ -5217,6 +5217,9 @@
103 #ifdef USE_CODE_COPY
104 "-no-code-copy disable code copy acceleration\n"
105 #endif
106+#if defined(CONFIG_X11)
107+ "-parent xid Use pre-existing window as qemu output window\n"
108+#endif
109 #ifdef TARGET_I386
110 "-std-vga simulate a standard VGA card with VESA Bochs Extensions\n"
111 " (default is CL-GD5446 PCI VGA)\n"
112@@ -5302,6 +5305,8 @@
113 QEMU_OPTION_smp,
114 QEMU_OPTION_vnc,
115 QEMU_OPTION_no_acpi,
116+
117+ QEMU_OPTION_parent_xid,
118 };
119
120 typedef struct QEMUOption {
121@@ -5361,6 +5366,9 @@
122 #if defined(TARGET_PPC) || defined(TARGET_SPARC)
123 { "g", 1, QEMU_OPTION_g },
124 #endif
125+#if defined(CONFIG_X11)
126+ { "parent", HAS_ARG, QEMU_OPTION_parent_xid },
127+#endif
128 { "localtime", 0, QEMU_OPTION_localtime },
129 { "std-vga", 0, QEMU_OPTION_std_vga },
130 { "monitor", 1, QEMU_OPTION_monitor },
131@@ -5608,6 +5616,10 @@
132 char usb_devices[MAX_USB_CMDLINE][128];
133 int usb_devices_index;
134
135+#if defined(CONFIG_X11)
136+ unsigned long parent_xid = 0;
137+#endif
138+
139 LIST_INIT (&vm_change_state_head);
140 #ifndef _WIN32
141 {
142@@ -6021,6 +6033,11 @@
143 case QEMU_OPTION_no_acpi:
144 acpi_enabled = 0;
145 break;
146+#if defined(CONFIG_X11)
147+ case QEMU_OPTION_parent_xid:
148+ parent_xid = strtol(optarg, NULL, 0);
149+ break;
150+#endif
151 }
152 }
153 }
154@@ -6142,6 +6159,8 @@
155 sdl_display_init(ds, full_screen);
156 #elif defined(CONFIG_COCOA)
157 cocoa_display_init(ds, full_screen);
158+#elif defined(CONFIG_X11)
159+ x_display_init(ds, full_screen, parent_xid);
160 #else
161 dumb_display_init(ds);
162 #endif
163diff -urN qemu-0.8.2/vl.h qemu-0.8.2-x/vl.h
164--- qemu-0.8.2/vl.h 2006-07-22 18:23:34.000000000 +0100
165+++ qemu-0.8.2-x/vl.h 2006-09-29 18:35:32.000000000 +0100
166@@ -767,6 +767,9 @@
167 /* vnc.c */
168 void vnc_display_init(DisplayState *ds, int display);
169
170+/* x.c */
171+void x_display_init(DisplayState *ds, int display, unsigned long parent_xid);
172+
173 /* ide.c */
174 #define MAX_DISKS 4
175
176diff -urN qemu-0.8.2/x.c qemu-0.8.2-x/x.c
177--- qemu-0.8.2/x.c 1970-01-01 01:00:00.000000000 +0100
178+++ qemu-0.8.2-x/x.c 2006-09-29 18:35:02.000000000 +0100
179@@ -0,0 +1,451 @@
180+#include "vl.h"
181+
182+#include <X11/Xlib.h>
183+#include <X11/Xutil.h>
184+#include <X11/Xatom.h>
185+#include <X11/keysym.h>
186+#include <X11/extensions/XShm.h>
187+
188+#include <sys/ipc.h>
189+#include <sys/shm.h>
190+
191+typedef struct XHostScreen
192+{
193+ Display *xdpy;
194+ int xscreen;
195+ Visual *xvisual;
196+ Window xwin, xwinroot;
197+ GC xgc;
198+ int xdepth;
199+ XImage *ximg;
200+ int xwin_width, xwin_height;
201+ Bool use_fullscreen;
202+ Bool have_shm;
203+ unsigned char *fb_data;
204+ unsigned long cmap[256];
205+ XShmSegmentInfo shminfo;
206+}
207+XHostScreen;
208+
209+static XHostScreen *xscreen;
210+static int trapped_error_code = 0;
211+static int (*old_error_handler) (Display *d, XErrorEvent *e);
212+
213+static void
214+x_update(DisplayState *ds, int x, int y, int w, int h);
215+
216+static int
217+error_handler(Display *display,
218+ XErrorEvent *error)
219+{
220+ trapped_error_code = error->error_code;
221+ return 0;
222+}
223+
224+static void
225+x_errors_trap(void)
226+{
227+ trapped_error_code = 0;
228+ old_error_handler = XSetErrorHandler(error_handler);
229+}
230+
231+static int
232+x_errors_untrap(void)
233+{
234+ XSetErrorHandler(old_error_handler);
235+ return trapped_error_code;
236+}
237+
238+static void
239+x_update(DisplayState *ds, int x, int y, int w, int h)
240+{
241+ if (xscreen->have_shm)
242+ {
243+ XShmPutImage(xscreen->xdpy, xscreen->xwin, xscreen->xgc, xscreen->ximg,
244+ x, y, x, y, w, h, False);
245+ }
246+ else
247+ {
248+ XPutImage(xscreen->xdpy, xscreen->xwin, xscreen->xgc, xscreen->ximg,
249+ x, y, x, y, w, h);
250+ }
251+
252+ XSync(xscreen->xdpy, False);
253+}
254+
255+static void
256+x_resize(DisplayState *ds, int w, int h)
257+{
258+ Bool shm_success = False;
259+ int bitmap_pad;
260+ XSizeHints *size_hints;
261+
262+ if (xscreen->ximg != NULL)
263+ {
264+ if (xscreen->have_shm)
265+ {
266+ XShmDetach(xscreen->xdpy, &xscreen->shminfo);
267+ XDestroyImage (xscreen->ximg);
268+ shmdt(xscreen->shminfo.shmaddr);
269+ shmctl(xscreen->shminfo.shmid, IPC_RMID, 0);
270+ }
271+ else
272+ {
273+ if (xscreen->ximg->data)
274+ {
275+ free(xscreen->ximg->data);
276+ xscreen->ximg->data = NULL;
277+ }
278+
279+ XDestroyImage(xscreen->ximg);
280+ }
281+ }
282+
283+ if (xscreen->have_shm)
284+ {
285+ xscreen->ximg = XShmCreateImage(xscreen->xdpy,
286+ xscreen->xvisual,
287+ xscreen->xdepth,
288+ ZPixmap,
289+ NULL,
290+ &xscreen->shminfo,
291+ w, h );
292+
293+ xscreen->shminfo.shmid
294+ = shmget(IPC_PRIVATE,
295+ xscreen->ximg->bytes_per_line * h,
296+ IPC_CREAT|0777);
297+ xscreen->shminfo.shmaddr = xscreen->ximg->data
298+ = shmat(xscreen->shminfo.shmid, 0, 0);
299+
300+ if (xscreen->ximg->data == (char *)-1)
301+ {
302+ xscreen->have_shm = False;
303+ XDestroyImage(xscreen->ximg);
304+ shmctl(xscreen->shminfo.shmid, IPC_RMID, 0);
305+ }
306+ else
307+ {
308+ xscreen->shminfo.readOnly = False;
309+ XShmAttach(xscreen->xdpy, &xscreen->shminfo);
310+ shm_success = True;
311+ }
312+ }
313+
314+ if (!shm_success)
315+ {
316+ bitmap_pad = ( xscreen->xdepth > 16 ) ?
317+ 32 : (( xscreen->xdepth > 8 )? 16 : 8 );
318+
319+ xscreen->ximg = XCreateImage( xscreen->xdpy,
320+ xscreen->xvisual,
321+ xscreen->xdepth,
322+ ZPixmap, 0, 0,
323+ w,
324+ h,
325+ bitmap_pad,
326+ 0);
327+
328+ xscreen->ximg->data
329+ = malloc( xscreen->ximg->bytes_per_line * h );
330+ }
331+
332+ XResizeWindow(xscreen->xdpy, xscreen->xwin, w, h);
333+
334+ /* Ask the WM to keep our size static */
335+ size_hints = XAllocSizeHints();
336+ size_hints->max_width = size_hints->min_width = w;
337+ size_hints->max_height = size_hints->min_height = h;
338+ size_hints->flags = PMinSize|PMaxSize;
339+ XSetWMNormalHints(xscreen->xdpy, xscreen->xwin, size_hints);
340+ XFree(size_hints);
341+
342+ XMapWindow(xscreen->xdpy, xscreen->xwin);
343+
344+ XSync(xscreen->xdpy, False);
345+
346+ xscreen->xwin_width = w;
347+ xscreen->xwin_height = h;
348+
349+ if (1) // (ds->depth == xscreen->xdepth)
350+ {
351+ ds->data = xscreen->ximg->data;
352+ }
353+ else
354+ {
355+ xscreen->fb_data = malloc(w*h*(ds->depth>>3));
356+ ds->data = xscreen->fb_data;
357+ }
358+
359+ ds->linesize = xscreen->ximg->bytes_per_line;
360+ ds->depth = (xscreen->xdepth >= 24) ? 32 : xscreen->xdepth;
361+ ds->bgr = 0;
362+
363+#if 0
364+ if (ds->depth == 32 && screen->format->Rshift == 0) {
365+ ds->bgr = 1;
366+ } else {
367+ ds->bgr = 0;
368+ }
369+#endif
370+
371+ ds->width = w;
372+ ds->height = h;
373+
374+}
375+
376+static void
377+x_refresh(DisplayState *ds)
378+{
379+ vga_hw_update();
380+}
381+
382+static int
383+x_listen_poll(void *opaque)
384+{
385+ return XPending(xscreen->xdpy);
386+}
387+
388+static void
389+x_grab(void)
390+{
391+ static Bool grab = False;
392+
393+ if (!grab)
394+ {
395+ if (XGrabPointer (xscreen->xdpy, xscreen->xwin,
396+ True,
397+ NoEventMask,
398+ GrabModeAsync,
399+ GrabModeAsync,
400+ xscreen->xwin, None, CurrentTime) == 0
401+ && XGrabKeyboard (xscreen->xdpy, xscreen->xwin, True,
402+ GrabModeAsync,
403+ GrabModeAsync,
404+ CurrentTime) == 0)
405+ {
406+ grab = True;
407+ XStoreName(xscreen->xdpy, xscreen->xwin,
408+ "QEmu (ctrl+shift releases mouse and keyboard )");
409+ }
410+ }
411+ else
412+ {
413+ XUngrabPointer (xscreen->xdpy, CurrentTime);
414+ XUngrabKeyboard (xscreen->xdpy, CurrentTime);
415+ grab = False;
416+ XStoreName(xscreen->xdpy, xscreen->xwin,
417+ "QEmu (ctrl+shift grabs mouse and keyboard )");
418+ }
419+}
420+
421+static void
422+x_listen_read(void *opaque)
423+{
424+ XEvent xev;
425+ DisplayState *ds = opaque;
426+ Bool grabbed = False;
427+ static int last_x = 0, last_y = 0, button_state = 0, state;
428+
429+ if (XPending(xscreen->xdpy))
430+ {
431+ XNextEvent(xscreen->xdpy, &xev);
432+
433+ switch (xev.type)
434+ {
435+ case EnterNotify:
436+ case LeaveNotify:
437+ break;
438+ case FocusIn:
439+ if (!kbd_mouse_is_absolute())
440+ x_grab();
441+ break;
442+ case FocusOut:
443+ break;
444+ case Expose:
445+ while (XCheckTypedWindowEvent(xscreen->xdpy, xev.xexpose.window,
446+ Expose, &xev));
447+ x_update(ds, 0, 0,
448+ xscreen->xwin_width,
449+ xscreen->xwin_height);
450+ break;
451+ case KeyRelease:
452+ if ((XKeycodeToKeysym(xscreen->xdpy,
453+ xev.xkey.keycode,0) == XK_Shift_L
454+ || XKeycodeToKeysym(xscreen->xdpy,
455+ xev.xkey.keycode,0) == XK_Shift_R)
456+ && (xev.xkey.state & ControlMask))
457+ {
458+ x_grab();
459+ break;
460+ }
461+ case KeyPress:
462+ {
463+ int keycode = xev.xkey.keycode-8; /* X adds 8 to keycode */
464+
465+ /* FIXME: LUT needed here me thinks */
466+
467+ if (keycode & 0x80) /* Extended */
468+ kbd_put_keycode(0xe0);
469+
470+ if (xev.type == KeyPress)
471+ kbd_put_keycode(keycode & 0x7f);
472+ else
473+ kbd_put_keycode(keycode | 0x80);
474+ }
475+ break;
476+ case ButtonPress:
477+ case ButtonRelease:
478+ case MotionNotify:
479+ {
480+ int ev_state, ev_x, ev_y, dx, dy;
481+
482+ state = 0;
483+
484+ if (xev.type == MotionNotify)
485+ {
486+ ev_state = xev.xmotion.state;
487+ ev_x = xev.xmotion.x;
488+ ev_y = xev.xmotion.y;
489+
490+ if (ev_state & Button1Mask)
491+ state |= MOUSE_EVENT_LBUTTON;
492+ if (ev_state & Button2Mask)
493+ state |= MOUSE_EVENT_RBUTTON;
494+ if (ev_state & Button3Mask)
495+ state |= MOUSE_EVENT_MBUTTON;
496+
497+ /* Touchscreen dont send motion notifys */
498+ if (kbd_mouse_is_absolute() && state == 0)
499+ break;
500+ }
501+ else
502+ {
503+ ev_state = xev.xbutton.state;
504+ ev_x = xev.xbutton.x;
505+ ev_y = xev.xbutton.y;
506+
507+ if (xev.type == ButtonPress)
508+ {
509+ if (xev.xbutton.button == Button1)
510+ state |= MOUSE_EVENT_LBUTTON;
511+ if (xev.xbutton.state == Button1)
512+ state |= MOUSE_EVENT_RBUTTON;
513+ if (xev.xbutton.state & Button3)
514+ state |= MOUSE_EVENT_MBUTTON;
515+ }
516+ }
517+
518+ if (kbd_mouse_is_absolute())
519+ {
520+ dx = ev_x * 0x7FFF / xscreen->xwin_width;
521+ dy = ev_y * 0x7FFF / xscreen->xwin_height;
522+ }
523+ else
524+ {
525+ dx = ev_x - last_x;
526+ dy = ev_y - last_y;
527+ }
528+
529+ kbd_mouse_event(dx, dy, 0, state);
530+
531+ last_x = ev_x;
532+ last_y = ev_y;
533+ }
534+ break;
535+ default:
536+ break;
537+
538+ }
539+ }
540+ return;
541+}
542+
543+void
544+x_display_init(DisplayState *ds, int full_screen, unsigned long parent_xid)
545+{
546+ Cursor empty_cursor;
547+ Pixmap cursor_pxm;
548+ XColor col;
549+ XSetWindowAttributes attr;
550+
551+ xscreen = malloc(sizeof(XHostScreen));
552+ memset(xscreen, 0, sizeof(XHostScreen));
553+
554+ if ((xscreen->xdpy = XOpenDisplay(getenv("DISPLAY"))) == NULL)
555+ {
556+ fprintf(stderr, "\nqemu cannot open host display. Is DISPLAY set?\n");
557+ exit(-1);
558+ }
559+
560+ xscreen->xscreen = DefaultScreen(xscreen->xdpy);
561+ xscreen->xwinroot = RootWindow(xscreen->xdpy, xscreen->xscreen);
562+ xscreen->xgc = XCreateGC(xscreen->xdpy, xscreen->xwinroot, 0, NULL);
563+ xscreen->xdepth = DefaultDepth(xscreen->xdpy, xscreen->xscreen);
564+ xscreen->xvisual = DefaultVisual(xscreen->xdpy, xscreen->xscreen);
565+
566+ attr.event_mask = ButtonPressMask|ButtonReleaseMask|PointerMotionMask
567+ |KeyPressMask|KeyReleaseMask|ExposureMask
568+ |FocusChangeMask|EnterWindowMask|LeaveWindowMask;
569+
570+ xscreen->xwin = XCreateWindow(xscreen->xdpy,
571+ xscreen->xwinroot,
572+ 0,0,640,480,
573+ 0,
574+ CopyFromParent,
575+ CopyFromParent,
576+ CopyFromParent,
577+ CWEventMask,
578+ &attr);
579+
580+ xscreen->have_shm = True;
581+
582+ if (!XShmQueryExtension(xscreen->xdpy) || getenv("QEMU_X_NO_SHM"))
583+ {
584+ xscreen->have_shm = False;
585+ }
586+ else
587+ {
588+ XShmSegmentInfo shminfo;
589+
590+ shminfo.shmid=shmget(IPC_PRIVATE, 1, IPC_CREAT|0777);
591+ shminfo.shmaddr=shmat(shminfo.shmid,0,0);
592+ shminfo.readOnly=True;
593+
594+ x_errors_trap();
595+
596+ XShmAttach(xscreen->xdpy, &shminfo);
597+ XSync(xscreen->xdpy, False);
598+
599+ if (x_errors_untrap())
600+ {
601+ fprintf(stderr, "QEmu unable to use SHM XImages\n");
602+ xscreen->have_shm = False;
603+ }
604+
605+ shmdt(shminfo.shmaddr);
606+ shmctl(shminfo.shmid, IPC_RMID, 0);
607+ }
608+
609+ if (!kbd_mouse_is_absolute())
610+ {
611+ /* Only hide cursor if were not a touchscreen */
612+ cursor_pxm = XCreatePixmap (xscreen->xdpy, xscreen->xwinroot, 1, 1, 1);
613+ memset (&col, 0, sizeof (col));
614+ empty_cursor = XCreatePixmapCursor (xscreen->xdpy,
615+ cursor_pxm, cursor_pxm,
616+ &col, &col, 1, 1);
617+ XDefineCursor (xscreen->xdpy, xscreen->xwin, empty_cursor);
618+ XFreePixmap (xscreen->xdpy, cursor_pxm);
619+ }
620+
621+ ds->dpy_update = x_update;
622+ ds->dpy_resize = x_resize;
623+ ds->dpy_refresh = x_refresh;
624+
625+ if ((qemu_set_fd_handler2 (ConnectionNumber(xscreen->xdpy),
626+ x_listen_poll, x_listen_read, NULL, ds)) == -1)
627+ exit(-1);
628+
629+ x_resize(ds, 640, 480);
630+}
diff --git a/meta/packages/qemu/qemu_cvs.bb b/meta/packages/qemu/qemu_cvs.bb
index 38cd35705e..2531df15f0 100644
--- a/meta/packages/qemu/qemu_cvs.bb
+++ b/meta/packages/qemu/qemu_cvs.bb
@@ -1,64 +1,44 @@
1LICENSE = "GPL" 1LICENSE = "GPL"
2DEPENDS = "zlib" 2DEPENDS = "zlib"
3PV = "0.8.2+cvs${SRCDATE}" 3PV = "0.9.0+cvs${SRCDATE}"
4PR = "r4" 4PR = "r0"
5 5
6FILESDIR = "${WORKDIR}" 6FILESDIR = "${WORKDIR}"
7 7
8SRC_URI = "\ 8SRC_URI = "\
9 cvs://anonymous@cvs.savannah.nongnu.org/sources/qemu;method=pserver;rsh=ssh;module=qemu \ 9 cvs://anonymous@cvs.savannah.nongnu.org/sources/qemu;method=pserver;rsh=ssh;module=qemu \
10 svn://svn.o-hand.com/repos/misc/trunk/qemu-packaging/qemu;module=debian;proto=http;srcdate=20070119 \ 10 file://02_snapshot_use_tmpdir.patch;patch=1;pnum=0 \
11 file://debian/patches/01_doc_typos.patch;patch=1;pnum=1 \ 11 file://03_machines_list_no_error.patch;patch=1;pnum=0 \
12 file://debian/patches/02_snapshot_use_tmpdir.patch;patch=1;pnum=0 \ 12 file://04_do_not_print_rtc_freq_if_ok.patch;patch=1;pnum=1 \
13 file://debian/patches/03_machines_list_no_error.patch;patch=1;pnum=0 \ 13 file://05_non-fatal_if_linux_hd_missing.patch;patch=1;pnum=1 \
14 file://debian/patches/04_do_not_print_rtc_freq_if_ok.patch;patch=1;pnum=1 \ 14 file://06_exit_segfault.patch;patch=1;pnum=0 \
15 file://debian/patches/05_non-fatal_if_linux_hd_missing.patch;patch=1;pnum=1 \ 15 file://10_signal_jobs.patch;patch=1;pnum=0 \
16 file://debian/patches/06_exit_segfault.patch;patch=1;pnum=0 \ 16 file://11_signal_sigaction.patch;patch=1;pnum=0 \
17 file://debian/patches/10_signal_jobs.patch;patch=1;pnum=0 \ 17 file://12_signal_powerpc_support.patch;patch=1;pnum=1 \
18 file://debian/patches/11_signal_sigaction.patch;patch=1;pnum=0 \ 18 file://22_net_tuntap_stall.patch;patch=1;pnum=0 \
19 file://debian/patches/12_signal_powerpc_support.patch;patch=1;pnum=1 \ 19 file://31_syscalls.patch;patch=1;pnum=0 \
20 file://debian/patches/21_net_soopts.patch;patch=1;pnum=0 \ 20 file://32_syscall_sysctl.patch;patch=1;pnum=0 \
21 file://debian/patches/22_net_tuntap_stall.patch;patch=1;pnum=0 \ 21 file://33_syscall_ppc_clone.patch;patch=1;pnum=0 \
22 file://debian/patches/30_syscall_ipc.patch;patch=1;pnum=0 \ 22 file://39_syscall_fadvise64.patch;patch=1;pnum=0 \
23 file://debian/patches/31_syscalls.patch;patch=1;pnum=0 \ 23 file://41_arm_fpa_sigfpe.patch;patch=1;pnum=0 \
24 file://debian/patches/32_syscall_sysctl.patch;patch=1;pnum=0 \ 24 file://52_ne2000_return.patch;patch=1;pnum=1 \
25 file://debian/patches/33_syscall_ppc_clone.patch;patch=1;pnum=0 \ 25 file://61_safe_64bit_int.patch;patch=1;pnum=0 \
26 file://debian/patches/35_syscall_sockaddr.patch;patch=1;pnum=0 \ 26 file://63_sparc_build.patch;patch=1;pnum=0 \
27 file://debian/patches/36_syscall_prctl.patch;patch=1;pnum=0 \ 27 file://64_ppc_asm_constraints.patch;patch=1;pnum=1 \
28 file://debian/patches/37_syscall_mount.patch;patch=1;pnum=0 \ 28 file://65_kfreebsd.patch;patch=1;pnum=0 \
29 file://debian/patches/38_syscall_arm_statfs64.patch;patch=1;pnum=0 \ 29 file://66_tls_ld.patch;patch=1;pnum=0 \
30 file://debian/patches/39_syscall_fadvise64.patch;patch=1;pnum=0 \ 30 file://91-oh-sdl-cursor.patch;patch=1;pnum=0 \
31 file://debian/patches/41_arm_fpa_sigfpe.patch;patch=1;pnum=0 \ 31 file://93-oh-pl110-rgb.patch;patch=1;pnum=0 \
32 file://debian/patches/43_arm_cpustate.patch;patch=1;pnum=0 \ 32 file://94-oh-arm-nptl.patch;patch=1;pnum=1"
33 file://debian/patches/51_serial_small_divider.patch;patch=1;pnum=1 \
34 file://debian/patches/52_ne2000_return.patch;patch=1;pnum=1 \
35 file://debian/patches/55_unmux_socketcall.patch;patch=1;pnum=0 \
36 file://debian/patches/60_ppc_ld.patch;patch=1;pnum=1 \
37 file://debian/patches/61_safe_64bit_int.patch;patch=1;pnum=0 \
38 file://debian/patches/62_linux_boot_nasm.patch;patch=1;pnum=0 \
39 file://debian/patches/63_sparc_build.patch;patch=1;pnum=0 \
40 file://debian/patches/64_ppc_asm_constraints.patch;patch=1;pnum=1 \
41 file://debian/patches/65_kfreebsd.patch;patch=1;pnum=0 \
42 file://debian/patches/66_tls_ld.patch;patch=1;pnum=0 \
43 file://debian/patches/67_ppc_ftbfs.patch;patch=1;pnum=0 \
44 file://debian/patches/90-oh-wacom.patch;patch=1;pnum=0 \
45 file://debian/patches/91-oh-sdl-cursor.patch;patch=1;pnum=0 \
46 file://debian/patches/92-oh-pci-irq-sharing.patch;patch=1;pnum=0 \
47 file://debian/patches/93-oh-pl110-rgb.patch;patch=1;pnum=0 \
48 file://debian/patches/94-oh-arm-nptl.patch;patch=1;pnum=1 \
49 file://debian/patches/95-oh-compiler.patch;patch=1 \
50 file://debian/patches/96-x.patch;patch=1"
51# file://debian/patches/80_ui_curses.patch;patch=1;pnum=0 \
52 33
53# file://configure.patch;patch=1;pnum=1 \ 34# svn://svn.o-hand.com/repos/misc/trunk/qemu-packaging/qemu;module=debian;proto=http;srcdate=20070119 \
54# file://qemu-sdl-cursor.patch;patch=1;pnum=1 \ 35# file://debian/patches/21_net_soopts.patch;patch=1;pnum=0 \
55# file://arm_nptl.patch;patch=1;pnum=1 \ 36# file://debian/patches/35_syscall_sockaddr.patch;patch=1;pnum=0 \
56# file://pl110_rgb-r0.patch;patch=1;pnum=1 \ 37# file://debian/patches/43_arm_cpustate.patch;patch=1;pnum=0 \
57# file://qemu-pci-irq-sharing.patch;patch=1;pnum=1 \ 38# file://debian/patches/62_linux_boot_nasm.patch;patch=1;pnum=0 \
58# file://compiler.patch;patch=1;pnum=1 \ 39# file://debian/patches/67_ppc_ftbfs.patch;patch=1;pnum=0 \
59# file://qemu-usb-wacom-0.8.2.patch;patch=1;pnum=1 \ 40# file://debian/patches/80_ui_curses.patch;patch=1;pnum=0 \
60# file://qemu-usb-wacom-pressure.patch;patch=1;pnum=1 \ 41# file://debian/patches/96-x.patch;patch=1"
61# file://qemu-usb-wacom-buttons.patch;patch=1"
62 42
63S = "${WORKDIR}/qemu" 43S = "${WORKDIR}/qemu"
64 44