From patchwork Wed Feb 24 18:01:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fu Wei Fu X-Patchwork-Id: 62821 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp2553563lbl; Wed, 24 Feb 2016 10:02:47 -0800 (PST) X-Received: by 10.55.80.136 with SMTP id e130mr48173577qkb.28.1456336967472; Wed, 24 Feb 2016 10:02:47 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id x4si3794034qka.74.2016.02.24.10.02.47 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 24 Feb 2016 10:02:47 -0800 (PST) Received-SPF: pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=grub-devel-bounces+patch=linaro.org@gnu.org Received: from localhost ([::1]:37482 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYdlv-00017Y-2m for patch@linaro.org; Wed, 24 Feb 2016 13:02:47 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYdlX-000108-HY for grub-devel@gnu.org; Wed, 24 Feb 2016 13:02:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYdlR-0002ge-UX for grub-devel@gnu.org; Wed, 24 Feb 2016 13:02:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37855) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYdlR-0002gX-PY for grub-devel@gnu.org; Wed, 24 Feb 2016 13:02:17 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 4AA6A627C1; Wed, 24 Feb 2016 18:02:17 +0000 (UTC) Received: from magi-f22.redhat.com (vpn1-5-9.pek2.redhat.com [10.72.5.9]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1OI1o57031440; Wed, 24 Feb 2016 13:02:09 -0500 From: fu.wei@linaro.org To: grub-devel@gnu.org, arvidjaar@gmail.com, phcoder@gmail.com Subject: [PATCH 2/3] * util/grub.d/20_linux_xen.in: Add support of the xen_boot command Date: Thu, 25 Feb 2016 02:01:40 +0800 Message-Id: <1456336901-25708-3-git-send-email-fu.wei@linaro.org> In-Reply-To: <1456336901-25708-1-git-send-email-fu.wei@linaro.org> References: <1456336901-25708-1-git-send-email-fu.wei@linaro.org> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 24 Feb 2016 18:02:17 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Cc: xen-devel@lists.xensource.com, Ian.Campbell@citrix.com, jcm@redhat.com, julien.grall@linaro.org, leif.lindholm@linaro.org, linaro-uefi@lists.linaro.org, Fu Wei X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: grub-devel-bounces+patch=linaro.org@gnu.org Sender: grub-devel-bounces+patch=linaro.org@gnu.org From: Fu Wei This patch adds the support of xen_boot command: xen_hypervisor xen_module Signed-off-by: Fu Wei --- util/grub.d/20_linux_xen.in | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) -- 2.5.0 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in index 46045db..f2a7e95 100644 --- a/util/grub.d/20_linux_xen.in +++ b/util/grub.d/20_linux_xen.in @@ -122,16 +122,28 @@ linux_entry () else xen_rm_opts="no-real-mode edd=off" fi - multiboot ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts} + if [ -f \$prefix/\$grub_cpu-\$grub_platform/xen_boot.mod ]; then + insmod xen_boot + fi + if [ "x\$grub_xen_boot" != xy ]; then + xen_loader="multiboot" + linux_loader="module" + initrd_loader="module --nounzip" + else + xen_loader="xen_hypervisor" + linux_loader="xen_module" + initrd_loader="xen_module" + fi + \${xen_loader} ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts} echo '$(echo "$lmessage" | grub_quote)' - module ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args} + \${linux_loader} ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args} EOF if test -n "${initrd}" ; then # TRANSLATORS: ramdisk isn't identifier. Should be translated. message="$(gettext_printf "Loading initial ramdisk ...")" sed "s/^/$submenu_indentation/" << EOF echo '$(echo "$message" | grub_quote)' - module --nounzip ${rel_dirname}/${initrd} + \${initrd_loader} ${rel_dirname}/${initrd} EOF fi sed "s/^/$submenu_indentation/" << EOF