aboutsummaryrefslogtreecommitdiff
path: root/meta-linaro/recipes-devtools
diff options
context:
space:
mode:
authorRiku Voipio <riku.voipio@linaro.org>2013-09-12 15:14:32 +0300
committerRiku Voipio <riku.voipio@linaro.org>2013-09-12 15:18:12 +0300
commit119e9e32d10cf8c5b89bb421b36aa6fca6167935 (patch)
tree167bf84dff5c5bb9b2373a78a89784d8d1c36ad4 /meta-linaro/recipes-devtools
parent0a5d385ebfbd600487bab822706e28653923b3e6 (diff)
qemu: move to git head
Set up a qemu recipe that follows qemu head and builds for both aarch64 and armv7.
Diffstat (limited to 'meta-linaro/recipes-devtools')
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/3f08ffb4a4741d147634761dc053ed386243a0de.patch42
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/aarch64-softmmu.patch103
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/enable-i386-linux-user.patch55
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/fdt_header.patch39
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch84
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/init-info.patch18
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/larger_default_ram_size.patch22
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/no-strip.patch15
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/powerpc_rom.binbin0 -> 4096 bytes
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/relocatable_sdk.patch34
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/target-i386-Fix-aflag-logic-for-CODE64-and-the-0x67-.patch79
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/target-ppc_fix_bit_extraction.patch70
-rw-r--r--meta-linaro/recipes-devtools/qemu/qemu_git.bb20
13 files changed, 581 insertions, 0 deletions
diff --git a/meta-linaro/recipes-devtools/qemu/files/3f08ffb4a4741d147634761dc053ed386243a0de.patch b/meta-linaro/recipes-devtools/qemu/files/3f08ffb4a4741d147634761dc053ed386243a0de.patch
new file mode 100644
index 00000000..4390b943
--- /dev/null
+++ b/meta-linaro/recipes-devtools/qemu/files/3f08ffb4a4741d147634761dc053ed386243a0de.patch
@@ -0,0 +1,42 @@
+Upstream-Status: Backport
+
+[Appears to fix the random segfaults we were seeing in a variety of architectures:
+https://bugzilla.yoctoproject.org/show_bug.cgi?id=4216 ]
+
+
+From: Yeongkyoon Lee <yeongkyoon.lee@samsung.com>
+Date: Fri, 22 Mar 2013 12:50:17 +0000 (+0900)
+Subject: tcg: Fix occasional TCG broken problem when ldst optimization enabled
+X-Git-Url: http://git.qemu.org/?p=qemu.git;a=commitdiff_plain;h=52ae646d4a3ebdcdcc973492c6a56f2c49b6578f;hp=3f08ffb4a4741d147634761dc053ed386243a0de
+
+tcg: Fix occasional TCG broken problem when ldst optimization enabled
+
+is_tcg_gen_code() checks the upper limit of TCG generated code range wrong, so
+that TCG could get broken occasionally only when CONFIG_QEMU_LDST_OPTIMIZATION
+enabled. The reason is code_gen_buffer_max_size does not cover the upper range
+up to (TCG_MAX_OP_SIZE * OPC_BUF_SIZE), thus code_gen_buffer_max_size should be
+modified to code_gen_buffer_size.
+
+CC: qemu-stable@nongnu.org
+Signed-off-by: Yeongkyoon Lee <yeongkyoon.lee@samsung.com>
+Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
+Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
+---
+
+Index: qemu-1.4.0/translate-all.c
+===================================================================
+--- qemu-1.4.0.orig/translate-all.c 2013-04-09 10:58:19.000000000 +0000
++++ qemu-1.4.0/translate-all.c 2013-04-09 10:58:34.783203406 +0000
+@@ -1310,10 +1310,10 @@
+ /* check whether the given addr is in TCG generated code buffer or not */
+ bool is_tcg_gen_code(uintptr_t tc_ptr)
+ {
+- /* This can be called during code generation, code_gen_buffer_max_size
++ /* This can be called during code generation, code_gen_buffer_size
+ is used instead of code_gen_ptr for upper boundary checking */
+ return (tc_ptr >= (uintptr_t)code_gen_buffer &&
+- tc_ptr < (uintptr_t)(code_gen_buffer + code_gen_buffer_max_size));
++ tc_ptr < (uintptr_t)(code_gen_buffer + code_gen_buffer_size));
+ }
+ #endif
+
diff --git a/meta-linaro/recipes-devtools/qemu/files/aarch64-softmmu.patch b/meta-linaro/recipes-devtools/qemu/files/aarch64-softmmu.patch
new file mode 100644
index 00000000..d684080d
--- /dev/null
+++ b/meta-linaro/recipes-devtools/qemu/files/aarch64-softmmu.patch
@@ -0,0 +1,103 @@
+
+m: Peter Maydell <peter.maydell@linaro.org>
+Date: Fri, 9 Aug 2013 13:19:04 +0000 (+0100)
+Subject: default-configs: Add config for aarch64-softmmu
+X-Git-Url: https://git.linaro.org/gitweb?p=people%2Fpmaydell%2Fqemu-arm.git;a=commitdiff_plain;h=5b60e30712cbdf478b77ada9433c7f0d1b9d07bd
+
+default-configs: Add config for aarch64-softmmu
+
+Add a config for aarch64-softmmu; this enables building of this target.
+The resulting executable doesn't know about any 64 bit CPUs, but all
+the 32 bit CPUs and board models work.
+
+Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
+---
+
+diff --git a/default-configs/aarch64-softmmu.mak b/default-configs/aarch64-softmmu.mak
+new file mode 100644
+index 0000000..175362f
+--- /dev/null
++++ b/default-configs/aarch64-softmmu.mak
+@@ -0,0 +1,82 @@
++# Default configuration for aarch64-softmmu
++
++include pci.mak
++include usb.mak
++CONFIG_GDBSTUB_XML=y
++CONFIG_VGA=y
++CONFIG_ISA_MMIO=y
++CONFIG_NAND=y
++CONFIG_ECC=y
++CONFIG_SERIAL=y
++CONFIG_PTIMER=y
++CONFIG_SD=y
++CONFIG_MAX7310=y
++CONFIG_WM8750=y
++CONFIG_TWL92230=y
++CONFIG_TSC2005=y
++CONFIG_LM832X=y
++CONFIG_TMP105=y
++CONFIG_STELLARIS=y
++CONFIG_STELLARIS_INPUT=y
++CONFIG_STELLARIS_ENET=y
++CONFIG_SSD0303=y
++CONFIG_SSD0323=y
++CONFIG_ADS7846=y
++CONFIG_MAX111X=y
++CONFIG_SSI=y
++CONFIG_SSI_SD=y
++CONFIG_SSI_M25P80=y
++CONFIG_LAN9118=y
++CONFIG_SMC91C111=y
++CONFIG_DS1338=y
++CONFIG_PFLASH_CFI01=y
++CONFIG_PFLASH_CFI02=y
++CONFIG_MICRODRIVE=y
++CONFIG_USB_MUSB=y
++
++CONFIG_ARM11MPCORE=y
++CONFIG_A9MPCORE=y
++CONFIG_A15MPCORE=y
++
++CONFIG_ARM_GIC=y
++CONFIG_ARM_GIC_KVM=$(CONFIG_KVM)
++CONFIG_ARM_TIMER=y
++CONFIG_ARM_MPTIMER=y
++CONFIG_PL011=y
++CONFIG_PL022=y
++CONFIG_PL031=y
++CONFIG_PL041=y
++CONFIG_PL050=y
++CONFIG_PL061=y
++CONFIG_PL080=y
++CONFIG_PL110=y
++CONFIG_PL181=y
++CONFIG_PL190=y
++CONFIG_PL310=y
++CONFIG_PL330=y
++CONFIG_CADENCE=y
++CONFIG_XGMAC=y
++CONFIG_EXYNOS4=y
++CONFIG_PXA2XX=y
++CONFIG_BITBANG_I2C=y
++CONFIG_FRAMEBUFFER=y
++CONFIG_XILINX_SPIPS=y
++
++CONFIG_A9SCU=y
++CONFIG_MARVELL_88W8618=y
++CONFIG_OMAP=y
++CONFIG_TSC210X=y
++CONFIG_BLIZZARD=y
++CONFIG_ONENAND=y
++CONFIG_TUSB6010=y
++CONFIG_IMX=y
++CONFIG_MAINSTONE=y
++CONFIG_NSERIES=y
++CONFIG_REALVIEW=y
++CONFIG_ZAURUS=y
++CONFIG_ZYNQ=y
++
++CONFIG_VERSATILE_PCI=y
++CONFIG_VERSATILE_I2C=y
++
++CONFIG_SDHCI=y
diff --git a/meta-linaro/recipes-devtools/qemu/files/enable-i386-linux-user.patch b/meta-linaro/recipes-devtools/qemu/files/enable-i386-linux-user.patch
new file mode 100644
index 00000000..bb0d6a38
--- /dev/null
+++ b/meta-linaro/recipes-devtools/qemu/files/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-linaro/recipes-devtools/qemu/files/fdt_header.patch b/meta-linaro/recipes-devtools/qemu/files/fdt_header.patch
new file mode 100644
index 00000000..dccfe531
--- /dev/null
+++ b/meta-linaro/recipes-devtools/qemu/files/fdt_header.patch
@@ -0,0 +1,39 @@
+Upstream-Status: Pending
+
+qemu: define fdt types in libfdt_env.h from qemu
+
+ * fixes
+ In file included from /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/libfdt.h:55:0,
+ from /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/work/x86_64-linux/qemu-native/1.4.0-r0/qemu-1.4.0/hw/arm/../../device_tree.c:28:
+ /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:58:2: error: unknown type name 'fdt32_t'
+ /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:59:2: error: unknown type name 'fdt32_t'
+ /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:60:2: error: unknown type name 'fdt32_t'
+ /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:61:2: error: unknown type name 'fdt32_t'
+ /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:62:2: error: unknown type name 'fdt32_t'
+ /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:63:2: error: unknown type name 'fdt32_t'
+ /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:64:2: error: unknown type name 'fdt32_t'
+ /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:67:2: error: unknown type name 'fdt32_t'
+ /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:70:2: error: unknown type name 'fdt32_t'
+ /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:73:2: error: unknown type name 'fdt32_t'
+ /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:77:2: error: unknown type name 'fdt64_t'
+ /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:78:2: error: unknown type name 'fdt64_t'
+ /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:82:2: error: unknown type name 'fdt32_t'
+ /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:87:2: error: unknown type name 'fdt32_t'
+ /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:88:2: error: unknown type name 'fdt32_t'
+ /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:89:2: error: unknown type name 'fdt32_t'
+
+Index: qemu-1.4.0/include/libfdt_env.h
+===================================================================
+--- qemu-1.4.0.orig/include/libfdt_env.h 2013-02-15 23:05:35.000000000 +0000
++++ qemu-1.4.0/include/libfdt_env.h 2013-04-13 14:17:27.918885225 +0000
+@@ -21,6 +21,10 @@
+
+ #include "qemu/bswap.h"
+
++typedef uint16_t fdt16_t;
++typedef uint32_t fdt32_t;
++typedef uint64_t fdt64_t;
++
+ #ifdef HOST_WORDS_BIGENDIAN
+ #define fdt32_to_cpu(x) (x)
+ #define cpu_to_fdt32(x) (x)
diff --git a/meta-linaro/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch b/meta-linaro/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch
new file mode 100644
index 00000000..13a6ea23
--- /dev/null
+++ b/meta-linaro/recipes-devtools/qemu/files/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 <sys/capability.h> and
+qemu-common.h in sequence. The header include map is:
+(`-->' presents `include')
+...
+"virtfs-proxy-helper.c" --> <sys/capability.h>
+...
+"virtfs-proxy-helper.c" --> "qemu-common.h" --> <signal.h> -->
+<bits/sigcontext.h> --> <asm/sigcontext.h> --> <linux/types.h> -->
+<asm/types.h> --> <asm-generic/types.h> --> <asm-generic/int-ll64.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 `<asm/sigcontext.h> --> <linux/types.h>' is prevented,
+and '__u64' is defined in <asm-generic/int-ll64.h>.
+
+4, Modify virtfs-proxy-helper.c to include <sys/capability.h>
+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 <hongxu.jia@windriver.com>
+---
+ 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 <sys/resource.h>
+ #include <getopt.h>
+ #include <syslog.h>
+-#include <sys/capability.h>
+ #include <sys/fsuid.h>
+ #include <sys/vfs.h>
+ #include <sys/ioctl.h>
+@@ -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 <sys/capability.h>
+ #define PROGNAME "virtfs-proxy-helper"
+
+ #ifndef XFS_SUPER_MAGIC
+--
+1.7.10.4
+
diff --git a/meta-linaro/recipes-devtools/qemu/files/init-info.patch b/meta-linaro/recipes-devtools/qemu/files/init-info.patch
new file mode 100644
index 00000000..2250444a
--- /dev/null
+++ b/meta-linaro/recipes-devtools/qemu/files/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-linaro/recipes-devtools/qemu/files/larger_default_ram_size.patch b/meta-linaro/recipes-devtools/qemu/files/larger_default_ram_size.patch
new file mode 100644
index 00000000..711c3607
--- /dev/null
+++ b/meta-linaro/recipes-devtools/qemu/files/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-linaro/recipes-devtools/qemu/files/no-strip.patch b/meta-linaro/recipes-devtools/qemu/files/no-strip.patch
new file mode 100644
index 00000000..d6a4377c
--- /dev/null
+++ b/meta-linaro/recipes-devtools/qemu/files/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-linaro/recipes-devtools/qemu/files/powerpc_rom.bin b/meta-linaro/recipes-devtools/qemu/files/powerpc_rom.bin
new file mode 100644
index 00000000..c4044296
--- /dev/null
+++ b/meta-linaro/recipes-devtools/qemu/files/powerpc_rom.bin
Binary files differ
diff --git a/meta-linaro/recipes-devtools/qemu/files/relocatable_sdk.patch b/meta-linaro/recipes-devtools/qemu/files/relocatable_sdk.patch
new file mode 100644
index 00000000..774a49c7
--- /dev/null
+++ b/meta-linaro/recipes-devtools/qemu/files/relocatable_sdk.patch
@@ -0,0 +1,34 @@
+Upstream-Status: Inappropriate [SDK specific]
+
+In order to be able to change the dynamic loader path when relocating
+binaries, the interp section has to be made big enough to accomodate
+the new path (4096 is the maximum path length in Linux).
+
+Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
+
+Index: qemu-1.4.0/ldscripts/i386.ld
+===================================================================
+--- qemu-1.4.0.orig/ldscripts/i386.ld 2013-02-15 15:05:35.000000000 -0800
++++ qemu-1.4.0/ldscripts/i386.ld 2013-02-28 22:55:36.138816418 -0800
+@@ -8,7 +8,7 @@
+ {
+ /* Read-only sections, merged into text segment: */
+ . = 0x60000000 + SIZEOF_HEADERS;
+- .interp : { *(.interp) }
++ .interp : { *(.interp); . = 0x1000; }
+ .hash : { *(.hash) }
+ .dynsym : { *(.dynsym) }
+ .dynstr : { *(.dynstr) }
+Index: qemu-1.4.0/ldscripts/x86_64.ld
+===================================================================
+--- qemu-1.4.0.orig/ldscripts/x86_64.ld 2013-02-15 15:05:35.000000000 -0800
++++ qemu-1.4.0/ldscripts/x86_64.ld 2013-02-28 22:55:36.138816418 -0800
+@@ -6,7 +6,7 @@
+ {
+ /* Read-only sections, merged into text segment: */
+ . = 0x60000000 + SIZEOF_HEADERS;
+- .interp : { *(.interp) }
++ .interp : { *(.interp); . = 0x1000; }
+ .hash : { *(.hash) }
+ .dynsym : { *(.dynsym) }
+ .dynstr : { *(.dynstr) }
diff --git a/meta-linaro/recipes-devtools/qemu/files/target-i386-Fix-aflag-logic-for-CODE64-and-the-0x67-.patch b/meta-linaro/recipes-devtools/qemu/files/target-i386-Fix-aflag-logic-for-CODE64-and-the-0x67-.patch
new file mode 100644
index 00000000..852efd1c
--- /dev/null
+++ b/meta-linaro/recipes-devtools/qemu/files/target-i386-Fix-aflag-logic-for-CODE64-and-the-0x67-.patch
@@ -0,0 +1,79 @@
+Upstream-Status: Backported
+
+From dec3fc9657e0682637de4d5a29d947284d01985c Mon Sep 17 00:00:00 2001
+From: Richard Henderson <rth@twiddle.net>
+Date: Wed, 29 May 2013 12:30:51 -0700
+Subject: [PATCH] target-i386: Fix aflag logic for CODE64 and the 0x67 prefix
+
+The code reorganization in commit 4a6fd938 broke handling of PREFIX_ADR.
+While fixing this, tidy and comment the code so that it's more obvious
+what's going on in setting both aflag and dflag.
+
+The TARGET_X86_64 ifdef can be eliminated because CODE64 expands to the
+constant zero when TARGET_X86_64 is undefined.
+
+Cc: Paolo Bonzini <pbonzini@redhat.com>
+Reported-by: Laszlo Ersek <lersek@redhat.com>
+Signed-off-by: Richard Henderson <rth@twiddle.net>
+Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
+Message-id: 1369855851-21400-1-git-send-email-rth@twiddle.net
+Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
+---
+ target-i386/translate.c | 30 +++++++++++++++---------------
+ 1 file changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/target-i386/translate.c b/target-i386/translate.c
+index 0aeccdb..14b0298 100644
+--- a/target-i386/translate.c
++++ b/target-i386/translate.c
+@@ -4677,8 +4677,6 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s,
+ }
+ s->pc = pc_start;
+ prefixes = 0;
+- aflag = s->code32;
+- dflag = s->code32;
+ s->override = -1;
+ rex_w = -1;
+ rex_r = 0;
+@@ -4801,23 +4799,25 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s,
+ }
+
+ /* Post-process prefixes. */
+- if (prefixes & PREFIX_DATA) {
+- dflag ^= 1;
+- }
+- if (prefixes & PREFIX_ADR) {
+- aflag ^= 1;
+- }
+-#ifdef TARGET_X86_64
+ if (CODE64(s)) {
+- if (rex_w == 1) {
+- /* 0x66 is ignored if rex.w is set */
+- dflag = 2;
++ /* In 64-bit mode, the default data size is 32-bit. Select 64-bit
++ data with rex_w, and 16-bit data with 0x66; rex_w takes precedence
++ over 0x66 if both are present. */
++ dflag = (rex_w > 0 ? 2 : prefixes & PREFIX_DATA ? 0 : 1);
++ /* In 64-bit mode, 0x67 selects 32-bit addressing. */
++ aflag = (prefixes & PREFIX_ADR ? 1 : 2);
++ } else {
++ /* In 16/32-bit mode, 0x66 selects the opposite data size. */
++ dflag = s->code32;
++ if (prefixes & PREFIX_DATA) {
++ dflag ^= 1;
+ }
+- if (!(prefixes & PREFIX_ADR)) {
+- aflag = 2;
++ /* In 16/32-bit mode, 0x67 selects the opposite addressing. */
++ aflag = s->code32;
++ if (prefixes & PREFIX_ADR) {
++ aflag ^= 1;
+ }
+ }
+-#endif
+
+ s->prefix = prefixes;
+ s->aflag = aflag;
+--
+1.7.9.5
+
diff --git a/meta-linaro/recipes-devtools/qemu/files/target-ppc_fix_bit_extraction.patch b/meta-linaro/recipes-devtools/qemu/files/target-ppc_fix_bit_extraction.patch
new file mode 100644
index 00000000..631d23b1
--- /dev/null
+++ b/meta-linaro/recipes-devtools/qemu/files/target-ppc_fix_bit_extraction.patch
@@ -0,0 +1,70 @@
+Delivered-To: raj.khem@gmail.com
+Received: by 10.50.216.195 with SMTP id os3csp11191igc;
+ Thu, 15 Aug 2013 04:32:45 -0700 (PDT)
+X-Received: by 10.180.98.3 with SMTP id ee3mr1508103wib.48.1376566364872;
+ Thu, 15 Aug 2013 04:32:44 -0700 (PDT)
+Return-Path: <aurelien@aurel32.net>
+Received: from hall.aurel32.net (hall.aurel32.net. [2001:470:1f0b:4a8::1])
+ by mx.google.com with ESMTPS id vv5si15578100wjc.49.2013.08.15.04.32.44
+ for <raj.khem@gmail.com>
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
+ Thu, 15 Aug 2013 04:32:44 -0700 (PDT)
+Received-SPF: pass (google.com: best guess record for domain of aurelien@aurel32.net designates 2001:470:1f0b:4a8::1 as permitted sender) client-ip=2001:470:1f0b:4a8::1;
+Authentication-Results: mx.google.com;
+ spf=pass (google.com: best guess record for domain of aurelien@aurel32.net designates 2001:470:1f0b:4a8::1 as permitted sender) smtp.mail=aurelien@aurel32.net
+Received: from [2001:470:d4ed:1:2db:dfff:fe14:52d] (helo=ohm.aurel32.net)
+ by hall.aurel32.net with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128)
+ (Exim 4.80)
+ (envelope-from <aurelien@aurel32.net>)
+ id 1V9vnG-0006cO-NN; Thu, 15 Aug 2013 13:32:42 +0200
+Received: from aurel32 by ohm.aurel32.net with local (Exim 4.80)
+ (envelope-from <aurelien@aurel32.net>)
+ id 1V9vnF-0002Lw-7L; Thu, 15 Aug 2013 13:32:41 +0200
+From: Aurelien Jarno <aurelien@aurel32.net>
+To: qemu-devel@nongnu.org
+Cc: Khem Raj <raj.khem@gmail.com>,
+ Alexander Graf <agraf@suse.de> ,
+ qemu-stable@nongnu.org,
+ qemu-ppc@nongnu.org,
+ Aurelien Jarno <aurelien@aurel32.net>
+Subject: [PATCH] target-ppc: fix bit extraction for FPBF and FPL
+Date: Thu, 15 Aug 2013 13:32:38 +0200
+Message-Id: <1376566358-8989-1-git-send-email-aurelien@aurel32.net>
+X-Mailer: git-send-email 1.7.10.4
+
+Bit extraction for the FP BF and L field of the MTFSFI and MTFSF
+instructions is wrong and doesn't match the reference manual (which
+explain the bit number in big endian format). It has been broken in
+commit 7d08d85645def18eac2a9d672c1868a35e0bcf79.
+
+This patch fixes this, which in turn fixes the problem reported by
+Khem Raj about the floor() function of libm.
+
+Reported-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
+
+Upstream-Status: Backport
+
+---
+ target-ppc/translate.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+I don't know if we still have time to get this into 1.6, hence the Cc:
+to stable. In anycase it also needs to be fixed in 1.5.
+
+Index: qemu-1.5.0/target-ppc/translate.c
+===================================================================
+--- qemu-1.5.0.orig/target-ppc/translate.c 2013-05-20 08:34:40.000000000 -0700
++++ qemu-1.5.0/target-ppc/translate.c 2013-08-15 06:49:25.028144352 -0700
+@@ -428,9 +428,9 @@
+ EXTRACT_HELPER(SR, 16, 4);
+
+ /* mtfsf/mtfsfi */
+-EXTRACT_HELPER(FPBF, 19, 3);
++EXTRACT_HELPER(FPBF, 23, 3);
+ EXTRACT_HELPER(FPIMM, 12, 4);
+-EXTRACT_HELPER(FPL, 21, 1);
++EXTRACT_HELPER(FPL, 25, 1);
+ EXTRACT_HELPER(FPFLM, 17, 8);
+ EXTRACT_HELPER(FPW, 16, 1);
+
diff --git a/meta-linaro/recipes-devtools/qemu/qemu_git.bb b/meta-linaro/recipes-devtools/qemu/qemu_git.bb
new file mode 100644
index 00000000..726207b0
--- /dev/null
+++ b/meta-linaro/recipes-devtools/qemu/qemu_git.bb
@@ -0,0 +1,20 @@
+require recipes-devtools/qemu/qemu.inc
+
+SRCREV = "${AUTOREV}"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
+ file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
+
+PV = "1.6.0+git${SRCPV}"
+PR = "r2"
+
+#COMPATIBLE_HOST_append="aarch64 armeb"
+SRC_URI_prepend = "git://git.qemu.org/qemu.git"
+SRC_URI_aarch64_append = "file://aarch64-softmmu.patch"
+S = "${WORKDIR}/git"
+EXTRA_OECONF+="--enable-kvm --enable-fdt"
+EXTRA_OECONF_aarch64+="--target-list=aarch64-softmmu --enable-tcg-interpreter"
+
+DEFAULT_PREFERENCE_arm = "1"
+DEFAULT_PREFERENCE_aarch64 = "1"
+DEFAULT_PREFERENCE_armeb = "1"