diff options
| author | Zhenhua Luo <zhenhua.luo@freescale.com> | 2013-06-27 09:19:56 +0000 |
|---|---|---|
| committer | Zhenhua Luo <zhenhua.luo@freescale.com> | 2013-06-28 10:45:38 +0800 |
| commit | cb4b414952c02dcb6eedabb4d076aaf3350d4f9f (patch) | |
| tree | 1cb49cde58300709b0d18810778e762e4fa09701 /recipes-devtools | |
| parent | b515997652f0703f333c96a46c66e73e48b4bfbc (diff) | |
| download | meta-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')
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 @@ | |||
| 1 | From e5906138d8042817cc3b49872dd181c66a11abdf Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Ting Liu <b28495@freescale.com> | ||
| 3 | Date: Wed, 6 Mar 2013 01:56:35 -0600 | ||
| 4 | Subject: [PATCH] configure: properly check if -lrt is needed | ||
| 5 | |||
| 6 | Upstream-Status: Backport | ||
| 7 | commit 8bacde8d86a09699207d85d4bab06162aed18dc4 | ||
| 8 | |||
| 9 | Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> | ||
| 10 | Signed-off-by: Blue Swirl <blauwirbel@gmail.com> | ||
| 11 | Signed-off-by: Ting Liu <b28495@freescale.com> | ||
| 12 | --- | ||
| 13 | configure | 9 +++++++-- | ||
| 14 | 1 file changed, 7 insertions(+), 2 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/configure b/configure | ||
| 17 | index 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 | -- | ||
| 42 | 1.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 @@ | |||
| 1 | fix libcap header issue on some distro | ||
| 2 | |||
| 3 | 1, 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/ | ||
| 8 | qemu-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- | ||
| 11 | qualifier-list before '__u64' | ||
| 12 | | /usr/include/asm/sigcontext.h:191: error: expected specifier- | ||
| 13 | qualifier-list before '__u64' | ||
| 14 | ... | ||
| 15 | |||
| 16 | 2, The virtfs-proxy-helper.c includes <sys/capability.h> and | ||
| 17 | qemu-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 | |||
| 27 | 3, 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 | ... | ||
| 42 | This completely prevents including /usr/include/linux/types.h. | ||
| 43 | The above `<asm/sigcontext.h> --> <linux/types.h>' is prevented, | ||
| 44 | and '__u64' is defined in <asm-generic/int-ll64.h>. | ||
| 45 | |||
| 46 | 4, Modify virtfs-proxy-helper.c to include <sys/capability.h> | ||
| 47 | last to workaround the issue. | ||
| 48 | |||
| 49 | http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html | ||
| 50 | http://patchwork.linuxtv.org/patch/12748/ | ||
| 51 | |||
| 52 | Upstream-Status: Pending | ||
| 53 | Signed-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 | |||
| 58 | diff --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 | -- | ||
| 83 | 1.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 @@ | |||
| 1 | Upstream-Status: Inappropriate [SDK specific] | ||
| 2 | |||
| 3 | In order to be able to change the dynamic loader path when relocating | ||
| 4 | binaries, the interp section has to be made big enough to accomodate | ||
| 5 | the new path (4096 is the maximum path length in Linux). | ||
| 6 | |||
| 7 | Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> | ||
| 8 | |||
| 9 | Index: 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) } | ||
| 22 | Index: 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 @@ | |||
| 1 | require recipes-devtools/qemu/qemu.inc | ||
| 2 | |||
| 3 | LIC_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 | ||
| 7 | PV = "1.0+fsl" | ||
| 8 | PR = "r3" | ||
| 9 | |||
| 10 | DEPENDS += "dtc" | ||
| 11 | |||
| 12 | SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git \ | ||
| 13 | file://0001-configure-properly-check-if-lrt-is-needed.patch \ | ||
| 14 | " | ||
| 15 | SRCREV = "7feabd47a814214dc4bebfd97d0eaf30dc50a68f" | ||
| 16 | |||
| 17 | S = "${WORKDIR}/git" | ||
| 18 | |||
| 19 | QEMU_TARGETS = "ppc" | ||
| 20 | PPC_OECONF = '${SDL} --disable-werror --disable-vnc --audio-drv-list="" --audio-card-list="" --disable-bluez --disable-curl' | ||
| 21 | EXTRA_OECONF_powerpc = "--target-list=ppc-softmmu ${PPC_OECONF}" | ||
| 22 | EXTRA_OECONF_powerpc64 = "--target-list=ppc64-softmmu ${PPC_OECONF}" | ||
| 23 | |||
| 24 | do_configure_append () { | ||
| 25 | grep 'CONFIG_FDT=y' config-host.mak | ||
| 26 | } | ||
| 27 | |||
| 28 | # gets around qemu.inc trying to install powerpc_rom.bin | ||
| 29 | do_install_prepend() { | ||
| 30 | touch ${WORKDIR}/powerpc_rom.bin | ||
| 31 | } | ||
| 32 | |||
| 33 | do_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 | ||
| 41 | COMPATIBLE_MACHINE = "a^" | ||
| 42 | COMPATIBLE_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 @@ | |||
| 1 | require recipes-devtools/qemu/qemu.inc | ||
| 2 | |||
| 3 | LIC_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 | ||
| 7 | PV = "1.4+fsl" | ||
| 8 | |||
| 9 | SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git" | ||
| 10 | SRCREV = "8713c58725df407dbbedb48fa315248d0100720c" | ||
| 11 | |||
| 12 | S = "${WORKDIR}/git" | ||
| 13 | |||
| 14 | QEMU_TARGETS = "ppc" | ||
| 15 | PPC_OECONF = '${SDL} --cross-prefix=${TARGET_PREFIX} --disable-werror --disable-vnc --audio-drv-list="" --audio-card-list="" --disable-bluez --disable-curl' | ||
| 16 | EXTRA_OECONF_e5500-64b = "--target-list=ppc64-softmmu ${PPC_OECONF}" | ||
| 17 | EXTRA_OECONF_e6500-64b = "--target-list=ppc64-softmmu ${PPC_OECONF}" | ||
| 18 | EXTRA_OECONF_e6500 = "--target-list=ppc64-softmmu ${PPC_OECONF}" | ||
| 19 | EXTRA_OECONF_e5500 = "--target-list=ppc64-softmmu ${PPC_OECONF}" | ||
| 20 | EXTRA_OECONF_e500v2 = "--target-list=ppc-softmmu ${PPC_OECONF}" | ||
| 21 | EXTRA_OECONF_e500mc = "--target-list=ppc-softmmu ${PPC_OECONF}" | ||
| 22 | |||
| 23 | do_configure_prepend() { | ||
| 24 | export PKG_CONFIG=${STAGING_DIR_NATIVE}${bindir_native}/pkg-config | ||
| 25 | } | ||
| 26 | |||
| 27 | do_configure_append () { | ||
| 28 | grep 'CONFIG_FDT=y' config-host.mak | ||
| 29 | } | ||
| 30 | |||
| 31 | # gets around qemu.inc trying to install powerpc_rom.bin | ||
| 32 | do_install_prepend() { | ||
| 33 | touch ${WORKDIR}/powerpc_rom.bin | ||
| 34 | } | ||
| 35 | |||
| 36 | do_install_append() { | ||
| 37 | rm ${WORKDIR}/powerpc_rom.bin | ||
| 38 | } | ||
| 39 | |||
| 40 | INSANE_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 | ||
| 46 | COMPATIBLE_MACHINE = "a^" | ||
| 47 | COMPATIBLE_MACHINE_libc-glibc_fslmachine = ".*" | ||
