qemu: Upgrade qemu git to the latest 0.14 branch
Also add missing patch to build qemu-git [YOCTO #1013] got fixed (From OE-Core rev: 9b80846152931bed018f33baaaf1ba253e756867) Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
7f7de31e9c
commit
a2e232e231
|
@ -0,0 +1,53 @@
|
|||
Enable i386-linux-user
|
||||
|
||||
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
|
||||
|
||||
Index: qemu-0.14.0/Makefile.target
|
||||
===================================================================
|
||||
--- qemu-0.14.0.orig/Makefile.target
|
||||
+++ qemu-0.14.0/Makefile.target
|
||||
@@ -78,8 +78,13 @@ ifeq ($(TARGET_BASE_ARCH), i386)
|
||||
libobj-y += cpuid.o
|
||||
endif
|
||||
libobj-$(CONFIG_NEED_MMU) += mmu.o
|
||||
+ifndef CONFIG_LINUX_USER
|
||||
libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
|
||||
libobj-$(TARGET_X86_64) += helper_opengl.o opengl_exec.o
|
||||
+else
|
||||
+libobj-$(TARGET_I386) += dummygl.o
|
||||
+libobj-$(TARGET_X86_64) += dummygl.o
|
||||
+endif #CONFIG_LINUX_USER
|
||||
libobj-$(TARGET_ARM) += dummygl.o
|
||||
libobj-$(TARGET_MIPS) += dummygl.o
|
||||
libobj-$(TARGET_PPC) += dummygl.o
|
||||
Index: qemu-0.14.0/target-i386/dummygl.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ qemu-0.14.0/target-i386/dummygl.c
|
||||
@@ -0,0 +1,26 @@
|
||||
+#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)
|
||||
+{
|
||||
+
|
||||
+}
|
||||
+
|
||||
+void helper_opengl(void)
|
||||
+{
|
||||
+}
|
|
@ -0,0 +1,125 @@
|
|||
Index: qemu-0.14.0/Makefile.target
|
||||
===================================================================
|
||||
--- qemu-0.14.0.orig/Makefile.target
|
||||
+++ qemu-0.14.0/Makefile.target
|
||||
@@ -79,6 +79,12 @@ libobj-y += cpuid.o
|
||||
endif
|
||||
libobj-$(CONFIG_NEED_MMU) += mmu.o
|
||||
libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
|
||||
+libobj-$(TARGET_X86_64) += helper_opengl.o opengl_exec.o
|
||||
+libobj-$(TARGET_ARM) += dummygl.o
|
||||
+libobj-$(TARGET_MIPS) += dummygl.o
|
||||
+libobj-$(TARGET_MIPS64) += dummygl.o
|
||||
+libobj-$(TARGET_PPC) += dummygl.o
|
||||
+libobj-$(TARGET_SH4) += dummygl.o
|
||||
libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
|
||||
|
||||
libobj-y += disas.o
|
||||
Index: qemu-0.14.0/target-arm/dummygl.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ qemu-0.14.0/target-arm/dummygl.c
|
||||
@@ -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)
|
||||
+{
|
||||
+
|
||||
+}
|
||||
Index: qemu-0.14.0/target-mips/dummygl.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ qemu-0.14.0/target-mips/dummygl.c
|
||||
@@ -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)
|
||||
+{
|
||||
+
|
||||
+}
|
||||
Index: qemu-0.14.0/target-ppc/dummygl.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ qemu-0.14.0/target-ppc/dummygl.c
|
||||
@@ -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)
|
||||
+{
|
||||
+
|
||||
+}
|
||||
Index: qemu-0.14.0/target-sh4/dummygl.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ qemu-0.14.0/target-sh4/dummygl.c
|
||||
@@ -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)
|
||||
+{
|
||||
+
|
||||
+}
|
|
@ -0,0 +1,22 @@
|
|||
Fedora 13 switched the default behaviour of the linker to no longer
|
||||
indirectly link to required libraries (i.e. dependencies of a library
|
||||
already linked to). Therefore we need to explicitly pass the depended on
|
||||
libraries into the linker for building to work on Fedora 13.
|
||||
|
||||
More information is available on the Fedora Wiki:
|
||||
https://fedoraproject.org/wiki/UnderstandingDSOLinkChange
|
||||
|
||||
JL - 15/06/10
|
||||
Index: qemu-0.14.0/Makefile.target
|
||||
===================================================================
|
||||
--- qemu-0.14.0.orig/Makefile.target
|
||||
+++ qemu-0.14.0/Makefile.target
|
||||
@@ -218,7 +218,7 @@ obj-$(CONFIG_REALLY_VIRTFS) += virtio-9p
|
||||
obj-y += rwhandler.o
|
||||
obj-$(CONFIG_KVM) += kvm.o kvm-all.o
|
||||
obj-$(CONFIG_NO_KVM) += kvm-stub.o
|
||||
-LIBS+=-lz
|
||||
+LIBS+=-lz -lX11 -ldl
|
||||
|
||||
QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
|
||||
QEMU_CFLAGS += $(VNC_SASL_CFLAGS)
|
|
@ -0,0 +1,13 @@
|
|||
Index: qemu-0.14.0/Makefile
|
||||
===================================================================
|
||||
--- qemu-0.14.0.orig/Makefile
|
||||
+++ qemu-0.14.0/Makefile
|
||||
@@ -235,7 +235,7 @@ install-sysconfig:
|
||||
install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig
|
||||
$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
|
||||
ifneq ($(TOOLS),)
|
||||
- $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
|
||||
+ $(INSTALL_PROG) $(TOOLS) "$(DESTDIR)$(bindir)"
|
||||
endif
|
||||
ifneq ($(BLOBS),)
|
||||
$(INSTALL_DIR) "$(DESTDIR)$(datadir)"
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,115 @@
|
|||
# fix VMware VGA driver depth calculation error, which may cause segmentation fault
|
||||
#
|
||||
# ktian1, 06/29/2010
|
||||
Index: qemu-0.14.0/console.h
|
||||
===================================================================
|
||||
--- qemu-0.14.0.orig/console.h
|
||||
+++ qemu-0.14.0/console.h
|
||||
@@ -171,6 +171,12 @@ struct DisplayAllocator {
|
||||
void (*free_displaysurface)(DisplaySurface *surface);
|
||||
};
|
||||
|
||||
+struct DisplayPostCallback {
|
||||
+ void (*postcall) (void *);
|
||||
+ void *parm;
|
||||
+ struct DisplayPostCallback *next;
|
||||
+};
|
||||
+
|
||||
struct DisplayState {
|
||||
struct DisplaySurface *surface;
|
||||
void *opaque;
|
||||
@@ -178,6 +184,7 @@ struct DisplayState {
|
||||
|
||||
struct DisplayAllocator* allocator;
|
||||
struct DisplayChangeListener* listeners;
|
||||
+ struct DisplayPostCallback* postcalls;
|
||||
|
||||
void (*mouse_set)(int x, int y, int on);
|
||||
void (*cursor_define)(QEMUCursor *cursor);
|
||||
@@ -229,6 +236,12 @@ static inline void register_displaychang
|
||||
ds->listeners = dcl;
|
||||
}
|
||||
|
||||
+static inline void register_displaypostcallback(DisplayState *ds, DisplayPostCallback *dpc)
|
||||
+{
|
||||
+ dpc->next = ds->postcalls;
|
||||
+ ds->postcalls = dpc;
|
||||
+}
|
||||
+
|
||||
static inline void dpy_update(DisplayState *s, int x, int y, int w, int h)
|
||||
{
|
||||
struct DisplayChangeListener *dcl = s->listeners;
|
||||
Index: qemu-0.14.0/hw/vmware_vga.c
|
||||
===================================================================
|
||||
--- qemu-0.14.0.orig/hw/vmware_vga.c
|
||||
+++ qemu-0.14.0/hw/vmware_vga.c
|
||||
@@ -1001,8 +1001,9 @@ static void vmsvga_update_display(void *
|
||||
}
|
||||
}
|
||||
|
||||
-static void vmsvga_reset(struct vmsvga_state_s *s)
|
||||
+static void vmsvga_reset(void *parm)
|
||||
{
|
||||
+ struct vmsvga_state_s *s = (struct vmsvga_state_s *)parm;
|
||||
s->index = 0;
|
||||
s->enable = 0;
|
||||
s->config = 0;
|
||||
@@ -1207,6 +1208,8 @@ static const VMStateDescription vmstate_
|
||||
|
||||
static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size)
|
||||
{
|
||||
+ DisplayPostCallback *dpc;
|
||||
+
|
||||
s->scratch_size = SVGA_SCRATCH_SIZE;
|
||||
s->scratch = qemu_malloc(s->scratch_size * 4);
|
||||
|
||||
@@ -1224,7 +1227,10 @@ static void vmsvga_init(struct vmsvga_st
|
||||
vga_init(&s->vga);
|
||||
vmstate_register(NULL, 0, &vmstate_vga_common, &s->vga);
|
||||
|
||||
- vmsvga_reset(s);
|
||||
+ dpc = qemu_mallocz(sizeof(DisplayPostCallback));
|
||||
+ dpc->postcall = vmsvga_reset;
|
||||
+ dpc->parm = s;
|
||||
+ register_displaypostcallback(s->vga.ds, dpc);
|
||||
}
|
||||
|
||||
static void pci_vmsvga_map_ioport(PCIDevice *pci_dev, int region_num,
|
||||
Index: qemu-0.14.0/qemu-common.h
|
||||
===================================================================
|
||||
--- qemu-0.14.0.orig/qemu-common.h
|
||||
+++ qemu-0.14.0/qemu-common.h
|
||||
@@ -241,6 +241,7 @@ typedef struct DisplayState DisplayState
|
||||
typedef struct DisplayChangeListener DisplayChangeListener;
|
||||
typedef struct DisplaySurface DisplaySurface;
|
||||
typedef struct DisplayAllocator DisplayAllocator;
|
||||
+typedef struct DisplayPostCallback DisplayPostCallback;
|
||||
typedef struct PixelFormat PixelFormat;
|
||||
typedef struct TextConsole TextConsole;
|
||||
typedef TextConsole QEMUConsole;
|
||||
Index: qemu-0.14.0/vl.c
|
||||
===================================================================
|
||||
--- qemu-0.14.0.orig/vl.c
|
||||
+++ qemu-0.14.0/vl.c
|
||||
@@ -1920,6 +1920,7 @@ int main(int argc, char **argv, char **e
|
||||
char boot_devices[33] = "cad"; /* default to HD->floppy->CD-ROM */
|
||||
DisplayState *ds;
|
||||
DisplayChangeListener *dcl;
|
||||
+ DisplayPostCallback *dpc;
|
||||
int cyls, heads, secs, translation;
|
||||
QemuOpts *hda_opts = NULL, *opts;
|
||||
QemuOptsList *olist;
|
||||
@@ -3101,6 +3102,13 @@ int main(int argc, char **argv, char **e
|
||||
|
||||
/* display setup */
|
||||
dpy_resize(ds);
|
||||
+ dpc = ds->postcalls;
|
||||
+ while (dpc != NULL) {
|
||||
+ if (dpc->postcall != NULL)
|
||||
+ dpc->postcall(dpc->parm);
|
||||
+ dpc = dpc->next;
|
||||
+ }
|
||||
+
|
||||
dcl = ds->listeners;
|
||||
while (dcl != NULL) {
|
||||
if (dcl->dpy_refresh != NULL) {
|
|
@ -0,0 +1,63 @@
|
|||
Allow releasing the GLXContext/Drawable with glXMakeCurrent.
|
||||
|
||||
---
|
||||
commit d942ed4e853e08d2298f3e11e9a952c1d952bff5
|
||||
tree f0a934efd8a8ff48e2d96f0d6fc7d70bef106bfe
|
||||
parent 93619e6be184f8de08759d347825ee0d678a6f9c
|
||||
author Andrzej Zaborowski <andrew.zaborowski@intel.com> Tue, 16 Jun 2009 22:22:05 +0200
|
||||
committer Andrzej Zaborowski <andrew.zaborowski@intel.com> Tue, 16 Jun 2009 22:22:05 +0200
|
||||
|
||||
target-i386/opengl_exec.c | 31 ++++++++++++++++---------------
|
||||
1 files changed, 16 insertions(+), 15 deletions(-)
|
||||
|
||||
Index: qemu-0.14.0/target-i386/opengl_exec.c
|
||||
===================================================================
|
||||
--- qemu-0.14.0.orig/target-i386/opengl_exec.c
|
||||
+++ qemu-0.14.0/target-i386/opengl_exec.c
|
||||
@@ -1600,10 +1600,9 @@ int do_function_call(int func_number, ar
|
||||
fprintf(stderr, "client_drawable=%p fake_ctx=%d\n",
|
||||
(void *) client_drawable, fake_ctxt);
|
||||
|
||||
- if (client_drawable == 0 && fake_ctxt == 0) {
|
||||
+ if (client_drawable == 0 && fake_ctxt == 0)
|
||||
ret_int = glXMakeCurrent(dpy, 0, NULL);
|
||||
- process->current_state = &process->default_state;
|
||||
- } else if ((drawable = (GLXDrawable)
|
||||
+ else if ((drawable = (GLXDrawable)
|
||||
get_association_fakepbuffer_pbuffer(
|
||||
process, client_drawable))) {
|
||||
GLXContext ctxt = get_association_fakecontext_glxcontext(
|
||||
@@ -1651,19 +1650,21 @@ int do_function_call(int func_number, ar
|
||||
}
|
||||
|
||||
if (ret_int) {
|
||||
- for (i = 0; i < process->nb_states; i ++) {
|
||||
- if (process->glstates[i]->fake_ctxt == fake_ctxt) {
|
||||
- /* HACK !!! REMOVE */
|
||||
- process->current_state = process->glstates[i];
|
||||
- process->current_state->drawable = drawable;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
+ if (fake_ctxt) {
|
||||
+ for (i = 0; i < process->nb_states; i ++)
|
||||
+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
|
||||
+ /* HACK !!! REMOVE */
|
||||
+ process->current_state = process->glstates[i];
|
||||
+ process->current_state->drawable = drawable;
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
- if (i == process->nb_states) {
|
||||
- fprintf(stderr, "error remembering the new context\n");
|
||||
- exit(-1);
|
||||
- }
|
||||
+ if (i == process->nb_states) {
|
||||
+ fprintf(stderr, "error remembering the new context\n");
|
||||
+ exit(-1);
|
||||
+ }
|
||||
+ } else
|
||||
+ process->current_state = &process->default_state;
|
||||
}
|
||||
break;
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
This patch fix GL application start failure on qemu 0.14.0.
|
||||
|
||||
Some turn-on macro/variable are re-arranged, buffer pointer is extended to
|
||||
support 32/64b combination of target/host.
|
||||
|
||||
This is not perfect fix, and we need consider other GL alternatives in future.
|
||||
|
||||
Upstream-Status: other (logical part of qemu-git-qemugl-host.patch)
|
||||
|
||||
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
|
||||
|
||||
Index: qemu-0.14.0/target-i386/opengl_func.h
|
||||
===================================================================
|
||||
--- qemu-0.14.0.orig/target-i386/opengl_func.h 2011-04-08 16:43:46.000000000 +0800
|
||||
+++ qemu-0.14.0/target-i386/opengl_func.h 2011-04-08 16:45:55.000000000 +0800
|
||||
@@ -26,8 +26,9 @@
|
||||
#include "mesa_glext.h"
|
||||
|
||||
/* Argument list are internally of a type that can hold a target pointer
|
||||
- * or a host pointer. */
|
||||
-typedef target_phys_addr_t arg_t;
|
||||
+ * or a host pointer. If 32b target runs on 64b host, it should be big enough
|
||||
+ * to hold host pointer */
|
||||
+typedef long unsigned int arg_t;
|
||||
|
||||
enum {
|
||||
TYPE_NONE,
|
||||
Index: qemu-0.14.0/target-i386/translate.c
|
||||
===================================================================
|
||||
--- qemu-0.14.0.orig/target-i386/translate.c 2011-04-08 16:19:15.000000000 +0800
|
||||
+++ qemu-0.14.0/target-i386/translate.c 2011-04-08 16:22:03.000000000 +0800
|
||||
@@ -2652,17 +2652,19 @@
|
||||
s->is_jmp = DISAS_TB_JUMP;
|
||||
}
|
||||
|
||||
-int enable_gl = 0;
|
||||
+extern int enable_gl;
|
||||
|
||||
/* an interrupt is different from an exception because of the
|
||||
privilege checks */
|
||||
static void gen_interrupt(DisasContext *s, int intno,
|
||||
target_ulong cur_eip, target_ulong next_eip)
|
||||
{
|
||||
+#if !defined(CONFIG_USER_ONLY)
|
||||
if (enable_gl && intno == 0x99) {
|
||||
gen_helper_opengl();
|
||||
return;
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (s->cc_op != CC_OP_DYNAMIC)
|
||||
gen_op_set_cc_op(s->cc_op);
|
||||
Index: qemu-0.14.0/vl.c
|
||||
===================================================================
|
||||
--- qemu-0.14.0.orig/vl.c 2011-04-08 16:11:43.000000000 +0800
|
||||
+++ qemu-0.14.0/vl.c 2011-04-08 16:20:05.000000000 +0800
|
||||
@@ -229,7 +229,7 @@
|
||||
unsigned int nb_prom_envs = 0;
|
||||
const char *prom_envs[MAX_PROM_ENVS];
|
||||
int boot_menu;
|
||||
-extern int enable_gl;
|
||||
+int enable_gl = 0;
|
||||
|
||||
typedef struct FWBootEntry FWBootEntry;
|
||||
|
||||
@@ -1909,6 +1909,7 @@
|
||||
return popt;
|
||||
}
|
||||
|
||||
+#define TARGET_OPENGL_OK
|
||||
int main(int argc, char **argv, char **envp)
|
||||
{
|
||||
const char *gdbstub_dev = NULL;
|
|
@ -1,19 +1,20 @@
|
|||
require qemu.inc
|
||||
|
||||
SRCREV = "72bb3c7571226af13cfe9eec020a56add3d30a70"
|
||||
SRCREV = "56a60dd6d619877e9957ba06b92d2f276e3c229d"
|
||||
|
||||
PV = "0.12.4"
|
||||
PR = "r12"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
|
||||
file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
|
||||
|
||||
PV = "0.14"
|
||||
PR = "r0"
|
||||
|
||||
FILESPATH = "${FILE_DIRNAME}/qemu-${PV}/:${FILE_DIRNAME}/qemu-git/"
|
||||
FILESDIR = "${WORKDIR}"
|
||||
|
||||
SRC_URI = "\
|
||||
git://git.sv.gnu.org/qemu.git;protocol=git \
|
||||
file://workaround_bad_futex_headers.patch \
|
||||
git://git.qemu.org/qemu.git;protocol=git \
|
||||
file://qemu-git-qemugl-host.patch \
|
||||
file://no-strip.patch \
|
||||
file://fix-dirent.patch \
|
||||
file://fix-nogl.patch \
|
||||
file://qemugl-allow-glxcontext-release.patch \
|
||||
file://linker-flags.patch \
|
||||
|
|
Loading…
Reference in New Issue