From 37a0775984ea89e03c6d30a487bf069af75d3c83 Mon Sep 17 00:00:00 2001 From: Cristian Iorga Date: Wed, 8 Jan 2014 12:13:26 +0200 Subject: qemu: upgrade to 1.7.0 linux-user-Handle-SOCK_CLOEXEC-NONBLOCK-if-unavailab.patch file no longer needed, included in upstream. qemu-native tested on all architectures, host machine is Ubuntu Linux 13.10 x86-64. Basic X11 and networking tests performed. (From OE-Core rev: 0f81a4b17ab9ea1b3cc69629aec3f3d2176f8153) Signed-off-by: Cristian Iorga Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- .../recipes-devtools/qemu/qemu/disable-grabs.patch | 72 ++++++++++++++++++ .../fix-libcap-header-issue-on-some-distro.patch | 84 +++++++++++++++++++++ .../recipes-devtools/qemu/qemu/fxrstorssefix.patch | 31 ++++++++ .../qemu/qemu/larger_default_ram_size.patch | 22 ++++++ meta/recipes-devtools/qemu/qemu/no-strip.patch | 15 ++++ meta/recipes-devtools/qemu/qemu/powerpc_rom.bin | Bin 0 -> 4096 bytes 6 files changed, 224 insertions(+) create mode 100644 meta/recipes-devtools/qemu/qemu/disable-grabs.patch create mode 100644 meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch create mode 100644 meta/recipes-devtools/qemu/qemu/fxrstorssefix.patch create mode 100644 meta/recipes-devtools/qemu/qemu/larger_default_ram_size.patch create mode 100644 meta/recipes-devtools/qemu/qemu/no-strip.patch create mode 100644 meta/recipes-devtools/qemu/qemu/powerpc_rom.bin (limited to 'meta/recipes-devtools/qemu/qemu') diff --git a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch new file mode 100644 index 0000000000..41726b1c87 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch @@ -0,0 +1,72 @@ +When the pointer enters the Qemu window it calls SDL_WM_GrabInput, which calls +XGrabPointer in a busyloop until it returns GrabSuccess. However if there's already +a pointer grab (screen is locked, a menu is open) then qemu will hang until the +grab can be taken. In the specific case of a headless X server on an autobuilder, once +the screensaver has kicked in any qemu instance that appears underneath the +pointer will hang. + +I'm not entirely sure why pointer grabs are required (the documentation +explicitly says it doesn't do grabs when using a tablet, which we are) so wrap +them in a conditional that can be set by the autobuilder environment, preserving +the current grabbing behaviour for everyone else. + +Upstream-Status: Pending +Signed-off-by: Ross Burton + +From 4b1988ecb01a178269ec0513a75f2ec620c7ef6a Mon Sep 17 00:00:00 2001 +From: Ross Burton +Date: Wed, 18 Sep 2013 14:04:54 +0100 +Subject: [PATCH] sdl.c: allow user to disable pointer grabs + +Signed-off-by: Ross Burton +Signed-off-by: Eric BĂ©nard +--- + ui/sdl.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/ui/sdl.c b/ui/sdl.c +index 39a42d6..9b8abe5 100644 +--- a/ui/sdl.c ++++ b/ui/sdl.c +@@ -59,6 +59,10 @@ static SDL_Cursor *guest_sprite = NULL; + static SDL_PixelFormat host_format; + static int scaling_active = 0; + static Notifier mouse_mode_notifier; ++#ifndef True ++#define True 1 ++#endif ++static doing_grabs = True; + + static void sdl_update(DisplayChangeListener *dcl, + int x, int y, int w, int h) +@@ -384,14 +388,16 @@ static void sdl_grab_start(void) + SDL_WarpMouse(guest_x, guest_y); + } else + sdl_hide_cursor(); +- SDL_WM_GrabInput(SDL_GRAB_ON); ++ if (doing_grabs) ++ SDL_WM_GrabInput(SDL_GRAB_ON); + gui_grab = 1; + sdl_update_caption(); + } + + static void sdl_grab_end(void) + { +- SDL_WM_GrabInput(SDL_GRAB_OFF); ++ if (doing_grabs) ++ SDL_WM_GrabInput(SDL_GRAB_OFF); + gui_grab = 0; + sdl_show_cursor(); + sdl_update_caption(); +@@ -909,6 +915,8 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) + * This requires SDL >= 1.2.14. */ + setenv("SDL_DISABLE_LOCK_KEYS", "1", 1); + ++ doing_grabs = (getenv("QEMU_DONT_GRAB") == NULL); ++ + flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE; + if (SDL_Init (flags)) { + fprintf(stderr, "Could not initialize SDL(%s) - exiting\n", +-- +1.8.3.1 + diff --git a/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch b/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch new file mode 100644 index 0000000000..13a6ea23b1 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch @@ -0,0 +1,84 @@ +fix libcap header issue on some distro + +1, When build qemu-native on SLED 11.2, there is an error: +... +| In file included from /usr/include/bits/sigcontext.h:28, +| from /usr/include/signal.h:339, +| from /buildarea2/tmp/work/i686-linux/qemu-native/1.4.0-r0/ +qemu-1.4.0/include/qemu-common.h:42, +| from fsdev/virtfs-proxy-helper.c:23: +| /usr/include/asm/sigcontext.h:28: error: expected specifier- +qualifier-list before '__u64' +| /usr/include/asm/sigcontext.h:191: error: expected specifier- +qualifier-list before '__u64' +... + +2, The virtfs-proxy-helper.c includes and +qemu-common.h in sequence. The header include map is: +(`-->' presents `include') +... +"virtfs-proxy-helper.c" --> +... +"virtfs-proxy-helper.c" --> "qemu-common.h" --> --> + --> --> --> + --> --> +... + +3, The bug is found on SLED 11.2 x86. In libcap header file +/usr/include/sys/capability.h, it does evil stuff like this: +... + 25 /* + 26 * Make sure we can be included from userland by preventing + 27 * capability.h from including other kernel headers + 28 */ + 29 #define _LINUX_TYPES_H + 30 #define _LINUX_FS_H + 31 #define __LINUX_COMPILER_H + 32 #define __user + 33 + 34 typedef unsigned int __u32; + 35 typedef __u32 __le32; +... +This completely prevents including /usr/include/linux/types.h. +The above ` --> ' is prevented, +and '__u64' is defined in . + +4, Modify virtfs-proxy-helper.c to include +last to workaround the issue. + +http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html +http://patchwork.linuxtv.org/patch/12748/ + +Upstream-Status: Pending +Signed-off-by: Hongxu Jia +--- + fsdev/virtfs-proxy-helper.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c +--- a/fsdev/virtfs-proxy-helper.c ++++ b/fsdev/virtfs-proxy-helper.c +@@ -12,7 +12,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -26,7 +25,11 @@ + #include "virtio-9p-marshal.h" + #include "hw/9pfs/virtio-9p-proxy.h" + #include "fsdev/virtio-9p-marshal.h" +- ++/* ++ * Include this one last due to some versions of it being buggy: ++ * http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html ++ */ ++#include + #define PROGNAME "virtfs-proxy-helper" + + #ifndef XFS_SUPER_MAGIC +-- +1.7.10.4 + diff --git a/meta/recipes-devtools/qemu/qemu/fxrstorssefix.patch b/meta/recipes-devtools/qemu/qemu/fxrstorssefix.patch new file mode 100644 index 0000000000..59ab0f50fa --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/fxrstorssefix.patch @@ -0,0 +1,31 @@ +When we restore the mxcsr resgister with FXRSTOR, we need to update the various SSE +flag files by calling update_sse_status() else we're using the flags from some other +process with interesting results. + +The code isn't ordered to make this easy hence the function declaration. + +Upstream-Status: Pending + +RP 2013/9/30 + +Index: qemu-1.5.0/target-i386/fpu_helper.c +=================================================================== +--- qemu-1.5.0.orig/target-i386/fpu_helper.c 2013-09-30 18:46:39.283377648 +0000 ++++ qemu-1.5.0/target-i386/fpu_helper.c 2013-09-30 18:46:56.895377232 +0000 +@@ -1149,6 +1149,8 @@ + } + } + ++static void update_sse_status(CPUX86State *env); ++ + void helper_fxrstor(CPUX86State *env, target_ulong ptr, int data64) + { + int i, fpus, fptag, nb_xmm_regs; +@@ -1180,6 +1182,7 @@ + if (env->cr[4] & CR4_OSFXSR_MASK) { + /* XXX: finish it */ + env->mxcsr = cpu_ldl_data(env, ptr + 0x18); ++ update_sse_status(env); + /* cpu_ldl_data(env, ptr + 0x1c); */ + if (env->hflags & HF_CS64_MASK) { + nb_xmm_regs = 16; diff --git a/meta/recipes-devtools/qemu/qemu/larger_default_ram_size.patch b/meta/recipes-devtools/qemu/qemu/larger_default_ram_size.patch new file mode 100644 index 0000000000..711c36071d --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/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 + +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/no-strip.patch b/meta/recipes-devtools/qemu/qemu/no-strip.patch new file mode 100644 index 0000000000..d6a4377cd0 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/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/powerpc_rom.bin b/meta/recipes-devtools/qemu/qemu/powerpc_rom.bin new file mode 100644 index 0000000000..c4044296c5 Binary files /dev/null and b/meta/recipes-devtools/qemu/qemu/powerpc_rom.bin differ -- cgit v1.2.3-54-g00ecf