From patchwork Sat Jul 16 01:55:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Rzeszutek Wilk X-Patchwork-Id: 9232985 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5137260574 for ; Sat, 16 Jul 2016 01:58:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3FAC1254F7 for ; Sat, 16 Jul 2016 01:58:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2FD772574A; Sat, 16 Jul 2016 01:58:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AE9EF254F7 for ; Sat, 16 Jul 2016 01:58:41 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bOEpK-0001Q9-7n; Sat, 16 Jul 2016 01:55:34 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bOEpJ-0001Q3-2O for xen-devel@lists.xen.org; Sat, 16 Jul 2016 01:55:33 +0000 Received: from [85.158.143.35] by server-3.bemta-6.messagelabs.com id 1A/38-05661-41499875; Sat, 16 Jul 2016 01:55:32 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOIsWRWlGSWpSXmKPExsXSO6nOVVd4Sme 4wa4JOhZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8bZ7tKCbsmK75uamBoYJwl3MXJxCAl0MEms mn+LBcL5wigx+fhzNghnI6PEn4Z3QBlOIKebUeLyYi4Iu0jiX8tydhCbRUBVYuKLHsYuRg4ON gETiTerHEHCIgJ6El1rmplBbGYBaYlrT96ygdjCAqYSOxbtA4vzCphLnDnykRFi130miQ2H+5 ggEoISJ2c+YYFo1pK48e8lE8h8kEHL/3GAhDkFLCR2rfnEDBIWFVCReHWwHiQsIWAs0f72Its ERqFZSAbNQjJoFsKgBYzMqxjVi1OLylKLdI30kooy0zNKchMzc3QNDcz0clOLixPTU3MSk4r1 kvNzNzECA5kBCHYwLvvrdIhRkoNJSZS3L7AzXIgvKT+lMiOxOCO+qDQntfgQowwHh5IEb9wko JxgUWp6akVaZg4wpmDSEhw8SiK88iBp3uKCxNzizHSI1ClGXY4/GyZfYRJiycvPS5US580BKR IAKcoozYMbAYvvS4yyUsK8jEBHCfEUpBblZpagyr9iFOdgVBLmnQsyhSczrwRu0yugI5iAjrA 2bwc5oiQRISXVwLizcLupcbqQk7fTbJ5/W2rzee4fP3nh7RHBg0x2PVf79+/UV5Z7XBj+jCu0 VV1U7HJ1w47gOa8Y3771Xmtq0f1m5WON7IJ1msqL8ySsXzp+S99YGPjl0dlCfV2eT3I3z9wTM Mx0VMu+bbyMfavDk+D+5JW3tNcbTey8G5wexH04TtopS1D5nhJLcUaioRZzUXEiAL5CAg3qAg AA X-Env-Sender: konrad.wilk@oracle.com X-Msg-Ref: server-8.tower-21.messagelabs.com!1468634130!24154375!1 X-Originating-IP: [141.146.126.69] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTQxLjE0Ni4xMjYuNjkgPT4gMjc3MjE4\n X-StarScan-Received: X-StarScan-Version: 8.77; banners=-,-,- X-VirusChecked: Checked Received: (qmail 3811 invoked from network); 16 Jul 2016 01:55:31 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by server-8.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 16 Jul 2016 01:55:31 -0000 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u6G1tQOB023467 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 16 Jul 2016 01:55:27 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id u6G1tQeg011388 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 16 Jul 2016 01:55:26 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u6G1tN4q006435; Sat, 16 Jul 2016 01:55:23 GMT Received: from char.us.oracle.com (/10.137.176.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 15 Jul 2016 18:55:23 -0700 Received: by char.us.oracle.com (Postfix, from userid 1000) id 9D2716A00DF; Fri, 15 Jul 2016 21:55:22 -0400 (EDT) Date: Fri, 15 Jul 2016 21:55:22 -0400 From: Konrad Rzeszutek Wilk To: Ross Lagerwall Message-ID: <20160716015522.GB18828@char.us.oracle.com> References: <1465556565-26403-1-git-send-email-ross.lagerwall@citrix.com> <1465556565-26403-2-git-send-email-ross.lagerwall@citrix.com> <20160614153557.GE9456@char.us.oracle.com> <57610D0E.4050805@citrix.com> <20160615140003.GC9254@char.us.oracle.com> <860ef125-578b-13c6-4ba2-9706542315be@citrix.com> <20160715133611.GA16867@char.us.oracle.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160715133611.GA16867@char.us.oracle.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Source-IP: aserv0022.oracle.com [141.146.126.234] Cc: xen-devel@lists.xen.org Subject: Re: [Xen-devel] [PATCH 2/3] Update to use a .config file X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP > > OK, I'll split it into two. Feel free to create a stable-47 branch in > > livepatch-build-tools.git with only the .config patch. Personally, I'd > > rather not spend much time backporting stuff to support a tech preview > > feature on an older branch. > > We will need to update the Wiki a bit too... > > What if I we do something simpler? And the offical patch: From 929a92b3dbb8467e0a69b50706b69fb206b51ff3 Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Fri, 15 Jul 2016 09:36:23 -0400 Subject: [PATCH] Check .config for CONFIG_DEBUG. If not found use --xen-debug (if specified) Xen 4.8 ditched the 'debug=y' and now has CONFIG_DEBUG in the .config. To still support 4.7 lets just poke the .config file and see. Signed-off-by: Konrad Rzeszutek Wilk --- livepatch-build | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/livepatch-build b/livepatch-build index 6254c29..2165e3b 100755 --- a/livepatch-build +++ b/livepatch-build @@ -66,7 +66,7 @@ function build_full() { cd "${SRCDIR}/xen" || die make "-j$CPUS" clean &> "${OUTPUT}/build_full_clean.log" || die - make "-j$CPUS" debug="$XEN_DEBUG" &> "${OUTPUT}/build_full_compile.log" || die + make "-j$CPUS" "$XEN_DEBUG" &> "${OUTPUT}/build_full_compile.log" || die cp xen-syms "$OUTPUT" } @@ -87,7 +87,7 @@ function build_special() cd "${SRCDIR}/xen" || die sed -i 's/CFLAGS += -nostdinc/CFLAGS += -nostdinc -ffunction-sections -fdata-sections/' Rules.mk sed -i 's/--section-alignment=0x200000/--section-alignment=0x1000/' arch/x86/Makefile - make "-j$CPUS" debug="$XEN_DEBUG" &> "${OUTPUT}/build_${name}_compile.log" || die + make "-j$CPUS" "$XEN_DEBUG" &> "${OUTPUT}/build_${name}_compile.log" || die sed -i 's/CFLAGS += -nostdinc -ffunction-sections -fdata-sections/CFLAGS += -nostdinc/' Rules.mk sed -i 's/--section-alignment=0x1000/--section-alignment=0x200000/' arch/x86/Makefile @@ -165,7 +165,7 @@ usage() { echo " -j, --cpus Number of CPUs to use" >&2 echo " -k, --skip Skip build or diff phase" >&2 echo " -d, --debug Enable debug logging" >&2 - echo " --xen-debug Build debug Xen" >&2 + echo " --xen-debug Build debug Xen (if your .config does not have the options)" >&2 echo " --xen-syms Build against a xen-syms" >&2 echo " --depends Required build-id" >&2 echo " --prelink Prelink" >&2 @@ -277,6 +277,20 @@ if [ "${SKIP}" != "build" ]; then cp -f "${CONFIGFILE}" "${OUTPUT}/.config" cp -f "${OUTPUT}/.config" "xen/.config" + grep -q CONFIG_DEBUG "xen/.config" + if [ $? -eq 0 ]; then + if [ "$XEN_DEBUG" == "y" ]; then + grep -q "CONFIG_DEBUG=y" "xen/.config" + if [ $? -ne 0 ]; then + echo "CONFIG_DEBUG and --xen-debug mismatch!" + die + fi + fi + XEN_DEBUG="" + else + XEN_DEBUG="--xen-debug $XEN_DEBUG" + fi + echo "Perform full initial build with ${CPUS} CPU(s)..." build_full