diff options
author | Khem Raj <raj.khem@gmail.com> | 2012-09-06 15:22:55 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-10 13:00:43 +0100 |
commit | 0c1328a27881f1b3046ed527447608a9fa91b1ea (patch) | |
tree | 8aacce709bae841453dbb7ebbf0da1361224f0ea /meta/recipes-devtools/qemu/qemu-1.2.0 | |
parent | ac4a60a1c585bfe5bdce1556303d49bef2594070 (diff) | |
download | openembedded-core-0c1328a27881f1b3046ed527447608a9fa91b1ea.tar.gz openembedded-core-0c1328a27881f1b3046ed527447608a9fa91b1ea.tar.bz2 openembedded-core-0c1328a27881f1b3046ed527447608a9fa91b1ea.zip |
qemu: Update from 0.15 to 1.2
Forward port the patches which were not applied upstream
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu-1.2.0')
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 @@ +After kernel commit: + +http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-3.0/commit/?h=meta&id=9728c1b6a724daefc413b44e10253cdbb5e06d08 + +It appears that the emulated colours in qemu are incorrect and that +the red and blue channels are reversed. This patch reverses that logic +so the colours are correctly displayed on the versatile platform which +doesn't support the BGR bit. + +RP 16/9/2011 + +Upstream-Status: Pending + +Index: qemu-1.2.0/hw/pl110.c +=================================================================== +--- qemu-1.2.0.orig/hw/pl110.c 2012-09-06 14:07:27.619821133 -0700 ++++ qemu-1.2.0/hw/pl110.c 2012-09-06 14:12:07.699829648 -0700 +@@ -168,7 +168,11 @@ + fprintf(stderr, "pl110: Bad color depth\n"); + exit(1); + } +- if (s->cr & PL110_CR_BGR) ++ ++ if (s->version && s->bpp == BPP_16) ++ /* Code assumes BPP_16 == 565 and BGR is never set on the versatile in 565 mode */ ++ bpp_offset = 0; ++ else if (s->cr & PL110_CR_BGR) + bpp_offset = 0; + else + 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 @@ +Enable i386-linux-user + +Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> + +Upstream-Status: Inappropriate [configuration] + +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) ++{ ++} 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 @@ +From c313f89c33217ac0e471554dace2144718f86669 Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Thu, 13 May 2010 12:23:40 +0200 +Subject: [PATCH] linux-user: use default mmap_min_addr 65536 when /proc/sys/vm/mmap_min_addr cannot be read + +* 65536 is default at least for ubuntu and fedora. +--- + linux-user/main.c | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +Upstream-Status: Pending + +Index: qemu-0.14.0/linux-user/main.c +=================================================================== +--- qemu-0.14.0.orig/linux-user/main.c ++++ qemu-0.14.0/linux-user/main.c +@@ -36,6 +36,7 @@ + #include "envlist.h" + + #define DEBUG_LOGFILE "/tmp/qemu.log" ++#define MMAP_MIN_ADDR_DEFAULT 65536 + + char *exec_path; + +@@ -3010,8 +3011,14 @@ int main(int argc, char **argv, char **e + if (fscanf(fp, "%lu", &tmp) == 1) { + mmap_min_addr = tmp; + qemu_log("host mmap_min_addr=0x%lx\n", mmap_min_addr); ++ } else { ++ qemu_log("cannot read value from /proc/sys/vm/mmap_min_addr, assuming %d\n", MMAP_MIN_ADDR_DEFAULT); ++ mmap_min_addr = MMAP_MIN_ADDR_DEFAULT; + } + fclose(fp); ++ } else { ++ qemu_log("cannot open /proc/sys/vm/mmap_min_addr for reading, assuming %d\n", MMAP_MIN_ADDR_DEFAULT); ++ mmap_min_addr = MMAP_MIN_ADDR_DEFAULT; + } + } + 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 @@ +In native builds, qemu can fail to find zlib development files in the native +sysroot and the build machine might not have zlib-dev packages installed. + +Add CFLAGS to qemu's CFLAGS which in the native case means BUILD_CFLAGS are +added and files in the sysroot can be found. + +Patch from Paul Eggleton, Comments by RP 28/11/10 + +Upstream-Status: Inappropriate [embedded specific] + +Index: qemu-1.2.0/configure +=================================================================== +--- qemu-1.2.0.orig/configure 2012-09-05 07:03:06.000000000 -0700 ++++ qemu-1.2.0/configure 2012-09-06 13:55:07.007793823 -0700 +@@ -281,6 +281,7 @@ + QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS" + QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS" + QEMU_INCLUDES="-I. -I\$(SRC_PATH) -I\$(SRC_PATH)/fpu" ++QEMU_CFLAGS="$QEMU_CFLAGS $CFLAGS" + if test "$debug_info" = "yes"; then + CFLAGS="-g $CFLAGS" + 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 @@ +# This is a workaround to the crashes seen on Ubuntu. Setting info to zero +# makes info.info.x11.display zero and avoids the calls to +# opengl_exec_set_parent_window, one of which is crashing. + +Upstream-Status: Pending + +Index: qemu-0.14.0/ui/sdl.c +=================================================================== +--- qemu-0.14.0.orig/ui/sdl.c ++++ qemu-0.14.0/ui/sdl.c +@@ -863,6 +863,7 @@ void sdl_display_init(DisplayState *ds, + vi = SDL_GetVideoInfo(); + host_format = *(vi->vfmt); + ++ bzero(&info, sizeof(info)); + SDL_GetWMInfo(&info); + if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display) + 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 @@ +This patch is taken from debian. 128M is too less sometimes if distro +with lot of packages is booted so this patch raises the default to 384M + +It has not been applied to upstream qemu + +Khem Raj <raj.khem@gmail.com> + +Upstream-Status: Pending + +Index: qemu-0.14.0/vl.c +=================================================================== +--- qemu-0.14.0.orig/vl.c ++++ qemu-0.14.0/vl.c +@@ -168,7 +168,7 @@ int main(int argc, char **argv) + //#define DEBUG_NET + //#define DEBUG_SLIRP + +-#define DEFAULT_RAM_SIZE 128 ++#define DEFAULT_RAM_SIZE 384 + + #define MAX_VIRTIO_CONSOLES 1 + 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 @@ +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 + +Upstream-Status: Inappropriate [configuration] + +Index: qemu-1.2.0/Makefile.target +=================================================================== +--- qemu-1.2.0.orig/Makefile.target 2012-09-05 07:03:06.000000000 -0700 ++++ qemu-1.2.0/Makefile.target 2012-09-06 13:42:24.819764288 -0700 +@@ -130,7 +130,7 @@ + obj-$(CONFIG_HAVE_CORE_DUMP) += dump.o + obj-$(CONFIG_NO_GET_MEMORY_MAPPING) += memory_mapping-stub.o + obj-$(CONFIG_NO_CORE_DUMP) += dump-stub.o +-LIBS+=-lz ++LIBS+=-lz -lX11 -ldl + + QEMU_CFLAGS += $(VNC_TLS_CFLAGS) + 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 @@ +Upstream-Status: Inappropriate [configuration] + +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)" 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 Binary files differnew file mode 100644 index 0000000000..c4044296c5 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu-1.2.0/powerpc_rom.bin 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 @@ +# fix VMware VGA driver depth calculation error, which may cause segmentation fault +# +# ktian1, 06/29/2010 + +Upstream-Status: Pending + +Index: qemu-1.2.0/console.h +=================================================================== +--- qemu-1.2.0.orig/console.h 2012-09-06 14:12:23.371832381 -0700 ++++ qemu-1.2.0/console.h 2012-09-06 14:12:23.627832390 -0700 +@@ -171,6 +171,12 @@ + 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 DisplayAllocator* allocator; + struct DisplayChangeListener* listeners; ++ struct DisplayPostCallback* postcalls; + + void (*mouse_set)(int x, int y, int on); + void (*cursor_define)(QEMUCursor *cursor); +@@ -233,6 +240,12 @@ + 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-1.2.0/hw/vmware_vga.c +=================================================================== +--- qemu-1.2.0.orig/hw/vmware_vga.c 2012-09-06 14:12:23.371832381 -0700 ++++ qemu-1.2.0/hw/vmware_vga.c 2012-09-06 14:18:05.595845288 -0700 +@@ -1081,6 +1081,8 @@ + static void vmsvga_init(struct vmsvga_state_s *s, + MemoryRegion *address_space, MemoryRegion *io) + { ++ DisplayPostCallback *dpc; ++ + s->scratch_size = SVGA_SCRATCH_SIZE; + s->scratch = g_malloc(s->scratch_size * 4); + +@@ -1098,6 +1100,10 @@ + vga_common_init(&s->vga); + vga_init(&s->vga, address_space, io, true); + vmstate_register(NULL, 0, &vmstate_vga_common, &s->vga); ++ dpc = g_malloc0(sizeof(DisplayPostCallback)); ++ dpc->postcall = vmsvga_reset; ++ dpc->parm = s; ++ register_displaypostcallback(s->vga.ds, dpc); + + s->depth = ds_get_bits_per_pixel(s->vga.ds); + s->bypp = ds_get_bytes_per_pixel(s->vga.ds); +Index: qemu-1.2.0/qemu-common.h +=================================================================== +--- qemu-1.2.0.orig/qemu-common.h 2012-09-06 14:12:23.371832381 -0700 ++++ qemu-1.2.0/qemu-common.h 2012-09-06 14:12:23.643832391 -0700 +@@ -250,6 +250,7 @@ + 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-1.2.0/vl.c +=================================================================== +--- qemu-1.2.0.orig/vl.c 2012-09-06 14:12:23.371832381 -0700 ++++ qemu-1.2.0/vl.c 2012-09-06 14:17:32.635844142 -0700 +@@ -2352,6 +2352,7 @@ + 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, *machine_opts; + QemuOptsList *olist; +@@ -3699,6 +3700,13 @@ + + /* 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) { |