From 31ce2d1a14de6d8439829dc8a046aeaeef734461 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Thu, 8 Oct 2015 22:22:28 +0200 Subject: initial commit for Enea Linux 5.0 arm Signed-off-by: Tudor Florea --- .../fix-libcap-header-issue-on-some-distro.patch | 84 ++++++++++++++++++++++ recipes-devtools/qemu/qemu_2.3.0.bb | 38 ++++++++++ 2 files changed, 122 insertions(+) create mode 100644 recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch create mode 100644 recipes-devtools/qemu/qemu_2.3.0.bb (limited to 'recipes-devtools/qemu') diff --git a/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch b/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch new file mode 100644 index 0000000..13a6ea2 --- /dev/null +++ b/recipes-devtools/qemu/qemu/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/qemu_2.3.0.bb b/recipes-devtools/qemu/qemu_2.3.0.bb new file mode 100644 index 0000000..8ef3719 --- /dev/null +++ b/recipes-devtools/qemu/qemu_2.3.0.bb @@ -0,0 +1,38 @@ +require recipes-devtools/qemu/qemu.inc + +PROVIDES = "qemu" + +# This is v2.3.0 +#SRCREV = "e5b3a24181ea0cebf1c5b20f44d016311b7048f0" + +LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ + file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913" + +# Discard all files included in qemu.inc, we're not interested in them here +# This is why it is an "=" and not _prepend or "+=" as in other recipes: +SRC_URI = "git://git.qemu.org/qemu.git;tag=v2.3.0" +S = "${WORKDIR}/git" + +DEFAULT_PREFERENCE = "-1" + +COMPATIBLE_HOST_class-target_mips64 = "null" + +# build arm emulators only +QEMU_TARGETS = "arm aarch64" + +# Override --disable-glx, which now is --disable-opengl +PACKAGECONFIG[glx] = "--enable-opengl,--disable-opengl,mesa" +PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,mesa" + +FILES_${PN} += " \ + /run \ + /usr/share/qemu \ + " + +# Our own do_install function so it doesn't try to install powerpc_rom.bin: +do_install () { + export STRIP="true" + autotools_do_install + install -d ${D}${datadir}/qemu +} + -- cgit v1.2.3-54-g00ecf