From patchwork Mon Aug 28 18:40:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Rzeszutek Wilk X-Patchwork-Id: 9926019 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 B864D60375 for ; Mon, 28 Aug 2017 18:43:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC0182878F for ; Mon, 28 Aug 2017 18:43:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A0EC328794; Mon, 28 Aug 2017 18:43:01 +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 3896228790 for ; Mon, 28 Aug 2017 18:43:00 +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 1dmOxk-0004BA-QF; Mon, 28 Aug 2017 18:40:40 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmOxj-0004Az-MB for xen-devel@lists.xenproject.org; Mon, 28 Aug 2017 18:40:39 +0000 Received: from [85.158.143.35] by server-9.bemta-6.messagelabs.com id C0/D6-03406-6A364A95; Mon, 28 Aug 2017 18:40:38 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplkeJIrShJLcpLzFFi42KZM10+UHdZ8pJ Ig+ef5Sy+b5nM5MDocfjDFZYAxijWzLyk/IoE1oy2ZYsZC26wVZzctIipgfEWaxcjJ4eQwEQm iS13rLoYuYDs34wS6/tPskE4Gxkl9t9oYIFwuhklnpzcB+RwcLAJmEi8WeUI0i0iEC7x9+h5R hCbWcBIYnLjOxYQW1ggVuLKie9gcRYBVYn9L9awg9i8Aq4SbZ9fMoHYEgJyEueP/2QGsTkF3C Tu/j3CBHGRq8Snf3tZIGoMJT5vXMo8gZFvASPDKkaN4tSistQiXWMDvaSizPSMktzEzBxdQwM zvdzU4uLE9NScxKRiveT83E2MwEBhAIIdjH/XBh5ilORgUhLl3VmxOFKILyk/pTIjsTgjvqg0 J7X4EKMMB4eSBG9p0pJIIcGi1PTUirTMHGDIwqQlOHiURHjjQdK8xQWJucWZ6RCpU4zGHBtWr //CxNH0YcsXJiGWvPy8VClx3jqQUgGQ0ozSPLhBsFi6xCgrJczLCHSaEE9BalFuZgmq/CtGcQ 5GJWHe2yBTeDLzSuD2vQI6hQnoFEXBhSCnlCQipKQaGHt91rb6BXWuiFpc5z2j4lBD9kNvu13 NwgY2/fMeBrJWKuv/WqIQn7Zgc8T1vRIZ2p4njxYmp3poCD0Qd5768uGJmA3KJ+YfEdqf97Q5 SMf2531Z8ZXybtJxr1j8OsWYbDccDNV/eias9/r17GsGD1a+U+HyLJuQIzN7n1fgffVzK+yu7 AlvUWIpzkg01GIuKk4EAMUkbBegAgAA X-Env-Sender: konrad.wilk@oracle.com X-Msg-Ref: server-7.tower-21.messagelabs.com!1503945636!79996024!1 X-Originating-IP: [156.151.31.81] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTU2LjE1MS4zMS44MSA9PiAyODgzMzk=\n X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 48514 invoked from network); 28 Aug 2017 18:40:38 -0000 Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by server-7.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 28 Aug 2017 18:40:38 -0000 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v7SIeXYh007871 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 Aug 2017 18:40:33 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v7SIeX0B032255 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 Aug 2017 18:40:33 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v7SIeWFs032396; Mon, 28 Aug 2017 18:40:32 GMT Received: from osstest.dumpdata.com (/209.6.200.48) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 28 Aug 2017 11:40:32 -0700 From: Konrad Rzeszutek Wilk To: daniel.kiper@oracle.com, xen-devel@lists.xenproject.org, grub-devel@gnu.org Date: Mon, 28 Aug 2017 14:40:15 -0400 Message-Id: <1503945615-1720-3-git-send-email-konrad.wilk@oracle.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1503945615-1720-1-git-send-email-konrad.wilk@oracle.com> References: <1503945615-1720-1-git-send-email-konrad.wilk@oracle.com> X-Source-IP: userv0022.oracle.com [156.151.31.74] Cc: Konrad Rzeszutek Wilk Subject: [Xen-devel] [PATCH 2/2] Use grub-file to figure out whether multiboot2 should be used for Xen.gz 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: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP The multiboot2 is much more preferable than multiboot. Especiall if booting under EFI where multiboot does not have the functionality to pass ImageHandler. Signed-off-by: Konrad Rzeszutek Wilk --- v2: Rebase on top of d33045ce7ffcb7c1e4a60c14d5ca64b36e3c5abe --- util/grub.d/20_linux_xen.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in index 083bcef..29e015b 100644 --- a/util/grub.d/20_linux_xen.in +++ b/util/grub.d/20_linux_xen.in @@ -212,6 +212,10 @@ while [ "x${xen_list}" != "x" ] ; do else xen_loader="multiboot" module_loader="module" + if ($grub_file --is-x86-multiboot2 $current_xen); then + xen_loader="multiboot2" + module_loader="module2" + fi fi while [ "x$list" != "x" ] ; do linux=`version_find_latest $list`