summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSona Sarmadi <sona.sarmadi@enea.com>2017-05-10 12:17:36 (GMT)
committerAdrian Dudau <adrian.dudau@enea.com>2017-05-11 13:29:40 (GMT)
commitdcc07572fde318e470952fa2a984fcee301c09bf (patch)
tree8022bd61061ba64c3ca16cec0909918ee8f4523b
parent947f79967f2658bff158e3903305e481b8d34553 (diff)
downloadpoky-dcc07572fde318e470952fa2a984fcee301c09bf.tar.gz
qemu: Upgrade to 2.8.0
Added patches: - target-ppc-fix-user-mode.patch - qemu-2.5.0-cflags.patch Rebased patches: - exclude-some-arm-EABI-obsolete-syscalls.patc Removed patches: - Qemu-Arm-versatilepb-Add-memory-size-checking.patch Changelog: http://wiki.qemu.org/ChangeLog/2.8 This patch is backported from: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=pyro&id=8bf3f386f989ec9323c8399d1899d8b834e5ca94 Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
-rw-r--r--meta/recipes-devtools/qemu/qemu/Qemu-Arm-versatilepb-Add-memory-size-checking.patch46
-rw-r--r--meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch22
-rw-r--r--meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch13
-rw-r--r--meta/recipes-devtools/qemu/qemu/target-ppc-fix-user-mode.patch48
-rw-r--r--meta/recipes-devtools/qemu/qemu_2.8.0.bb (renamed from meta/recipes-devtools/qemu/qemu_2.7.1.bb)15
5 files changed, 78 insertions, 66 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/Qemu-Arm-versatilepb-Add-memory-size-checking.patch b/meta/recipes-devtools/qemu/qemu/Qemu-Arm-versatilepb-Add-memory-size-checking.patch
deleted file mode 100644
index 1a6cf51..0000000
--- a/meta/recipes-devtools/qemu/qemu/Qemu-Arm-versatilepb-Add-memory-size-checking.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From 896fa02c24347e6e9259812cfda187b1d6ca6199 Mon Sep 17 00:00:00 2001
2From: Jiang Lu <lu.jiang@windriver.com>
3Date: Wed, 13 Nov 2013 10:38:08 +0800
4Subject: [PATCH] Qemu:Arm:versatilepb: Add memory size checking
5
6The machine can not work with memory over 256M, so add a checking
7at startup. If the memory size exceed 256M, just stop emulation then
8throw out warning about memory limitation.
9
10Upstream-Status: Pending
11
12Signed-off-by: Jiang Lu <lu.jiang@windriver.com>
13
14Updated it on 2014-01-15 for rebasing
15
16Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
17
18Update it when upgrade qemu to 2.2.0
19
20Signed-off-by: Kai Kang <kai.kang@windriver.com>
21Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
22---
23 hw/arm/versatilepb.c | 7 +++++++
24 1 file changed, 7 insertions(+)
25
26diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
27index 6c69f4e..9278d90 100644
28--- a/hw/arm/versatilepb.c
29+++ b/hw/arm/versatilepb.c
30@@ -204,6 +204,13 @@ static void versatile_init(MachineState *machine, int board_id)
31 exit(1);
32 }
33
34+ if (machine->ram_size > (256 << 20)) {
35+ fprintf(stderr,
36+ "qemu: Too much memory for this machine: %d MB, maximum 256 MB\n",
37+ ((unsigned int)ram_size / (1 << 20)));
38+ exit(1);
39+ }
40+
41 cpuobj = object_new(object_class_get_name(cpu_oc));
42
43 /* By default ARM1176 CPUs have EL3 enabled. This board does not
44--
452.1.0
46
diff --git a/meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch b/meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch
index 171bda7..f593cf9 100644
--- a/meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch
+++ b/meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch
@@ -27,14 +27,14 @@ or kernel header:
27 27
28Signed-off-by: Roy.Li <rongqing.li@windriver.com> 28Signed-off-by: Roy.Li <rongqing.li@windriver.com>
29--- 29---
30 qemu-seccomp.c | 14 ++++++++------ 30 qemu-seccomp.c | 13 ++++++++-----
31 1 file changed, 8 insertions(+), 6 deletions(-) 31 1 file changed, 8 insertions(+), 5 deletions(-)
32 32
33diff --git a/qemu-seccomp.c b/qemu-seccomp.c 33diff --git a/qemu-seccomp.c b/qemu-seccomp.c
34index caa926e..5a78502 100644 34index df75d9c..0e577f8 100644
35--- a/qemu-seccomp.c 35--- a/qemu-seccomp.c
36+++ b/qemu-seccomp.c 36+++ b/qemu-seccomp.c
37@@ -25,15 +25,21 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { 37@@ -35,15 +35,21 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
38 { SCMP_SYS(timer_settime), 255 }, 38 { SCMP_SYS(timer_settime), 255 },
39 { SCMP_SYS(timer_gettime), 254 }, 39 { SCMP_SYS(timer_gettime), 254 },
40 { SCMP_SYS(futex), 253 }, 40 { SCMP_SYS(futex), 253 },
@@ -58,7 +58,7 @@ index caa926e..5a78502 100644
58 { SCMP_SYS(mprotect), 246 }, 58 { SCMP_SYS(mprotect), 246 },
59 { SCMP_SYS(execve), 245 }, 59 { SCMP_SYS(execve), 245 },
60 { SCMP_SYS(open), 245 }, 60 { SCMP_SYS(open), 245 },
61@@ -48,13 +54,11 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { 61@@ -58,7 +64,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
62 { SCMP_SYS(bind), 245 }, 62 { SCMP_SYS(bind), 245 },
63 { SCMP_SYS(listen), 245 }, 63 { SCMP_SYS(listen), 245 },
64 { SCMP_SYS(semget), 245 }, 64 { SCMP_SYS(semget), 245 },
@@ -66,13 +66,7 @@ index caa926e..5a78502 100644
66 { SCMP_SYS(gettimeofday), 245 }, 66 { SCMP_SYS(gettimeofday), 245 },
67 { SCMP_SYS(readlink), 245 }, 67 { SCMP_SYS(readlink), 245 },
68 { SCMP_SYS(access), 245 }, 68 { SCMP_SYS(access), 245 },
69 { SCMP_SYS(prctl), 245 }, 69@@ -104,7 +109,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
70 { SCMP_SYS(signalfd), 245 },
71- { SCMP_SYS(getrlimit), 245 },
72 { SCMP_SYS(set_tid_address), 245 },
73 { SCMP_SYS(statfs), 245 },
74 { SCMP_SYS(unlink), 245 },
75@@ -93,7 +97,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
76 { SCMP_SYS(times), 245 }, 70 { SCMP_SYS(times), 245 },
77 { SCMP_SYS(exit), 245 }, 71 { SCMP_SYS(exit), 245 },
78 { SCMP_SYS(clock_gettime), 245 }, 72 { SCMP_SYS(clock_gettime), 245 },
@@ -80,7 +74,7 @@ index caa926e..5a78502 100644
80 { SCMP_SYS(restart_syscall), 245 }, 74 { SCMP_SYS(restart_syscall), 245 },
81 { SCMP_SYS(pwrite64), 245 }, 75 { SCMP_SYS(pwrite64), 245 },
82 { SCMP_SYS(nanosleep), 245 }, 76 { SCMP_SYS(nanosleep), 245 },
83@@ -182,7 +185,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { 77@@ -194,7 +198,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
84 { SCMP_SYS(lstat64), 241 }, 78 { SCMP_SYS(lstat64), 241 },
85 { SCMP_SYS(sendfile64), 241 }, 79 { SCMP_SYS(sendfile64), 241 },
86 { SCMP_SYS(ugetrlimit), 241 }, 80 { SCMP_SYS(ugetrlimit), 241 },
@@ -89,5 +83,5 @@ index caa926e..5a78502 100644
89 { SCMP_SYS(rt_sigqueueinfo), 241 }, 83 { SCMP_SYS(rt_sigqueueinfo), 241 },
90 { SCMP_SYS(rt_tgsigqueueinfo), 241 }, 84 { SCMP_SYS(rt_tgsigqueueinfo), 241 },
91-- 85--
921.9.1 862.1.4
93 87
diff --git a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
new file mode 100644
index 0000000..173394f
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
@@ -0,0 +1,13 @@
1--- a/configure
2+++ b/configure
3@@ -4468,10 +4468,6 @@ fi
4 if test "$gcov" = "yes" ; then
5 CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
6 LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
7-elif test "$fortify_source" = "yes" ; then
8- CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"
9-elif test "$debug" = "no"; then
10- CFLAGS="-O2 $CFLAGS"
11 fi
12
13 ##########################################
diff --git a/meta/recipes-devtools/qemu/qemu/target-ppc-fix-user-mode.patch b/meta/recipes-devtools/qemu/qemu/target-ppc-fix-user-mode.patch
new file mode 100644
index 0000000..ba21e71
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/target-ppc-fix-user-mode.patch
@@ -0,0 +1,48 @@
1[Qemu-ppc] [PATCH 1/1] target-ppc, tcg: fix usermode segfault with pthread
2
3From: Sam Bobroff
4Subject: [Qemu-ppc] [PATCH 1/1] target-ppc, tcg: fix usermode segfault with pthread_create()
5Date: Mon, 30 Jan 2017 16:08:07 +1100
6Programs run under qemu-ppc64 on an x86_64 host currently segfault
7if they use pthread_create() due to the adjustment made to the NIP in
8commit bd6fefe71cec5a0c7d2be4ac96307f25db56abf9.
9
10This patch changes cpu_loop() to set the NIP back to the
11pre-incremented value before calling do_syscall(), which causes the
12correct address to be used for the new thread and corrects the fault.
13
14Signed-off-by: Sam Bobroff <address@hidden>
15
16Upstream-Status: Backport
17
18---
19
20linux-user/main.c | 4 +++-
211 file changed, 3 insertions(+), 1 deletion(-)
22
23diff --git a/linux-user/main.c b/linux-user/main.c
24index 30049581ef..b5dee01541 100644
25--- a/linux-user/main.c
26+++ b/linux-user/main.c
27@@ -1712,18 +1712,20 @@ void cpu_loop(CPUPPCState *env)
28 * in syscalls.
29 */
30 env->crf[0] &= ~0x1;
31+ env->nip += 4;
32 ret = do_syscall(env, env->gpr[0], env->gpr[3], env->gpr[4],
33 env->gpr[5], env->gpr[6], env->gpr[7],
34 env->gpr[8], 0, 0);
35 if (ret == -TARGET_ERESTARTSYS) {
36+ env->nip -= 4;
37 break;
38 }
39 if (ret == (target_ulong)(-TARGET_QEMU_ESIGRETURN)) {
40+ env->nip -= 4;
41 /* Returning from a successful sigreturn syscall.
42 Avoid corrupting register state. */
43 break;
44 }
45- env->nip += 4;
46 if (ret > (target_ulong)(-515)) {
47 env->crf[0] |= 0x1;
48 ret = -ret;
diff --git a/meta/recipes-devtools/qemu/qemu_2.7.1.bb b/meta/recipes-devtools/qemu/qemu_2.8.0.bb
index 118a49a..e0527a8 100644
--- a/meta/recipes-devtools/qemu/qemu_2.7.1.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.8.0.bb
@@ -5,16 +5,19 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
5 5
6SRC_URI += "file://configure-fix-Darwin-target-detection.patch \ 6SRC_URI += "file://configure-fix-Darwin-target-detection.patch \
7 file://qemu-enlarge-env-entry-size.patch \ 7 file://qemu-enlarge-env-entry-size.patch \
8 file://Qemu-Arm-versatilepb-Add-memory-size-checking.patch \
9 file://no-valgrind.patch \ 8 file://no-valgrind.patch \
10 file://pathlimit.patch \ 9 file://pathlimit.patch \
11 " 10 file://qemu-2.5.0-cflags.patch \
12SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2" 11 file://target-ppc-fix-user-mode.patch \
12"
13 13
14SRC_URI[md5sum] = "a315bc51ed443a08d2cf1416d76b9ab4" 14SRC_URI =+ "http://wiki.qemu-project.org/download/${BP}.tar.bz2"
15SRC_URI[sha256sum] = "68636788eb69bcb0b44ba220b32b50495d6bd5712a934c282217831c4822958f"
16 15
17COMPATIBLE_HOST_class-target_mips64 = "null" 16SRC_URI[md5sum] = "17940dce063b6ce450a12e719a6c9c43"
17SRC_URI[sha256sum] = "dafd5d7f649907b6b617b822692f4c82e60cf29bc0fc58bc2036219b591e5e62"
18
19COMPATIBLE_HOST_mipsarchn32 = "null"
20COMPATIBLE_HOST_mipsarchn64 = "null"
18 21
19do_install_append() { 22do_install_append() {
20 # Prevent QA warnings about installed ${localstatedir}/run 23 # Prevent QA warnings about installed ${localstatedir}/run