Received: from list by lists.gnu.org with archive (Exim 4.71) id 1dmnJy-00006a-Nt for mharc-grub-devel@gnu.org; Tue, 29 Aug 2017 16:41:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmnJw-0008Uj-14 for grub-devel@gnu.org; Tue, 29 Aug 2017 16:41:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmnJs-0007aP-TR for grub-devel@gnu.org; Tue, 29 Aug 2017 16:41:12 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:26881) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dmnJs-0007Zf-Kd for grub-devel@gnu.org; Tue, 29 Aug 2017 16:41:08 -0400 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 v7TKf6NR009835 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Aug 2017 20:41:06 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v7TKf6oO007641 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Aug 2017 20:41:06 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v7TKf5GM006928; Tue, 29 Aug 2017 20:41:06 GMT Received: from osstest.dumpdata.com (/209.6.200.48) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 29 Aug 2017 13:41:05 -0700 From: Konrad Rzeszutek Wilk To: daniel.kiper@oracle.com, xen-devel@lists.xenproject.org, grub-devel@gnu.org Cc: Konrad Rzeszutek Wilk Subject: [PATCH v2 2/2] Use grub-file to figure out whether multiboot2 should be used for Xen.gz Date: Tue, 29 Aug 2017 16:40:53 -0400 Message-Id: <1504039253-3742-3-git-send-email-konrad.wilk@oracle.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1504039253-3742-1-git-send-email-konrad.wilk@oracle.com> References: <1504039253-3742-1-git-send-email-konrad.wilk@oracle.com> X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 141.146.126.69 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Aug 2017 20:41:13 -0000 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 v3: Add 'else' in the conditional. Use a tab and four spaces instead of two tabs. --- util/grub.d/20_linux_xen.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in index 083bcef..0cb0f4e 100644 --- a/util/grub.d/20_linux_xen.in +++ b/util/grub.d/20_linux_xen.in @@ -210,8 +210,13 @@ while [ "x${xen_list}" != "x" ] ; do xen_loader="xen_hypervisor" module_loader="xen_module" else - xen_loader="multiboot" - module_loader="module" + if ($grub_file --is-x86-multiboot2 $current_xen); then + xen_loader="multiboot2" + module_loader="module2" + else + xen_loader="multiboot" + module_loader="module" + fi fi while [ "x$list" != "x" ] ; do linux=`version_find_latest $list` -- 2.1.4