From cb4b414952c02dcb6eedabb4d076aaf3350d4f9f Mon Sep 17 00:00:00 2001 From: Zhenhua Luo Date: Thu, 27 Jun 2013 09:19:56 +0000 Subject: qemu: upgrade to the version of sdk-1.4 Signed-off-by: Zhenhua Luo --- ...configure-properly-check-if-lrt-is-needed.patch | 43 ----------- .../fix-libcap-header-issue-on-some-distro.patch | 84 ++++++++++++++++++++++ recipes-devtools/qemu/files/relocatable_sdk.patch | 34 +++++++++ recipes-devtools/qemu/qemu_1.0.bb | 42 ----------- recipes-devtools/qemu/qemu_fslgit.bb | 47 ++++++++++++ 5 files changed, 165 insertions(+), 85 deletions(-) delete mode 100644 recipes-devtools/qemu/files/0001-configure-properly-check-if-lrt-is-needed.patch create mode 100644 recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch create mode 100644 recipes-devtools/qemu/files/relocatable_sdk.patch delete mode 100644 recipes-devtools/qemu/qemu_1.0.bb create mode 100644 recipes-devtools/qemu/qemu_fslgit.bb (limited to 'recipes-devtools') 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 @@ -From e5906138d8042817cc3b49872dd181c66a11abdf Mon Sep 17 00:00:00 2001 -From: Ting Liu -Date: Wed, 6 Mar 2013 01:56:35 -0600 -Subject: [PATCH] configure: properly check if -lrt is needed - -Upstream-Status: Backport -commit 8bacde8d86a09699207d85d4bab06162aed18dc4 - -Signed-off-by: Natanael Copa -Signed-off-by: Blue Swirl -Signed-off-by: Ting Liu ---- - configure | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index 999375a..29b3e30 100755 ---- a/configure -+++ b/configure -@@ -2444,13 +2444,18 @@ fi - cat > $TMPC < - #include --int main(void) { clockid_t id; return clock_gettime(id, NULL); } -+int main(void) { -+ timer_create(CLOCK_REALTIME, NULL, NULL); -+ return clock_gettime(CLOCK_REALTIME, NULL); -+} - EOF - - if compile_prog "" "" ; then - : --elif compile_prog "" "-lrt" ; then -+# we need pthread for static linking. use previous pthread test result -+elif compile_prog "" "-lrt $pthread_lib" ; then - LIBS="-lrt $LIBS" -+ libs_qga="-lrt $libs_qga" - fi - - if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \ --- -1.7.9.7 - 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 @@ +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/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 @@ +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 + +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/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 @@ -require recipes-devtools/qemu/qemu.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ - file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913" - -# This means v1.0 with FSL specific patches applied -PV = "1.0+fsl" -PR = "r3" - -DEPENDS += "dtc" - -SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git \ - file://0001-configure-properly-check-if-lrt-is-needed.patch \ -" -SRCREV = "7feabd47a814214dc4bebfd97d0eaf30dc50a68f" - -S = "${WORKDIR}/git" - -QEMU_TARGETS = "ppc" -PPC_OECONF = '${SDL} --disable-werror --disable-vnc --audio-drv-list="" --audio-card-list="" --disable-bluez --disable-curl' -EXTRA_OECONF_powerpc = "--target-list=ppc-softmmu ${PPC_OECONF}" -EXTRA_OECONF_powerpc64 = "--target-list=ppc64-softmmu ${PPC_OECONF}" - -do_configure_append () { - grep 'CONFIG_FDT=y' config-host.mak -} - -# gets around qemu.inc trying to install powerpc_rom.bin -do_install_prepend() { - touch ${WORKDIR}/powerpc_rom.bin -} - -do_install_append() { - rm ${WORKDIR}/powerpc_rom.bin -} - -# This is only meant to be build to run on the target -# for the given arch types listed, otherwise don't let -# the package get built. COMPATIBLE_HOST would not work -# because it was too generic -COMPATIBLE_MACHINE = "a^" -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 @@ +require recipes-devtools/qemu/qemu.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ + file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913" + +# This means v1.4 with FSL specific patches applied +PV = "1.4+fsl" + +SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git" +SRCREV = "8713c58725df407dbbedb48fa315248d0100720c" + +S = "${WORKDIR}/git" + +QEMU_TARGETS = "ppc" +PPC_OECONF = '${SDL} --cross-prefix=${TARGET_PREFIX} --disable-werror --disable-vnc --audio-drv-list="" --audio-card-list="" --disable-bluez --disable-curl' +EXTRA_OECONF_e5500-64b = "--target-list=ppc64-softmmu ${PPC_OECONF}" +EXTRA_OECONF_e6500-64b = "--target-list=ppc64-softmmu ${PPC_OECONF}" +EXTRA_OECONF_e6500 = "--target-list=ppc64-softmmu ${PPC_OECONF}" +EXTRA_OECONF_e5500 = "--target-list=ppc64-softmmu ${PPC_OECONF}" +EXTRA_OECONF_e500v2 = "--target-list=ppc-softmmu ${PPC_OECONF}" +EXTRA_OECONF_e500mc = "--target-list=ppc-softmmu ${PPC_OECONF}" + +do_configure_prepend() { + export PKG_CONFIG=${STAGING_DIR_NATIVE}${bindir_native}/pkg-config +} + +do_configure_append () { + grep 'CONFIG_FDT=y' config-host.mak +} + +# gets around qemu.inc trying to install powerpc_rom.bin +do_install_prepend() { + touch ${WORKDIR}/powerpc_rom.bin +} + +do_install_append() { + rm ${WORKDIR}/powerpc_rom.bin +} + +INSANE_SKIP_${PN} += "dev-deps" + +# This is only meant to be build to run on the target +# for the given arch types listed, otherwise don't let +# the package get built. COMPATIBLE_HOST would not work +# because it was too generic +COMPATIBLE_MACHINE = "a^" +COMPATIBLE_MACHINE_libc-glibc_fslmachine = ".*" -- cgit v1.2.3-54-g00ecf