summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu-1.2.0
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-09-06 15:22:55 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-10 13:01:55 +0100
commit11432c69fa396eaad3eb5bd1644e9c86b80b5e55 (patch)
tree23ff736edd81ad50969cb9a68e6c95af8c182b17 /meta/recipes-devtools/qemu/qemu-1.2.0
parentf6cc0772504f3af0869f31abb0da0e5686c61aa8 (diff)
downloadpoky-11432c69fa396eaad3eb5bd1644e9c86b80b5e55.tar.gz
qemu: Update from 0.15 to 1.2
Forward port the patches which were not applied upstream (From OE-Core rev: 0c1328a27881f1b3046ed527447608a9fa91b1ea) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu-1.2.0')
-rw-r--r--meta/recipes-devtools/qemu/qemu-1.2.0/arm-bgr.patch30
-rw-r--r--meta/recipes-devtools/qemu/qemu-1.2.0/enable-i386-linux-user.patch55
-rw-r--r--meta/recipes-devtools/qemu/qemu-1.2.0/fallback-to-safe-mmap_min_addr.patch39
-rw-r--r--meta/recipes-devtools/qemu/qemu-1.2.0/fix-configure-checks.patch22
-rw-r--r--meta/recipes-devtools/qemu/qemu-1.2.0/init-info.patch18
-rw-r--r--meta/recipes-devtools/qemu/qemu-1.2.0/larger_default_ram_size.patch22
-rw-r--r--meta/recipes-devtools/qemu/qemu-1.2.0/linker-flags.patch25
-rw-r--r--meta/recipes-devtools/qemu/qemu-1.2.0/no-strip.patch15
-rw-r--r--meta/recipes-devtools/qemu/qemu-1.2.0/powerpc_rom.binbin0 -> 4096 bytes
-rw-r--r--meta/recipes-devtools/qemu/qemu-1.2.0/qemu-vmware-vga-depth.patch106
10 files changed, 332 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-1.2.0/arm-bgr.patch b/meta/recipes-devtools/qemu/qemu-1.2.0/arm-bgr.patch
new file mode 100644
index 0000000000..f3ebde6364
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-1.2.0/arm-bgr.patch
@@ -0,0 +1,30 @@
1After kernel commit:
2
3http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-3.0/commit/?h=meta&id=9728c1b6a724daefc413b44e10253cdbb5e06d08
4
5It appears that the emulated colours in qemu are incorrect and that
6the red and blue channels are reversed. This patch reverses that logic
7so the colours are correctly displayed on the versatile platform which
8doesn't support the BGR bit.
9
10RP 16/9/2011
11
12Upstream-Status: Pending
13
14Index: qemu-1.2.0/hw/pl110.c
15===================================================================
16--- qemu-1.2.0.orig/hw/pl110.c 2012-09-06 14:07:27.619821133 -0700
17+++ qemu-1.2.0/hw/pl110.c 2012-09-06 14:12:07.699829648 -0700
18@@ -168,7 +168,11 @@
19 fprintf(stderr, "pl110: Bad color depth\n");
20 exit(1);
21 }
22- if (s->cr & PL110_CR_BGR)
23+
24+ if (s->version && s->bpp == BPP_16)
25+ /* Code assumes BPP_16 == 565 and BGR is never set on the versatile in 565 mode */
26+ bpp_offset = 0;
27+ else if (s->cr & PL110_CR_BGR)
28 bpp_offset = 0;
29 else
30 bpp_offset = 24;
diff --git a/meta/recipes-devtools/qemu/qemu-1.2.0/enable-i386-linux-user.patch b/meta/recipes-devtools/qemu/qemu-1.2.0/enable-i386-linux-user.patch
new file mode 100644
index 0000000000..bb0d6a3848
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-1.2.0/enable-i386-linux-user.patch
@@ -0,0 +1,55 @@
1Enable i386-linux-user
2
3Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
4
5Upstream-Status: Inappropriate [configuration]
6
7Index: qemu-0.14.0/Makefile.target
8===================================================================
9--- qemu-0.14.0.orig/Makefile.target
10+++ qemu-0.14.0/Makefile.target
11@@ -78,8 +78,13 @@ ifeq ($(TARGET_BASE_ARCH), i386)
12 libobj-y += cpuid.o
13 endif
14 libobj-$(CONFIG_NEED_MMU) += mmu.o
15+ifndef CONFIG_LINUX_USER
16 libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
17 libobj-$(TARGET_X86_64) += helper_opengl.o opengl_exec.o
18+else
19+libobj-$(TARGET_I386) += dummygl.o
20+libobj-$(TARGET_X86_64) += dummygl.o
21+endif #CONFIG_LINUX_USER
22 libobj-$(TARGET_ARM) += dummygl.o
23 libobj-$(TARGET_MIPS) += dummygl.o
24 libobj-$(TARGET_PPC) += dummygl.o
25Index: qemu-0.14.0/target-i386/dummygl.c
26===================================================================
27--- /dev/null
28+++ qemu-0.14.0/target-i386/dummygl.c
29@@ -0,0 +1,26 @@
30+#include <string.h>
31+#include <stdlib.h>
32+#include <assert.h>
33+#include <stdint.h>
34+#include <X11/Xlib.h>
35+#include <X11/Xutil.h>
36+
37+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
38+{
39+
40+}
41+
42+void opengl_process_enable(void)
43+{
44+
45+}
46+
47+
48+void mem_opengl(uint64_t ptr)
49+{
50+
51+}
52+
53+void helper_opengl(void)
54+{
55+}
diff --git a/meta/recipes-devtools/qemu/qemu-1.2.0/fallback-to-safe-mmap_min_addr.patch b/meta/recipes-devtools/qemu/qemu-1.2.0/fallback-to-safe-mmap_min_addr.patch
new file mode 100644
index 0000000000..2075386b9f
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-1.2.0/fallback-to-safe-mmap_min_addr.patch
@@ -0,0 +1,39 @@
1From c313f89c33217ac0e471554dace2144718f86669 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Thu, 13 May 2010 12:23:40 +0200
4Subject: [PATCH] linux-user: use default mmap_min_addr 65536 when /proc/sys/vm/mmap_min_addr cannot be read
5
6* 65536 is default at least for ubuntu and fedora.
7---
8 linux-user/main.c | 5 +++++
9 1 files changed, 5 insertions(+), 0 deletions(-)
10
11Upstream-Status: Pending
12
13Index: qemu-0.14.0/linux-user/main.c
14===================================================================
15--- qemu-0.14.0.orig/linux-user/main.c
16+++ qemu-0.14.0/linux-user/main.c
17@@ -36,6 +36,7 @@
18 #include "envlist.h"
19
20 #define DEBUG_LOGFILE "/tmp/qemu.log"
21+#define MMAP_MIN_ADDR_DEFAULT 65536
22
23 char *exec_path;
24
25@@ -3010,8 +3011,14 @@ int main(int argc, char **argv, char **e
26 if (fscanf(fp, "%lu", &tmp) == 1) {
27 mmap_min_addr = tmp;
28 qemu_log("host mmap_min_addr=0x%lx\n", mmap_min_addr);
29+ } else {
30+ qemu_log("cannot read value from /proc/sys/vm/mmap_min_addr, assuming %d\n", MMAP_MIN_ADDR_DEFAULT);
31+ mmap_min_addr = MMAP_MIN_ADDR_DEFAULT;
32 }
33 fclose(fp);
34+ } else {
35+ qemu_log("cannot open /proc/sys/vm/mmap_min_addr for reading, assuming %d\n", MMAP_MIN_ADDR_DEFAULT);
36+ mmap_min_addr = MMAP_MIN_ADDR_DEFAULT;
37 }
38 }
39
diff --git a/meta/recipes-devtools/qemu/qemu-1.2.0/fix-configure-checks.patch b/meta/recipes-devtools/qemu/qemu-1.2.0/fix-configure-checks.patch
new file mode 100644
index 0000000000..ef77c92842
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-1.2.0/fix-configure-checks.patch
@@ -0,0 +1,22 @@
1In native builds, qemu can fail to find zlib development files in the native
2sysroot and the build machine might not have zlib-dev packages installed.
3
4Add CFLAGS to qemu's CFLAGS which in the native case means BUILD_CFLAGS are
5added and files in the sysroot can be found.
6
7Patch from Paul Eggleton, Comments by RP 28/11/10
8
9Upstream-Status: Inappropriate [embedded specific]
10
11Index: qemu-1.2.0/configure
12===================================================================
13--- qemu-1.2.0.orig/configure 2012-09-05 07:03:06.000000000 -0700
14+++ qemu-1.2.0/configure 2012-09-06 13:55:07.007793823 -0700
15@@ -281,6 +281,7 @@
16 QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
17 QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
18 QEMU_INCLUDES="-I. -I\$(SRC_PATH) -I\$(SRC_PATH)/fpu"
19+QEMU_CFLAGS="$QEMU_CFLAGS $CFLAGS"
20 if test "$debug_info" = "yes"; then
21 CFLAGS="-g $CFLAGS"
22 LDFLAGS="-g $LDFLAGS"
diff --git a/meta/recipes-devtools/qemu/qemu-1.2.0/init-info.patch b/meta/recipes-devtools/qemu/qemu-1.2.0/init-info.patch
new file mode 100644
index 0000000000..2250444a2b
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-1.2.0/init-info.patch
@@ -0,0 +1,18 @@
1# This is a workaround to the crashes seen on Ubuntu. Setting info to zero
2# makes info.info.x11.display zero and avoids the calls to
3# opengl_exec_set_parent_window, one of which is crashing.
4
5Upstream-Status: Pending
6
7Index: qemu-0.14.0/ui/sdl.c
8===================================================================
9--- qemu-0.14.0.orig/ui/sdl.c
10+++ qemu-0.14.0/ui/sdl.c
11@@ -863,6 +863,7 @@ void sdl_display_init(DisplayState *ds,
12 vi = SDL_GetVideoInfo();
13 host_format = *(vi->vfmt);
14
15+ bzero(&info, sizeof(info));
16 SDL_GetWMInfo(&info);
17 if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
18 opengl_exec_set_parent_window(info.info.x11.display,
diff --git a/meta/recipes-devtools/qemu/qemu-1.2.0/larger_default_ram_size.patch b/meta/recipes-devtools/qemu/qemu-1.2.0/larger_default_ram_size.patch
new file mode 100644
index 0000000000..711c36071d
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-1.2.0/larger_default_ram_size.patch
@@ -0,0 +1,22 @@
1This patch is taken from debian. 128M is too less sometimes if distro
2with lot of packages is booted so this patch raises the default to 384M
3
4It has not been applied to upstream qemu
5
6Khem Raj <raj.khem@gmail.com>
7
8Upstream-Status: Pending
9
10Index: qemu-0.14.0/vl.c
11===================================================================
12--- qemu-0.14.0.orig/vl.c
13+++ qemu-0.14.0/vl.c
14@@ -168,7 +168,7 @@ int main(int argc, char **argv)
15 //#define DEBUG_NET
16 //#define DEBUG_SLIRP
17
18-#define DEFAULT_RAM_SIZE 128
19+#define DEFAULT_RAM_SIZE 384
20
21 #define MAX_VIRTIO_CONSOLES 1
22
diff --git a/meta/recipes-devtools/qemu/qemu-1.2.0/linker-flags.patch b/meta/recipes-devtools/qemu/qemu-1.2.0/linker-flags.patch
new file mode 100644
index 0000000000..0106ae2420
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-1.2.0/linker-flags.patch
@@ -0,0 +1,25 @@
1Fedora 13 switched the default behaviour of the linker to no longer
2indirectly link to required libraries (i.e. dependencies of a library
3already linked to). Therefore we need to explicitly pass the depended on
4libraries into the linker for building to work on Fedora 13.
5
6More information is available on the Fedora Wiki:
7https://fedoraproject.org/wiki/UnderstandingDSOLinkChange
8
9JL - 15/06/10
10
11Upstream-Status: Inappropriate [configuration]
12
13Index: qemu-1.2.0/Makefile.target
14===================================================================
15--- qemu-1.2.0.orig/Makefile.target 2012-09-05 07:03:06.000000000 -0700
16+++ qemu-1.2.0/Makefile.target 2012-09-06 13:42:24.819764288 -0700
17@@ -130,7 +130,7 @@
18 obj-$(CONFIG_HAVE_CORE_DUMP) += dump.o
19 obj-$(CONFIG_NO_GET_MEMORY_MAPPING) += memory_mapping-stub.o
20 obj-$(CONFIG_NO_CORE_DUMP) += dump-stub.o
21-LIBS+=-lz
22+LIBS+=-lz -lX11 -ldl
23
24 QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
25 QEMU_CFLAGS += $(VNC_SASL_CFLAGS)
diff --git a/meta/recipes-devtools/qemu/qemu-1.2.0/no-strip.patch b/meta/recipes-devtools/qemu/qemu-1.2.0/no-strip.patch
new file mode 100644
index 0000000000..d6a4377cd0
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-1.2.0/no-strip.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Inappropriate [configuration]
2
3Index: qemu-0.14.0/Makefile
4===================================================================
5--- qemu-0.14.0.orig/Makefile
6+++ qemu-0.14.0/Makefile
7@@ -235,7 +235,7 @@ install-sysconfig:
8 install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig
9 $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
10 ifneq ($(TOOLS),)
11- $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
12+ $(INSTALL_PROG) $(TOOLS) "$(DESTDIR)$(bindir)"
13 endif
14 ifneq ($(BLOBS),)
15 $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
diff --git a/meta/recipes-devtools/qemu/qemu-1.2.0/powerpc_rom.bin b/meta/recipes-devtools/qemu/qemu-1.2.0/powerpc_rom.bin
new file mode 100644
index 0000000000..c4044296c5
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-1.2.0/powerpc_rom.bin
Binary files differ
diff --git a/meta/recipes-devtools/qemu/qemu-1.2.0/qemu-vmware-vga-depth.patch b/meta/recipes-devtools/qemu/qemu-1.2.0/qemu-vmware-vga-depth.patch
new file mode 100644
index 0000000000..a1b8035b70
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-1.2.0/qemu-vmware-vga-depth.patch
@@ -0,0 +1,106 @@
1# fix VMware VGA driver depth calculation error, which may cause segmentation fault
2#
3# ktian1, 06/29/2010
4
5Upstream-Status: Pending
6
7Index: qemu-1.2.0/console.h
8===================================================================
9--- qemu-1.2.0.orig/console.h 2012-09-06 14:12:23.371832381 -0700
10+++ qemu-1.2.0/console.h 2012-09-06 14:12:23.627832390 -0700
11@@ -171,6 +171,12 @@
12 void (*free_displaysurface)(DisplaySurface *surface);
13 };
14
15+struct DisplayPostCallback {
16+ void (*postcall) (void *);
17+ void *parm;
18+ struct DisplayPostCallback *next;
19+};
20+
21 struct DisplayState {
22 struct DisplaySurface *surface;
23 void *opaque;
24@@ -178,6 +184,7 @@
25
26 struct DisplayAllocator* allocator;
27 struct DisplayChangeListener* listeners;
28+ struct DisplayPostCallback* postcalls;
29
30 void (*mouse_set)(int x, int y, int on);
31 void (*cursor_define)(QEMUCursor *cursor);
32@@ -233,6 +240,12 @@
33 ds->listeners = dcl;
34 }
35
36+static inline void register_displaypostcallback(DisplayState *ds, DisplayPostCallback *dpc)
37+{
38+ dpc->next = ds->postcalls;
39+ ds->postcalls = dpc;
40+}
41+
42 static inline void dpy_update(DisplayState *s, int x, int y, int w, int h)
43 {
44 struct DisplayChangeListener *dcl = s->listeners;
45Index: qemu-1.2.0/hw/vmware_vga.c
46===================================================================
47--- qemu-1.2.0.orig/hw/vmware_vga.c 2012-09-06 14:12:23.371832381 -0700
48+++ qemu-1.2.0/hw/vmware_vga.c 2012-09-06 14:18:05.595845288 -0700
49@@ -1081,6 +1081,8 @@
50 static void vmsvga_init(struct vmsvga_state_s *s,
51 MemoryRegion *address_space, MemoryRegion *io)
52 {
53+ DisplayPostCallback *dpc;
54+
55 s->scratch_size = SVGA_SCRATCH_SIZE;
56 s->scratch = g_malloc(s->scratch_size * 4);
57
58@@ -1098,6 +1100,10 @@
59 vga_common_init(&s->vga);
60 vga_init(&s->vga, address_space, io, true);
61 vmstate_register(NULL, 0, &vmstate_vga_common, &s->vga);
62+ dpc = g_malloc0(sizeof(DisplayPostCallback));
63+ dpc->postcall = vmsvga_reset;
64+ dpc->parm = s;
65+ register_displaypostcallback(s->vga.ds, dpc);
66
67 s->depth = ds_get_bits_per_pixel(s->vga.ds);
68 s->bypp = ds_get_bytes_per_pixel(s->vga.ds);
69Index: qemu-1.2.0/qemu-common.h
70===================================================================
71--- qemu-1.2.0.orig/qemu-common.h 2012-09-06 14:12:23.371832381 -0700
72+++ qemu-1.2.0/qemu-common.h 2012-09-06 14:12:23.643832391 -0700
73@@ -250,6 +250,7 @@
74 typedef struct DisplayChangeListener DisplayChangeListener;
75 typedef struct DisplaySurface DisplaySurface;
76 typedef struct DisplayAllocator DisplayAllocator;
77+typedef struct DisplayPostCallback DisplayPostCallback;
78 typedef struct PixelFormat PixelFormat;
79 typedef struct TextConsole TextConsole;
80 typedef TextConsole QEMUConsole;
81Index: qemu-1.2.0/vl.c
82===================================================================
83--- qemu-1.2.0.orig/vl.c 2012-09-06 14:12:23.371832381 -0700
84+++ qemu-1.2.0/vl.c 2012-09-06 14:17:32.635844142 -0700
85@@ -2352,6 +2352,7 @@
86 char boot_devices[33] = "cad"; /* default to HD->floppy->CD-ROM */
87 DisplayState *ds;
88 DisplayChangeListener *dcl;
89+ DisplayPostCallback *dpc;
90 int cyls, heads, secs, translation;
91 QemuOpts *hda_opts = NULL, *opts, *machine_opts;
92 QemuOptsList *olist;
93@@ -3699,6 +3700,13 @@
94
95 /* display setup */
96 dpy_resize(ds);
97+ dpc = ds->postcalls;
98+ while (dpc != NULL) {
99+ if (dpc->postcall != NULL)
100+ dpc->postcall(dpc->parm);
101+ dpc = dpc->next;
102+ }
103+
104 dcl = ds->listeners;
105 while (dcl != NULL) {
106 if (dcl->dpy_refresh != NULL) {