From patchwork Fri Oct 30 08:44:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fu Wei Fu X-Patchwork-Id: 55823 Delivered-To: patch@linaro.org Received: by 10.112.61.134 with SMTP id p6csp1053329lbr; Fri, 30 Oct 2015 01:44:43 -0700 (PDT) X-Received: by 10.55.203.68 with SMTP id d65mr7975558qkj.84.1446194683482; Fri, 30 Oct 2015 01:44:43 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id o85si4979710qki.46.2015.10.30.01.44.43 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 30 Oct 2015 01:44:43 -0700 (PDT) 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; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: from localhost ([::1]:49144 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zs5Ih-00073J-3G for patch@linaro.org; Fri, 30 Oct 2015 04:44:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zs5IT-00073E-Nq for grub-devel@gnu.org; Fri, 30 Oct 2015 04:44:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zs5IS-0004eP-N2 for grub-devel@gnu.org; Fri, 30 Oct 2015 04:44:29 -0400 Received: from mail-ob0-x235.google.com ([2607:f8b0:4003:c01::235]:36153) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zs5IS-0004eC-H9 for grub-devel@gnu.org; Fri, 30 Oct 2015 04:44:28 -0400 Received: by obcqt19 with SMTP id qt19so38553107obc.3 for ; Fri, 30 Oct 2015 01:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=+41UJFtbw2uFEvnAqB6DBKWja2f9/dpv/cGJ08Z+AtQ=; b=O20uuJ+VPz6UaNuQ0l+pfWyFiy8DaqadPhKEIfXj5ZeJKgIKFLYP8WOmgnGCQmzD9W CoYs+lTDmYdE3WWsgh4p8FQ8U70eCaPEz4NcFczNFq4UI6Pmm1mIg3vHrqUwHwgIJIYf q9pa5hRC0iYx/FanIgpbxAKq3iyNOB0V2ylVDt+2T8ESTNpVUsYQWk4OU2D817qQKFKl FihV6/zfWkZP3U40INj7zGMXH+PgixUMYh7NNr5Cuwkz1w7MOe64SV9PkFtRH+wGiWDM SEJ7V6RMt1uOJoqABArIiugiadisRCHJbamcHsOEACd7jLv0gJyBRvG9dqT9yXZx6hmB isBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+41UJFtbw2uFEvnAqB6DBKWja2f9/dpv/cGJ08Z+AtQ=; b=EUE3ZQl662wVRtNp+W4yZc0quJMy8McgHXBw885XPZmUzKX5HXJTlBV6mU3inzgf42 Z+O56g/Bct07vlqiaNeKBVYkc5xum51qmbCT7SmR7s1TwGjx+IzQverSM4iMxPWFxifu QBzMkzkBJUt6oVfc47dhf2a2pxjTy/CC/gNKK6845NGH8QJrf9/k3ezzTPe/WG5moCwP QaSU8QOaobDKWQQXkxVZa07Yu9g8enLyHBxgZrW3tWog66QW5mE4fDN10gV+Cpr9ThVX D9CZVL7sN5zFFyv3Lv+QjYP2LjpbjpclQ+wUwuZq1LCkgBq5arKNr4fNnBaRvSLd1eGO TZQg== X-Gm-Message-State: ALoCoQlkh12EPr5yiyWY8Zy79+IjleqpOS+vp2T1M8PHMRACKWgWI0ZoUPkH6/TCrP1hIP11Kmgg MIME-Version: 1.0 X-Received: by 10.182.131.228 with SMTP id op4mr4710444obb.3.1446194667895; Fri, 30 Oct 2015 01:44:27 -0700 (PDT) Received: by 10.202.209.84 with HTTP; Fri, 30 Oct 2015 01:44:27 -0700 (PDT) In-Reply-To: <56323A72.3000905@gmail.com> References: <=fu.wei@linaro.org> <1437628583-23667-1-git-send-email-fu.wei@linaro.org> <1437628583-23667-4-git-send-email-fu.wei@linaro.org> <56323A72.3000905@gmail.com> Date: Fri, 30 Oct 2015 16:44:27 +0800 Message-ID: Subject: Re: [PATCH v3 3/4] * util/grub.d/20_linux_xen.in: Add support of the XEN boot on aarch64 From: Fu Wei To: =?UTF-8?Q?Vladimir_=27=CF=86=2Dcoder=2Fphcoder=27_Serbinenko?= X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::235 Cc: The development of GNU GRUB , xen-devel@lists.xensource.com, Ian Campbell , Stefano Stabellini , Andrei Borzenkov , Jon Masters , Leif Lindholm , Ryan Harkin , Linaro UEFI Mailman List 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: , Errors-To: grub-devel-bounces+patch=linaro.org@gnu.org Sender: grub-devel-bounces+patch=linaro.org@gnu.org Hi Vladimir, Great thanks for your suggestion! :-) On 29 October 2015 at 23:25, Vladimir 'φ-coder/phcoder' Serbinenko wrote: >> +if [ "x$machine" != xaarch64 ]; then >> + multiboot_cmd="multiboot" >> + module_linux_cmd="module" >> + module_initrd_cmd="module --nounzip" >> +else >> + multiboot_cmd="xen_hypervisor" >> + module_linux_cmd="xen_linux" >> + module_initrd_cmd="xen_initrd" >> +fi >> + > Please do not hardcode an assumption that grub-mkconfig is executed on > the same machine as GRUB is booted. I know that we have instances of > such assumption in some cases but we'd like to eliminate them. Alternatives: > - Check arch on boot time > - Check that new xen commands are supported (define a new feature) > Please add xen_* aliases on x86 as well I would like to go this way, but could you provide some help or a little example for : (1) How to check the new xen commands(or xen_boot module) (2)add xen_* aliases on x86, is that like something below? But how to deal with xen_initrd ? Could you help me ? Great thanks !! > > diff --git a/grub-core/loader/i386/xen.c b/grub-core/loader/i386/xen.c index c4d9689..b88d51b 100644 --- a/grub-core/loader/i386/xen.c +++ b/grub-core/loader/i386/xen.c @@ -696,10 +696,14 @@ GRUB_MOD_INIT (xen) 0, N_("Load Linux.")); cmd_multiboot = grub_register_command ("multiboot", grub_cmd_xen, 0, N_("Load Linux.")); + cmd_multiboot = grub_register_command ("xen_hypervisor", grub_cmd_xen, + 0, N_("Load Linux.")); cmd_initrd = grub_register_command ("initrd", grub_cmd_initrd, 0, N_("Load initrd.")); cmd_module = grub_register_command ("module", grub_cmd_module, 0, N_("Load module.")); + cmd_module = grub_register_command ("xen_linux", grub_cmd_module, + 0, N_("Load module.")); my_mod = mod; }