From patchwork Mon Jun 3 12:28:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guo Ren X-Patchwork-Id: 1109225 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="yn9sqRT2"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45HZ9M1rt1z9s4V for ; Mon, 3 Jun 2019 22:28:55 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6FE4C85BEC; Mon, 3 Jun 2019 12:28:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gMW5gANKCAIn; Mon, 3 Jun 2019 12:28:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5924B85CBC; Mon, 3 Jun 2019 12:28:51 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 728C31BF4E6 for ; Mon, 3 Jun 2019 12:28:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 6FAEA220DA for ; Mon, 3 Jun 2019 12:28:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6xLzgWwQw1km for ; Mon, 3 Jun 2019 12:28:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by silver.osuosl.org (Postfix) with ESMTPS id 154761FF11 for ; Mon, 3 Jun 2019 12:28:49 +0000 (UTC) Received: from localhost.localdomain (unknown [223.93.147.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 502FD2541D; Mon, 3 Jun 2019 12:28:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559564928; bh=DGiZVUG7fCVtJmewJp9u5pp1IYc3KUnI9ZUKKWM7csY=; h=From:To:Cc:Subject:Date:From; b=yn9sqRT27La0Xcy+9InyMH6LC7I91lF7Gf2aFFOddjVKryUTeEBsxhRBexCgZLpnH f29St/jKGLF+BbBqGmpXB7IC4bNHPx4LUrKFlXYC31+zJkGJKMxGlIyw7S6Mvgx13g qxfYko9EoknCesb2ywHmX1IIMnP4JR5j8w0N3qDI= From: guoren@kernel.org To: Thomas Petazzoni , Thomas De Schampheleire , arnout@mind.be Date: Mon, 3 Jun 2019 20:28:06 +0800 Message-Id: <1559564887-4088-1-git-send-email-guoren@kernel.org> X-Mailer: git-send-email 2.7.4 Subject: [Buildroot] [PATCH 1/2] package/qemu: Move patches to version directory X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guo Ren , zhiwei_liu@c-sky.com, linux-csky@vger.kernel.org, buildroot@buildroot.org MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Guo Ren Signed-off-by: Guo Ren Cc: Thomas Petazzoni --- ...ix-usage-of-mcontext-structure-on-ARM-uCl.patch | 35 ------------- .../qemu/0002-configure-improve-usbfs-check.patch | 60 ---------------------- ...ix-usage-of-mcontext-structure-on-ARM-uCl.patch | 35 +++++++++++++ .../3.1.0/0002-configure-improve-usbfs-check.patch | 60 ++++++++++++++++++++++ 4 files changed, 95 insertions(+), 95 deletions(-) delete mode 100644 package/qemu/0001-user-exec-fix-usage-of-mcontext-structure-on-ARM-uCl.patch delete mode 100644 package/qemu/0002-configure-improve-usbfs-check.patch create mode 100644 package/qemu/3.1.0/0001-user-exec-fix-usage-of-mcontext-structure-on-ARM-uCl.patch create mode 100644 package/qemu/3.1.0/0002-configure-improve-usbfs-check.patch diff --git a/package/qemu/0001-user-exec-fix-usage-of-mcontext-structure-on-ARM-uCl.patch b/package/qemu/0001-user-exec-fix-usage-of-mcontext-structure-on-ARM-uCl.patch deleted file mode 100644 index a0c4a62..0000000 --- a/package/qemu/0001-user-exec-fix-usage-of-mcontext-structure-on-ARM-uCl.patch +++ /dev/null @@ -1,35 +0,0 @@ -From d3f1e7e9ff9aae3f770b0bcb9aa3c2f787f76a1b Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Fri, 5 May 2017 09:07:15 +0200 -Subject: [PATCH] user-exec: fix usage of mcontext structure on ARM/uClibc - -user-exec.c has some conditional code to decide how to use the -mcontext structure. Unfortunately, since uClibc defines __GLIBC__, but -with old versions of __GLIBC__ and __GLIBC_MINOR__, an old code path -gets used, which doesn't apply to uClibc. - -Fix this by excluding __UCLIBC__, which ensures we fall back to the -general case of using uc_mcontext.arm_pc, which works fine with -uClibc. - -Signed-off-by: Thomas Petazzoni ---- - user-exec.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c -index 6db0758..2b3d116 100644 ---- a/accel/tcg/user-exec.c -+++ b/accel/tcg/user-exec.c -@@ -463,7 +463,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, - - #if defined(__NetBSD__) - pc = uc->uc_mcontext.__gregs[_REG_R15]; --#elif defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3)) -+#elif defined(__GLIBC__) && !defined(__UCLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3)) - pc = uc->uc_mcontext.gregs[R15]; - #else - pc = uc->uc_mcontext.arm_pc; --- -2.7.4 - diff --git a/package/qemu/0002-configure-improve-usbfs-check.patch b/package/qemu/0002-configure-improve-usbfs-check.patch deleted file mode 100644 index d693b5d..0000000 --- a/package/qemu/0002-configure-improve-usbfs-check.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 9672cccd64c446369b5649fe23d575917638be46 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Tue, 5 Feb 2019 15:07:43 +0100 -Subject: [PATCH] configure: improve usbfs check - -The current check to test if usbfs support should be compiled or not -solely relies on the presence of , without -actually checking that all definition used by Qemu are provided by -this header file. - -With sufficiently old kernel headers, may be -present, but some of the definitions needed by Qemu may not be -available. - -This commit improves the check by building a small program that -actually tests whether the necessary definitions are available. - -In addition, it fixes a bug where have_usbfs was set to "yes" -regardless of the result of the test. - -Signed-off-by: Thomas Petazzoni ---- - configure | 19 +++++++++++++++++-- - 1 file changed, 17 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index 3d89870d99..799c8e3b08 100755 ---- a/configure -+++ b/configure -@@ -4266,10 +4266,25 @@ fi - # check for usbfs - have_usbfs=no - if test "$linux_user" = "yes"; then -- if check_include linux/usbdevice_fs.h; then -+ cat > $TMPC << EOF -+#include -+ -+#ifndef USBDEVFS_GET_CAPABILITIES -+#error "USBDEVFS_GET_CAPABILITIES undefined" -+#endif -+ -+#ifndef USBDEVFS_DISCONNECT_CLAIM -+#error "USBDEVFS_DISCONNECT_CLAIM undefined" -+#endif -+ -+int main(void) -+{ -+ return 0; -+} -+EOF -+ if compile_prog "" ""; then - have_usbfs=yes - fi -- have_usbfs=yes - fi - - # check for fallocate --- -2.20.1 - diff --git a/package/qemu/3.1.0/0001-user-exec-fix-usage-of-mcontext-structure-on-ARM-uCl.patch b/package/qemu/3.1.0/0001-user-exec-fix-usage-of-mcontext-structure-on-ARM-uCl.patch new file mode 100644 index 0000000..a0c4a62 --- /dev/null +++ b/package/qemu/3.1.0/0001-user-exec-fix-usage-of-mcontext-structure-on-ARM-uCl.patch @@ -0,0 +1,35 @@ +From d3f1e7e9ff9aae3f770b0bcb9aa3c2f787f76a1b Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Fri, 5 May 2017 09:07:15 +0200 +Subject: [PATCH] user-exec: fix usage of mcontext structure on ARM/uClibc + +user-exec.c has some conditional code to decide how to use the +mcontext structure. Unfortunately, since uClibc defines __GLIBC__, but +with old versions of __GLIBC__ and __GLIBC_MINOR__, an old code path +gets used, which doesn't apply to uClibc. + +Fix this by excluding __UCLIBC__, which ensures we fall back to the +general case of using uc_mcontext.arm_pc, which works fine with +uClibc. + +Signed-off-by: Thomas Petazzoni +--- + user-exec.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c +index 6db0758..2b3d116 100644 +--- a/accel/tcg/user-exec.c ++++ b/accel/tcg/user-exec.c +@@ -463,7 +463,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, + + #if defined(__NetBSD__) + pc = uc->uc_mcontext.__gregs[_REG_R15]; +-#elif defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3)) ++#elif defined(__GLIBC__) && !defined(__UCLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3)) + pc = uc->uc_mcontext.gregs[R15]; + #else + pc = uc->uc_mcontext.arm_pc; +-- +2.7.4 + diff --git a/package/qemu/3.1.0/0002-configure-improve-usbfs-check.patch b/package/qemu/3.1.0/0002-configure-improve-usbfs-check.patch new file mode 100644 index 0000000..d693b5d --- /dev/null +++ b/package/qemu/3.1.0/0002-configure-improve-usbfs-check.patch @@ -0,0 +1,60 @@ +From 9672cccd64c446369b5649fe23d575917638be46 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Tue, 5 Feb 2019 15:07:43 +0100 +Subject: [PATCH] configure: improve usbfs check + +The current check to test if usbfs support should be compiled or not +solely relies on the presence of , without +actually checking that all definition used by Qemu are provided by +this header file. + +With sufficiently old kernel headers, may be +present, but some of the definitions needed by Qemu may not be +available. + +This commit improves the check by building a small program that +actually tests whether the necessary definitions are available. + +In addition, it fixes a bug where have_usbfs was set to "yes" +regardless of the result of the test. + +Signed-off-by: Thomas Petazzoni +--- + configure | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index 3d89870d99..799c8e3b08 100755 +--- a/configure ++++ b/configure +@@ -4266,10 +4266,25 @@ fi + # check for usbfs + have_usbfs=no + if test "$linux_user" = "yes"; then +- if check_include linux/usbdevice_fs.h; then ++ cat > $TMPC << EOF ++#include ++ ++#ifndef USBDEVFS_GET_CAPABILITIES ++#error "USBDEVFS_GET_CAPABILITIES undefined" ++#endif ++ ++#ifndef USBDEVFS_DISCONNECT_CLAIM ++#error "USBDEVFS_DISCONNECT_CLAIM undefined" ++#endif ++ ++int main(void) ++{ ++ return 0; ++} ++EOF ++ if compile_prog "" ""; then + have_usbfs=yes + fi +- have_usbfs=yes + fi + + # check for fallocate +-- +2.20.1 +