[meta-freescale] [meta-fsl-ppc][PATCH 03/26] qemu: upgrade to the version of sdk-1.4

b28495 at freescale.com b28495 at freescale.com
Thu Jun 27 02:19:56 PDT 2013


From: Zhenhua Luo <zhenhua.luo at freescale.com>

Signed-off-by: Zhenhua Luo <zhenhua.luo at freescale.com>
---
 conf/machine/e500mc.inc                            |    2 +-
 conf/machine/e500v2.inc                            |    2 +-
 conf/machine/e5500-64b.inc                         |    2 +-
 conf/machine/e5500.inc                             |    2 +-
 conf/machine/e6500-64b.inc                         |    2 +-
 conf/machine/e6500.inc                             |    2 +-
 ...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 +++++++++++
 11 files changed, 171 insertions(+), 91 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

diff --git a/conf/machine/e500mc.inc b/conf/machine/e500mc.inc
index e523a87..268942a 100644
--- a/conf/machine/e500mc.inc
+++ b/conf/machine/e500mc.inc
@@ -8,7 +8,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf"
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk"
 PREFERRED_VERSION_virtual/kernel ?= "3.0.34"
 PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers"
-PREFERRED_VERSION_qemu = "1.0+fsl"
+PREFERRED_VERSION_qemu = "1.4+fsl"
 
 KERNEL_IMAGETYPE ?= "uImage"
 # disable the images below for now
diff --git a/conf/machine/e500v2.inc b/conf/machine/e500v2.inc
index cb3d7ad..9688784 100644
--- a/conf/machine/e500v2.inc
+++ b/conf/machine/e500v2.inc
@@ -6,7 +6,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf"
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk"
 PREFERRED_VERSION_virtual/kernel ?= "3.0.34"
 PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers"
-PREFERRED_VERSION_qemu = "1.0+fsl"
+PREFERRED_VERSION_qemu = "1.4+fsl"
 
 KERNEL_IMAGETYPE ?= "uImage"
 # disable the images below for now
diff --git a/conf/machine/e5500-64b.inc b/conf/machine/e5500-64b.inc
index d2fa078..3230d51 100644
--- a/conf/machine/e5500-64b.inc
+++ b/conf/machine/e5500-64b.inc
@@ -9,7 +9,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf"
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk"
 PREFERRED_VERSION_virtual/kernel ?= "3.0.34"
 PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers"
-PREFERRED_VERSION_qemu = "1.0+fsl"
+PREFERRED_VERSION_qemu = "1.4+fsl"
 
 KERNEL_IMAGETYPE ?= "uImage"
 # disable the images below for now
diff --git a/conf/machine/e5500.inc b/conf/machine/e5500.inc
index 09870c9..ae40896 100644
--- a/conf/machine/e5500.inc
+++ b/conf/machine/e5500.inc
@@ -8,7 +8,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf"
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk"
 PREFERRED_VERSION_virtual/kernel ?= "3.0.34"
 PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers"
-PREFERRED_VERSION_qemu = "1.0+fsl"
+PREFERRED_VERSION_qemu = "1.4+fsl"
 
 KERNEL_IMAGETYPE ?= "uImage"
 # disable the images below for now
diff --git a/conf/machine/e6500-64b.inc b/conf/machine/e6500-64b.inc
index 57e61b2..b8766df 100644
--- a/conf/machine/e6500-64b.inc
+++ b/conf/machine/e6500-64b.inc
@@ -9,7 +9,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf"
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk"
 PREFERRED_VERSION_virtual/kernel ?= "3.0.34"
 PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers"
-PREFERRED_VERSION_qemu = "1.0+fsl"
+PREFERRED_VERSION_qemu = "1.4+fsl"
 
 KERNEL_IMAGETYPE ?= "uImage"
 # disable the images below for now
diff --git a/conf/machine/e6500.inc b/conf/machine/e6500.inc
index b343742..9968230 100644
--- a/conf/machine/e6500.inc
+++ b/conf/machine/e6500.inc
@@ -8,7 +8,7 @@ MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf"
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq-sdk"
 PREFERRED_VERSION_virtual/kernel ?= "3.0.34"
 PREFERRED_PROVIDER_linux-libc-headers ?= "linux-qoriq-sdk-headers"
-PREFERRED_VERSION_qemu = "1.0+fsl"
+PREFERRED_VERSION_qemu = "1.4+fsl"
 
 KERNEL_IMAGETYPE ?= "uImage"
 # disable the images below for now
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 <b28495 at freescale.com>
-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 <ncopa at alpinelinux.org>
-Signed-off-by: Blue Swirl <blauwirbel at gmail.com>
-Signed-off-by: Ting Liu <b28495 at freescale.com>
----
- 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 <<EOF
- #include <signal.h>
- #include <time.h>
--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 <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 at 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/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 <laurentiu.palcu at 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/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 = ".*"
-- 
1.7.3.4





More information about the meta-freescale mailing list