summaryrefslogtreecommitdiffstats
path: root/recipes-devtools
diff options
context:
space:
mode:
authorZhenhua Luo <zhenhua.luo@freescale.com>2013-06-27 09:19:56 +0000
committerZhenhua Luo <zhenhua.luo@freescale.com>2013-06-28 10:45:38 +0800
commitcb4b414952c02dcb6eedabb4d076aaf3350d4f9f (patch)
tree1cb49cde58300709b0d18810778e762e4fa09701 /recipes-devtools
parentb515997652f0703f333c96a46c66e73e48b4bfbc (diff)
downloadmeta-fsl-ppc-cb4b414952c02dcb6eedabb4d076aaf3350d4f9f.tar.gz
qemu: upgrade to the version of sdk-1.4
Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/qemu/files/0001-configure-properly-check-if-lrt-is-needed.patch43
-rw-r--r--recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch84
-rw-r--r--recipes-devtools/qemu/files/relocatable_sdk.patch34
-rw-r--r--recipes-devtools/qemu/qemu_1.0.bb42
-rw-r--r--recipes-devtools/qemu/qemu_fslgit.bb47
5 files changed, 165 insertions, 85 deletions
diff --git a/recipes-devtools/qemu/files/0001-configure-properly-check-if-lrt-is-needed.patch b/recipes-devtools/qemu/files/0001-configure-properly-check-if-lrt-is-needed.patch
deleted file mode 100644
index d74ddb9..0000000
--- a/recipes-devtools/qemu/files/0001-configure-properly-check-if-lrt-is-needed.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1From e5906138d8042817cc3b49872dd181c66a11abdf Mon Sep 17 00:00:00 2001
2From: Ting Liu <b28495@freescale.com>
3Date: Wed, 6 Mar 2013 01:56:35 -0600
4Subject: [PATCH] configure: properly check if -lrt is needed
5
6Upstream-Status: Backport
7commit 8bacde8d86a09699207d85d4bab06162aed18dc4
8
9Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
10Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11Signed-off-by: Ting Liu <b28495@freescale.com>
12---
13 configure | 9 +++++++--
14 1 file changed, 7 insertions(+), 2 deletions(-)
15
16diff --git a/configure b/configure
17index 999375a..29b3e30 100755
18--- a/configure
19+++ b/configure
20@@ -2444,13 +2444,18 @@ fi
21 cat > $TMPC <<EOF
22 #include <signal.h>
23 #include <time.h>
24-int main(void) { clockid_t id; return clock_gettime(id, NULL); }
25+int main(void) {
26+ timer_create(CLOCK_REALTIME, NULL, NULL);
27+ return clock_gettime(CLOCK_REALTIME, NULL);
28+}
29 EOF
30
31 if compile_prog "" "" ; then
32 :
33-elif compile_prog "" "-lrt" ; then
34+# we need pthread for static linking. use previous pthread test result
35+elif compile_prog "" "-lrt $pthread_lib" ; then
36 LIBS="-lrt $LIBS"
37+ libs_qga="-lrt $libs_qga"
38 fi
39
40 if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \
41--
421.7.9.7
43
diff --git a/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch b/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch
new file mode 100644
index 0000000..13a6ea2
--- /dev/null
+++ b/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch
@@ -0,0 +1,84 @@
1fix libcap header issue on some distro
2
31, When build qemu-native on SLED 11.2, there is an error:
4...
5| In file included from /usr/include/bits/sigcontext.h:28,
6| from /usr/include/signal.h:339,
7| from /buildarea2/tmp/work/i686-linux/qemu-native/1.4.0-r0/
8qemu-1.4.0/include/qemu-common.h:42,
9| from fsdev/virtfs-proxy-helper.c:23:
10| /usr/include/asm/sigcontext.h:28: error: expected specifier-
11qualifier-list before '__u64'
12| /usr/include/asm/sigcontext.h:191: error: expected specifier-
13qualifier-list before '__u64'
14...
15
162, The virtfs-proxy-helper.c includes <sys/capability.h> and
17qemu-common.h in sequence. The header include map is:
18(`-->' presents `include')
19...
20"virtfs-proxy-helper.c" --> <sys/capability.h>
21...
22"virtfs-proxy-helper.c" --> "qemu-common.h" --> <signal.h> -->
23<bits/sigcontext.h> --> <asm/sigcontext.h> --> <linux/types.h> -->
24<asm/types.h> --> <asm-generic/types.h> --> <asm-generic/int-ll64.h>
25...
26
273, The bug is found on SLED 11.2 x86. In libcap header file
28/usr/include/sys/capability.h, it does evil stuff like this:
29...
30 25 /*
31 26 * Make sure we can be included from userland by preventing
32 27 * capability.h from including other kernel headers
33 28 */
34 29 #define _LINUX_TYPES_H
35 30 #define _LINUX_FS_H
36 31 #define __LINUX_COMPILER_H
37 32 #define __user
38 33
39 34 typedef unsigned int __u32;
40 35 typedef __u32 __le32;
41...
42This completely prevents including /usr/include/linux/types.h.
43The above `<asm/sigcontext.h> --> <linux/types.h>' is prevented,
44and '__u64' is defined in <asm-generic/int-ll64.h>.
45
464, Modify virtfs-proxy-helper.c to include <sys/capability.h>
47last to workaround the issue.
48
49http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html
50http://patchwork.linuxtv.org/patch/12748/
51
52Upstream-Status: Pending
53Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
54---
55 fsdev/virtfs-proxy-helper.c | 7 +++++--
56 1 file changed, 5 insertions(+), 2 deletions(-)
57
58diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
59--- a/fsdev/virtfs-proxy-helper.c
60+++ b/fsdev/virtfs-proxy-helper.c
61@@ -12,7 +12,6 @@
62 #include <sys/resource.h>
63 #include <getopt.h>
64 #include <syslog.h>
65-#include <sys/capability.h>
66 #include <sys/fsuid.h>
67 #include <sys/vfs.h>
68 #include <sys/ioctl.h>
69@@ -26,7 +25,11 @@
70 #include "virtio-9p-marshal.h"
71 #include "hw/9pfs/virtio-9p-proxy.h"
72 #include "fsdev/virtio-9p-marshal.h"
73-
74+/*
75+ * Include this one last due to some versions of it being buggy:
76+ * http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html
77+ */
78+#include <sys/capability.h>
79 #define PROGNAME "virtfs-proxy-helper"
80
81 #ifndef XFS_SUPER_MAGIC
82--
831.7.10.4
84
diff --git a/recipes-devtools/qemu/files/relocatable_sdk.patch b/recipes-devtools/qemu/files/relocatable_sdk.patch
new file mode 100644
index 0000000..774a49c
--- /dev/null
+++ b/recipes-devtools/qemu/files/relocatable_sdk.patch
@@ -0,0 +1,34 @@
1Upstream-Status: Inappropriate [SDK specific]
2
3In order to be able to change the dynamic loader path when relocating
4binaries, the interp section has to be made big enough to accomodate
5the new path (4096 is the maximum path length in Linux).
6
7Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
8
9Index: qemu-1.4.0/ldscripts/i386.ld
10===================================================================
11--- qemu-1.4.0.orig/ldscripts/i386.ld 2013-02-15 15:05:35.000000000 -0800
12+++ qemu-1.4.0/ldscripts/i386.ld 2013-02-28 22:55:36.138816418 -0800
13@@ -8,7 +8,7 @@
14 {
15 /* Read-only sections, merged into text segment: */
16 . = 0x60000000 + SIZEOF_HEADERS;
17- .interp : { *(.interp) }
18+ .interp : { *(.interp); . = 0x1000; }
19 .hash : { *(.hash) }
20 .dynsym : { *(.dynsym) }
21 .dynstr : { *(.dynstr) }
22Index: qemu-1.4.0/ldscripts/x86_64.ld
23===================================================================
24--- qemu-1.4.0.orig/ldscripts/x86_64.ld 2013-02-15 15:05:35.000000000 -0800
25+++ qemu-1.4.0/ldscripts/x86_64.ld 2013-02-28 22:55:36.138816418 -0800
26@@ -6,7 +6,7 @@
27 {
28 /* Read-only sections, merged into text segment: */
29 . = 0x60000000 + SIZEOF_HEADERS;
30- .interp : { *(.interp) }
31+ .interp : { *(.interp); . = 0x1000; }
32 .hash : { *(.hash) }
33 .dynsym : { *(.dynsym) }
34 .dynstr : { *(.dynstr) }
diff --git a/recipes-devtools/qemu/qemu_1.0.bb b/recipes-devtools/qemu/qemu_1.0.bb
deleted file mode 100644
index 19efd9f..0000000
--- a/recipes-devtools/qemu/qemu_1.0.bb
+++ /dev/null
@@ -1,42 +0,0 @@
1require recipes-devtools/qemu/qemu.inc
2
3LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
4 file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
5
6# This means v1.0 with FSL specific patches applied
7PV = "1.0+fsl"
8PR = "r3"
9
10DEPENDS += "dtc"
11
12SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git \
13 file://0001-configure-properly-check-if-lrt-is-needed.patch \
14"
15SRCREV = "7feabd47a814214dc4bebfd97d0eaf30dc50a68f"
16
17S = "${WORKDIR}/git"
18
19QEMU_TARGETS = "ppc"
20PPC_OECONF = '${SDL} --disable-werror --disable-vnc --audio-drv-list="" --audio-card-list="" --disable-bluez --disable-curl'
21EXTRA_OECONF_powerpc = "--target-list=ppc-softmmu ${PPC_OECONF}"
22EXTRA_OECONF_powerpc64 = "--target-list=ppc64-softmmu ${PPC_OECONF}"
23
24do_configure_append () {
25 grep 'CONFIG_FDT=y' config-host.mak
26}
27
28# gets around qemu.inc trying to install powerpc_rom.bin
29do_install_prepend() {
30 touch ${WORKDIR}/powerpc_rom.bin
31}
32
33do_install_append() {
34 rm ${WORKDIR}/powerpc_rom.bin
35}
36
37# This is only meant to be build to run on the target
38# for the given arch types listed, otherwise don't let
39# the package get built. COMPATIBLE_HOST would not work
40# because it was too generic
41COMPATIBLE_MACHINE = "a^"
42COMPATIBLE_MACHINE_libc-glibc_fslmachine = ".*"
diff --git a/recipes-devtools/qemu/qemu_fslgit.bb b/recipes-devtools/qemu/qemu_fslgit.bb
new file mode 100644
index 0000000..ac40fb5
--- /dev/null
+++ b/recipes-devtools/qemu/qemu_fslgit.bb
@@ -0,0 +1,47 @@
1require recipes-devtools/qemu/qemu.inc
2
3LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
4 file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
5
6# This means v1.4 with FSL specific patches applied
7PV = "1.4+fsl"
8
9SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git"
10SRCREV = "8713c58725df407dbbedb48fa315248d0100720c"
11
12S = "${WORKDIR}/git"
13
14QEMU_TARGETS = "ppc"
15PPC_OECONF = '${SDL} --cross-prefix=${TARGET_PREFIX} --disable-werror --disable-vnc --audio-drv-list="" --audio-card-list="" --disable-bluez --disable-curl'
16EXTRA_OECONF_e5500-64b = "--target-list=ppc64-softmmu ${PPC_OECONF}"
17EXTRA_OECONF_e6500-64b = "--target-list=ppc64-softmmu ${PPC_OECONF}"
18EXTRA_OECONF_e6500 = "--target-list=ppc64-softmmu ${PPC_OECONF}"
19EXTRA_OECONF_e5500 = "--target-list=ppc64-softmmu ${PPC_OECONF}"
20EXTRA_OECONF_e500v2 = "--target-list=ppc-softmmu ${PPC_OECONF}"
21EXTRA_OECONF_e500mc = "--target-list=ppc-softmmu ${PPC_OECONF}"
22
23do_configure_prepend() {
24 export PKG_CONFIG=${STAGING_DIR_NATIVE}${bindir_native}/pkg-config
25}
26
27do_configure_append () {
28 grep 'CONFIG_FDT=y' config-host.mak
29}
30
31# gets around qemu.inc trying to install powerpc_rom.bin
32do_install_prepend() {
33 touch ${WORKDIR}/powerpc_rom.bin
34}
35
36do_install_append() {
37 rm ${WORKDIR}/powerpc_rom.bin
38}
39
40INSANE_SKIP_${PN} += "dev-deps"
41
42# This is only meant to be build to run on the target
43# for the given arch types listed, otherwise don't let
44# the package get built. COMPATIBLE_HOST would not work
45# because it was too generic
46COMPATIBLE_MACHINE = "a^"
47COMPATIBLE_MACHINE_libc-glibc_fslmachine = ".*"