From patchwork Tue May 2 07:06:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fu Wei Fu X-Patchwork-Id: 98402 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp1740558qgf; Tue, 2 May 2017 00:07:26 -0700 (PDT) X-Received: by 10.36.33.144 with SMTP id e138mr1565031ita.9.1493708846852; Tue, 02 May 2017 00:07:26 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id u7si16324434iou.248.2017.05.02.00.07.26; Tue, 02 May 2017 00:07:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 62ADF60D7E; Tue, 2 May 2017 07:07:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id E7A6E60EDE; Tue, 2 May 2017 07:07:08 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 061F960D86; Tue, 2 May 2017 07:07:01 +0000 (UTC) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by lists.linaro.org (Postfix) with ESMTPS id 1F04560EA1 for ; Tue, 2 May 2017 07:06:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 03FF9C49A5; Tue, 2 May 2017 07:06:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 03FF9C49A5 DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 03FF9C49A5 Received: from Rei-Ayanami.localdomain.com (ovpn-8-44.pek2.redhat.com [10.72.8.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2BD7A7D940; Tue, 2 May 2017 07:06:45 +0000 (UTC) From: fu.wei@linaro.org To: dkiper@net-space.pl, grub-devel@gnu.org, arvidjaar@gmail.com, phcoder@gmail.com Date: Tue, 2 May 2017 15:06:26 +0800 Message-Id: <20170502070627.11389-3-fu.wei@linaro.org> In-Reply-To: <20170502070627.11389-1-fu.wei@linaro.org> References: <20170502070627.11389-1-fu.wei@linaro.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 02 May 2017 07:06:53 +0000 (UTC) Cc: xen-devel@lists.xensource.com, Ian.Campbell@citrix.com, jcm@redhat.com, julien.grall@arm.com, sstabellini@kernel.org, linaro-uefi@lists.linaro.org Subject: [Linaro-uefi] [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64 X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" From: Fu Wei This patch adds the support of xen_boot command for aarch64: xen_hypervisor xen_module These two commands are only for aarch64, since it has its own protocol and commands to boot xen hypervisor and Dom0, but not multiboot. For other architectures, they are still using multiboot and module commands. Signed-off-by: Fu Wei --- util/grub.d/20_linux_xen.in | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in index c48af94..9777719 100644 --- a/util/grub.d/20_linux_xen.in +++ b/util/grub.d/20_linux_xen.in @@ -122,16 +122,16 @@ linux_entry () else xen_rm_opts="no-real-mode edd=off" fi - multiboot ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts} + ${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} + ${module_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} + ${module_loader} --nounzip ${rel_dirname}/${initrd} EOF fi sed "s/^/$submenu_indentation/" << EOF @@ -206,6 +206,13 @@ while [ "x${xen_list}" != "x" ] ; do if [ "x$is_top_level" != xtrue ]; then echo " submenu '$(gettext_printf "Xen hypervisor, version %s" "${xen_version}" | grub_quote)' \$menuentry_id_option 'xen-hypervisor-$xen_version-$boot_device_id' {" fi + if [ "x$machine" != xaarch64 ]; then + xen_loader="multiboot" + module_loader="module" + else + xen_loader="xen_hypervisor" + module_loader="xen_module" + fi while [ "x$list" != "x" ] ; do linux=`version_find_latest $list` gettext_printf "Found linux image: %s\n" "$linux" >&2