qemu: Drop a ton of old now mostly inappropriate patches and update the qemugl passthrough patch

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
Richard Purdie 2009-06-09 22:16:58 +01:00
parent 3ac19a493e
commit be24aaa96c
13 changed files with 848 additions and 445 deletions

View File

@ -1,45 +0,0 @@
#DPATCHLEVEL=0
---
# linux-user/main.c | 8 ++++----
# 1 file changed, 4 insertions(+), 4 deletions(-)
#
Index: linux-user/main.c
===================================================================
--- linux-user/main.c.orig 2007-12-03 23:47:25.000000000 +0000
+++ linux-user/main.c 2007-12-03 23:47:41.000000000 +0000
@@ -714,7 +714,7 @@ void cpu_loop (CPUSPARCState *env)
default:
printf ("Unhandled trap: 0x%x\n", trapnr);
cpu_dump_state(env, stderr, fprintf, 0);
- exit (1);
+ _exit (1);
}
process_pending_signals (env);
}
@@ -1634,7 +1634,7 @@ void cpu_loop (CPUState *env)
default:
printf ("Unhandled trap: 0x%x\n", trapnr);
cpu_dump_state(env, stderr, fprintf, 0);
- exit (1);
+ _exit (1);
}
process_pending_signals (env);
}
@@ -1954,7 +1954,7 @@ int main(int argc, char **argv)
for(item = cpu_log_items; item->mask != 0; item++) {
printf("%-10s %s\n", item->name, item->help);
}
- exit(1);
+ _exit(1);
}
cpu_set_log(mask);
} else if (!strcmp(r, "s")) {
@@ -1973,7 +1973,7 @@ int main(int argc, char **argv)
if (qemu_host_page_size == 0 ||
(qemu_host_page_size & (qemu_host_page_size - 1)) != 0) {
fprintf(stderr, "page size must be a power of two\n");
- exit(1);
+ _exit(1);
}
} else if (!strcmp(r, "g")) {
gdbstub_port = atoi(argv[optind++]);

View File

@ -1,21 +0,0 @@
#DPATCHLEVEL=0
---
# linux-user/signal.c | 5 +++++
# 1 file changed, 5 insertions(+)
#
Index: linux-user/signal.c
===================================================================
--- linux-user/signal.c.orig 2007-12-03 23:47:44.000000000 +0000
+++ linux-user/signal.c 2007-12-03 23:47:46.000000000 +0000
@@ -512,6 +512,11 @@ int do_sigaction(int sig, const struct t
if (sig < 1 || sig > TARGET_NSIG || sig == SIGKILL || sig == SIGSTOP)
return -EINVAL;
+
+ /* no point doing the stuff as those are not allowed for sigaction */
+ if ((sig == TARGET_SIGKILL) || (sig == TARGET_SIGSTOP))
+ return -EINVAL;
+
k = &sigact_table[sig - 1];
#if defined(DEBUG_SIGNAL)
fprintf(stderr, "sigaction sig=%d act=0x%08x, oact=0x%08x\n",

View File

@ -1,18 +0,0 @@
#DPATCHLEVEL=0
---
# vl.c | 2 +-
# 1 file changed, 1 insertion(+), 1 deletion(-)
#
Index: net.c
===================================================================
--- net.c.orig 2009-01-05 11:27:29.000000000 +0000
+++ net.c 2009-01-05 11:27:40.000000000 +0000
@@ -852,7 +852,7 @@
return -1;
}
memset(&ifr, 0, sizeof(ifr));
- ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
+ ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_ONE_QUEUE;;
if (ifname[0] != '\0')
pstrcpy(ifr.ifr_name, IFNAMSIZ, ifname);
else

View File

@ -1,27 +0,0 @@
#DPATCHLEVEL=0
---
# linux-user/syscall.c | 11 ++++++++---
# 1 file changed, 8 insertions(+), 3 deletions(-)
#
Index: linux-user/syscall.c
===================================================================
--- linux-user/syscall.c.orig 2009-01-05 12:32:37.000000000 +0000
+++ linux-user/syscall.c 2009-01-05 12:32:37.000000000 +0000
@@ -298,6 +298,7 @@
extern int setfsuid(int);
extern int setfsgid(int);
extern int setgroups(int, gid_t *);
+extern int uselib(const char*);
#define ERRNO_TABLE_SIZE 1200
@@ -4397,7 +4398,8 @@
#endif
#ifdef TARGET_NR_uselib
case TARGET_NR_uselib:
- goto unimplemented;
+ ret = get_errno(uselib(path((const char*)arg1)));
+ break;
#endif
#ifdef TARGET_NR_swapon
case TARGET_NR_swapon:

View File

@ -1,17 +0,0 @@
---
hw/ne2000.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: qemu/hw/ne2000.c
===================================================================
--- qemu.orig/hw/ne2000.c 2007-12-03 19:32:52.000000000 +0000
+++ qemu/hw/ne2000.c 2007-12-03 19:33:55.000000000 +0000
@@ -217,7 +217,7 @@ static int ne2000_can_receive(void *opaq
NE2000State *s = opaque;
if (s->cmd & E8390_STOP)
- return 1;
+ return 0;
return !ne2000_buffer_full(s);
}

View File

@ -1,18 +0,0 @@
#DPATCHLEVEL=0
---
# sparc.ld | 2 +-
# 1 file changed, 1 insertion(+), 1 deletion(-)
#
Index: sparc.ld
===================================================================
--- sparc.ld.orig 2007-12-03 15:40:26.000000000 +0000
+++ sparc.ld 2007-12-03 16:05:06.000000000 +0000
@@ -6,7 +6,7 @@ ENTRY(_start)
SECTIONS
{
/* Read-only sections, merged into text segment: */
- . = 0x60000000 + SIZEOF_HEADERS;
+ . = 0x60000000 + 0x400;
.interp : { *(.interp) }
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }

View File

@ -1,18 +0,0 @@
#DPATCHLEVEL=1
---
# cpu-all.h | 2 +-
# 1 file changed, 1 insertion(+), 1 deletion(-)
#
Index: qemu/cpu-all.h
===================================================================
--- qemu.orig/cpu-all.h 2007-06-13 11:48:22.000000000 +0100
+++ qemu/cpu-all.h 2007-06-13 11:51:56.000000000 +0100
@@ -250,7 +250,7 @@ static inline void stw_le_p(void *ptr, i
static inline void stl_le_p(void *ptr, int v)
{
#ifdef __powerpc__
- __asm__ __volatile__ ("stwbrx %1,0,%2" : "=m" (*(uint32_t *)ptr) : "r" (v), "r" (ptr));
+ __asm__ __volatile__ ("stwbrx %0,0,%1" : : "r" (v), "r" (ptr) : "memory");
#else
uint8_t *p = ptr;
p[0] = v;

View File

@ -1,55 +0,0 @@
---
arm.ld | 7 +++++++
i386.ld | 7 +++++++
2 files changed, 14 insertions(+)
Index: arm.ld
===================================================================
--- arm.ld.orig 2007-06-13 11:48:22.000000000 +0100
+++ arm.ld 2007-06-13 11:51:56.000000000 +0100
@@ -26,6 +26,10 @@ SECTIONS
{ *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
.rela.rodata :
{ *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
+ .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
+ .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
+ .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
+ .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
.rel.got : { *(.rel.got) }
.rela.got : { *(.rela.got) }
.rel.ctors : { *(.rel.ctors) }
@@ -58,6 +62,9 @@ SECTIONS
.ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }
__exidx_end = .;
.reginfo : { *(.reginfo) }
+ /* Thread Local Storage sections */
+ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
+ .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
/* Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. */
. = ALIGN(0x100000) + (. & (0x100000 - 1));
Index: i386.ld
===================================================================
--- i386.ld.orig 2007-06-13 11:48:22.000000000 +0100
+++ i386.ld 2007-06-13 11:51:56.000000000 +0100
@@ -28,6 +28,10 @@ SECTIONS
{ *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
.rela.rodata :
{ *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
+ .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
+ .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
+ .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
+ .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
.rel.got : { *(.rel.got) }
.rela.got : { *(.rela.got) }
.rel.ctors : { *(.rel.ctors) }
@@ -53,6 +57,9 @@ SECTIONS
_etext = .;
PROVIDE (etext = .);
.fini : { *(.fini) } =0x47ff041f
+ /* Thread Local Storage sections */
+ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
+ .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
. = ALIGN(32 / 8);
PROVIDE (__preinit_array_start = .);
.preinit_array : { *(.preinit_array) }

View File

@ -1,18 +0,0 @@
=== modified file 'sdl.c'
---
sdl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: sdl.c
===================================================================
--- sdl.c.orig 2007-12-03 19:32:15.000000000 +0000
+++ sdl.c 2007-12-03 19:34:04.000000000 +0000
@@ -247,7 +247,7 @@ static void sdl_hide_cursor(void)
if (kbd_mouse_is_absolute()) {
SDL_ShowCursor(1);
- SDL_SetCursor(sdl_cursor_hidden);
+ /* SDL_SetCursor(sdl_cursor_hidden); */
} else {
SDL_ShowCursor(0);
}

View File

@ -0,0 +1,40 @@
Index: git/Makefile.target
===================================================================
--- git.orig/Makefile.target 2009-06-09 22:05:27.000000000 +0100
+++ git/Makefile.target 2009-06-09 22:05:28.000000000 +0100
@@ -155,6 +155,8 @@
ifeq ($(TARGET_BASE_ARCH), i386)
LIBOBJS+=helper_opengl.o opengl_exec.o
+else
+LIBOBJS+=dummygl.o
endif
ifeq ($(TARGET_BASE_ARCH), arm)
Index: git/target-arm/dummygl.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/target-arm/dummygl.c 2009-06-09 22:15:55.000000000 +0100
@@ -0,0 +1,22 @@
+#include <string.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <stdint.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
+{
+
+}
+
+void opengl_process_enable(void)
+{
+
+}
+
+
+void mem_opengl(uint64_t ptr)
+{
+
+}

View File

@ -1,37 +0,0 @@
---
linux-user/mmap.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Index: trunk/linux-user/mmap.c
===================================================================
--- trunk.orig/linux-user/mmap.c 2009-01-05 11:09:58.000000000 +0000
+++ trunk/linux-user/mmap.c 2009-01-05 12:46:33.000000000 +0000
@@ -122,6 +122,10 @@
munmap(p, *p);
}
+#ifndef MAP_32BIT
+#define MAP_32BIT 0
+#endif
+
/* NOTE: all the constants are the HOST ones, but addresses are target. */
int target_mprotect(abi_ulong start, abi_ulong len, int prot)
{
@@ -365,7 +369,7 @@
especially important if qemu_host_page_size >
qemu_real_host_page_size */
p = mmap(g2h(mmap_start),
- host_len, prot, flags | MAP_FIXED, fd, host_offset);
+ host_len, prot, flags | MAP_FIXED | MAP_32BIT, fd, host_offset);
if (p == MAP_FAILED)
goto fail;
/* update start so that it points to the file position at 'offset' */
@@ -567,7 +571,7 @@
flags | MREMAP_FIXED,
g2h(mmap_start));
} else {
- host_addr = mremap(g2h(old_addr), old_size, new_size, flags);
+ host_addr = mremap(g2h(old_addr), old_size, new_size, flags | MAP_32BIT);
/* Check if address fits target address space */
if ((unsigned long)host_addr + new_size > (abi_ulong)-1) {
/* Revert mremap() changes */

View File

@ -1,28 +1,19 @@
LICENSE = "GPL"
DEPENDS = "zlib"
PV = "0.10.2+git${SRCREV}"
PR = "r1"
PR = "r4"
FILESPATH = "${FILE_DIRNAME}/qemu-${PV}/:${FILE_DIRNAME}/qemu-git/"
SRC_URI = "\
git://git.sv.gnu.org/qemu.git;protocol=git \
file://06_exit_segfault.patch;patch=1;pnum=0 \
file://11_signal_sigaction.patch;patch=1;pnum=0 \
file://22_net_tuntap_stall.patch;patch=1;pnum=0 \
file://31_syscalls.patch;patch=1;pnum=0 \
file://52_ne2000_return.patch;patch=1;pnum=1 \
file://63_sparc_build.patch;patch=1;pnum=0 \
file://66_tls_ld.patch;patch=1;pnum=0 \
file://91-oh-sdl-cursor.patch;patch=1;pnum=0 \
file://workaround_bad_futex_headers.patch;patch=1 \
file://qemu-add-gl-host-code.patch;patch=1 \
file://qemu-git-qemugl-host.patch;patch=1 \
file://no-strip.patch;patch=1 \
file://fix-dirent.patch;patch=1 \
file://fix-nogl.patch;patch=1 \
file://zlibsearch.patch;patch=1 "
# file://qemu-amd64-32b-mapping-0.9.0.patch;patch=1
S = "${WORKDIR}/git"
#EXTRA_OECONF += "--disable-sdl"