summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorCristian Iorga <cristian.iorga@intel.com>2014-01-08 12:13:26 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-10 15:16:48 +0000
commit37a0775984ea89e03c6d30a487bf069af75d3c83 (patch)
tree342d114adaac0067c666bc5b477b56b83a20b30d /meta/recipes-devtools
parentae1ca61bd4b0f2f742040ca35fc7a562e80c89ae (diff)
downloadpoky-37a0775984ea89e03c6d30a487bf069af75d3c83.tar.gz
qemu: upgrade to 1.7.0
linux-user-Handle-SOCK_CLOEXEC-NONBLOCK-if-unavailab.patch file no longer needed, included in upstream. qemu-native tested on all architectures, host machine is Ubuntu Linux 13.10 x86-64. Basic X11 and networking tests performed. (From OE-Core rev: 0f81a4b17ab9ea1b3cc69629aec3f3d2176f8153) Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/qemu/files/linux-user-Handle-SOCK_CLOEXEC-NONBLOCK-if-unavailab.patch92
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc1
-rw-r--r--meta/recipes-devtools/qemu/qemu/disable-grabs.patch (renamed from meta/recipes-devtools/qemu/files/disable-grabs.patch)0
-rw-r--r--meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch (renamed from meta/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch)0
-rw-r--r--meta/recipes-devtools/qemu/qemu/fxrstorssefix.patch (renamed from meta/recipes-devtools/qemu/files/fxrstorssefix.patch)0
-rw-r--r--meta/recipes-devtools/qemu/qemu/larger_default_ram_size.patch (renamed from meta/recipes-devtools/qemu/files/larger_default_ram_size.patch)0
-rw-r--r--meta/recipes-devtools/qemu/qemu/no-strip.patch (renamed from meta/recipes-devtools/qemu/files/no-strip.patch)0
-rw-r--r--meta/recipes-devtools/qemu/qemu/powerpc_rom.bin (renamed from meta/recipes-devtools/qemu/files/powerpc_rom.bin)bin4096 -> 4096 bytes
-rw-r--r--meta/recipes-devtools/qemu/qemu_1.7.0.bb (renamed from meta/recipes-devtools/qemu/qemu_1.6.1.bb)4
9 files changed, 2 insertions, 95 deletions
diff --git a/meta/recipes-devtools/qemu/files/linux-user-Handle-SOCK_CLOEXEC-NONBLOCK-if-unavailab.patch b/meta/recipes-devtools/qemu/files/linux-user-Handle-SOCK_CLOEXEC-NONBLOCK-if-unavailab.patch
deleted file mode 100644
index eb638960dd..0000000000
--- a/meta/recipes-devtools/qemu/files/linux-user-Handle-SOCK_CLOEXEC-NONBLOCK-if-unavailab.patch
+++ /dev/null
@@ -1,92 +0,0 @@
1Upstream-Status: Backport
2
3From 53d09b761f032f50c4424e8649396a9041070bae Mon Sep 17 00:00:00 2001
4From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
5Date: Mon, 23 Sep 2013 14:11:53 +0200
6Subject: [PATCH] linux-user: Handle SOCK_CLOEXEC/NONBLOCK if unavailable on
7 host
8
9If the host lacks SOCK_CLOEXEC, bail out with -EINVAL.
10If the host lacks SOCK_ONONBLOCK, try to emulate it with fcntl()
11and O_NONBLOCK.
12
13Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
14Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
15---
16 linux-user/syscall.c | 40 +++++++++++++++++++++++++++++++++++++---
17 1 file changed, 37 insertions(+), 3 deletions(-)
18
19diff --git a/linux-user/syscall.c b/linux-user/syscall.c
20index b3822b3..4a14a43 100644
21--- a/linux-user/syscall.c
22+++ b/linux-user/syscall.c
23@@ -1773,7 +1773,7 @@ static void unlock_iovec(struct iovec *vec, abi_ulong target_addr,
24 free(vec);
25 }
26
27-static inline void target_to_host_sock_type(int *type)
28+static inline int target_to_host_sock_type(int *type)
29 {
30 int host_type = 0;
31 int target_type = *type;
32@@ -1790,22 +1790,56 @@ static inline void target_to_host_sock_type(int *type)
33 break;
34 }
35 if (target_type & TARGET_SOCK_CLOEXEC) {
36+#if defined(SOCK_CLOEXEC)
37 host_type |= SOCK_CLOEXEC;
38+#else
39+ return -TARGET_EINVAL;
40+#endif
41 }
42 if (target_type & TARGET_SOCK_NONBLOCK) {
43+#if defined(SOCK_NONBLOCK)
44 host_type |= SOCK_NONBLOCK;
45+#elif !defined(O_NONBLOCK)
46+ return -TARGET_EINVAL;
47+#endif
48 }
49 *type = host_type;
50+ return 0;
51+}
52+
53+/* Try to emulate socket type flags after socket creation. */
54+static int sock_flags_fixup(int fd, int target_type)
55+{
56+#if !defined(SOCK_NONBLOCK) && defined(O_NONBLOCK)
57+ if (target_type & TARGET_SOCK_NONBLOCK) {
58+ int flags = fcntl(fd, F_GETFL);
59+ if (fcntl(fd, F_SETFL, O_NONBLOCK | flags) == -1) {
60+ close(fd);
61+ return -TARGET_EINVAL;
62+ }
63+ }
64+#endif
65+ return fd;
66 }
67
68 /* do_socket() Must return target values and target errnos. */
69 static abi_long do_socket(int domain, int type, int protocol)
70 {
71- target_to_host_sock_type(&type);
72+ int target_type = type;
73+ int ret;
74+
75+ ret = target_to_host_sock_type(&type);
76+ if (ret) {
77+ return ret;
78+ }
79
80 if (domain == PF_NETLINK)
81 return -EAFNOSUPPORT; /* do not NETLINK socket connections possible */
82- return get_errno(socket(domain, type, protocol));
83+ ret = get_errno(socket(domain, type, protocol));
84+ if (ret >= 0) {
85+ ret = sock_flags_fixup(ret, target_type);
86+ }
87+ return ret;
88 }
89
90 /* do_bind() Must return target values and target errnos. */
91--
921.8.2.1
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index e210ea1a3e..856169bb5b 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -19,7 +19,6 @@ SRC_URI = "\
19 file://no-strip.patch \ 19 file://no-strip.patch \
20 file://larger_default_ram_size.patch \ 20 file://larger_default_ram_size.patch \
21 file://disable-grabs.patch \ 21 file://disable-grabs.patch \
22 file://linux-user-Handle-SOCK_CLOEXEC-NONBLOCK-if-unavailab.patch \
23 " 22 "
24 23
25SRC_URI_append_class-native = "\ 24SRC_URI_append_class-native = "\
diff --git a/meta/recipes-devtools/qemu/files/disable-grabs.patch b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
index 41726b1c87..41726b1c87 100644
--- a/meta/recipes-devtools/qemu/files/disable-grabs.patch
+++ b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
diff --git a/meta/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch b/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch
index 13a6ea23b1..13a6ea23b1 100644
--- a/meta/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch
+++ b/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch
diff --git a/meta/recipes-devtools/qemu/files/fxrstorssefix.patch b/meta/recipes-devtools/qemu/qemu/fxrstorssefix.patch
index 59ab0f50fa..59ab0f50fa 100644
--- a/meta/recipes-devtools/qemu/files/fxrstorssefix.patch
+++ b/meta/recipes-devtools/qemu/qemu/fxrstorssefix.patch
diff --git a/meta/recipes-devtools/qemu/files/larger_default_ram_size.patch b/meta/recipes-devtools/qemu/qemu/larger_default_ram_size.patch
index 711c36071d..711c36071d 100644
--- a/meta/recipes-devtools/qemu/files/larger_default_ram_size.patch
+++ b/meta/recipes-devtools/qemu/qemu/larger_default_ram_size.patch
diff --git a/meta/recipes-devtools/qemu/files/no-strip.patch b/meta/recipes-devtools/qemu/qemu/no-strip.patch
index d6a4377cd0..d6a4377cd0 100644
--- a/meta/recipes-devtools/qemu/files/no-strip.patch
+++ b/meta/recipes-devtools/qemu/qemu/no-strip.patch
diff --git a/meta/recipes-devtools/qemu/files/powerpc_rom.bin b/meta/recipes-devtools/qemu/qemu/powerpc_rom.bin
index c4044296c5..c4044296c5 100644
--- a/meta/recipes-devtools/qemu/files/powerpc_rom.bin
+++ b/meta/recipes-devtools/qemu/qemu/powerpc_rom.bin
Binary files differ
diff --git a/meta/recipes-devtools/qemu/qemu_1.6.1.bb b/meta/recipes-devtools/qemu/qemu_1.7.0.bb
index 03e28a0fcb..d5265bcf57 100644
--- a/meta/recipes-devtools/qemu/qemu_1.6.1.bb
+++ b/meta/recipes-devtools/qemu/qemu_1.7.0.bb
@@ -6,8 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
6SRC_URI += "file://fxrstorssefix.patch" 6SRC_URI += "file://fxrstorssefix.patch"
7 7
8SRC_URI_prepend = "http://wiki.qemu.org/download/qemu-${PV}.tar.bz2" 8SRC_URI_prepend = "http://wiki.qemu.org/download/qemu-${PV}.tar.bz2"
9SRC_URI[md5sum] = "3a897d722457c5a895cd6ac79a28fda0" 9SRC_URI[md5sum] = "32893941d40d052a5e649efcf06aca06"
10SRC_URI[sha256sum] = "fc736f44aa10478223c881310a7e40fc8386547e9cadf7d01ca4685951605294" 10SRC_URI[sha256sum] = "31f333a85f2d14c605a77679904a9668eaeb1b6dc7da53a1665230f46bc21314"
11 11
12COMPATIBLE_HOST_class-target_mips64 = "null" 12COMPATIBLE_HOST_class-target_mips64 = "null"
13 13