From patchwork Mon Feb 22 15:40:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fu Wei Fu X-Patchwork-Id: 62597 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1311872lbl; Mon, 22 Feb 2016 07:41:09 -0800 (PST) X-Received: by 10.55.78.207 with SMTP id c198mr34581882qkb.34.1456155668998; Mon, 22 Feb 2016 07:41:08 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id o9si3708027qkh.109.2016.02.22.07.41.08 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 22 Feb 2016 07:41:08 -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; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: from localhost ([::1]:49630 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXsbk-0001IF-IF for patch@linaro.org; Mon, 22 Feb 2016 10:41:08 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXsbf-0001Hg-G2 for grub-devel@gnu.org; Mon, 22 Feb 2016 10:41:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXsbZ-0004mt-It for grub-devel@gnu.org; Mon, 22 Feb 2016 10:41:03 -0500 Received: from mail-oi0-x22b.google.com ([2607:f8b0:4003:c06::22b]:32838) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXsbZ-0004mk-9G for grub-devel@gnu.org; Mon, 22 Feb 2016 10:40:57 -0500 Received: by mail-oi0-x22b.google.com with SMTP id j125so58081743oih.0 for ; Mon, 22 Feb 2016 07:40:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=8LE9qOBxVcDIQu4Im1mcxpRyqVkuxReb5u3cLrS/SFM=; b=RUt0ay3hFRQO00zNZsJ8USXGw6eiHjPVk1FDiBuiMT1C8G4wGdEY3ZCAI6KzdExuwH Awd8Xc6dah2keyv7ti0vgzp5usQL0jmBbijUI7zDRqw8D/J64JII/rEzGSHf6+QjaS8P 02Ryxxq3i7Nsdgv03cPK1QoRQZ53tvufjLydI= 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=8LE9qOBxVcDIQu4Im1mcxpRyqVkuxReb5u3cLrS/SFM=; b=dJN4vW10KG6c31TiURMg3rvmslxaRjgtIo15iufpTj/0Got4cZyoXyOXKZn04yvi5f N1JH8ecV+/+Y+Sou6L6koTd32Bn8YY0Vl2Pq24RDicMT03Cf6tof4orSkWlA36HlxSlI C58qIb+S5FnLhTPlx+z3EECjpEjbKZl9aJkDV3FxwZLgOnzmnE9/SXQHVxAE9UepRuDg wTP1idSbXEySPS+z6w0FypG7fKwhwqFPnSJLbUDxb56CtHKoAx0oLRqZaoqDfRAzF7i3 yJcATpKpdAVwP/iiWt77Up1tNiKbwF2J2UAmfpkXMOzWvIlCYx/3+mNd1n1h+TgPkELA HIdQ== X-Gm-Message-State: AG10YORDuGMY0rTJg8qUJ0yXw0moIdaRmzBwZul1nnrfVEh8bqcLxF+0GZadKztWx//0wOdPOWBDaVD2ALQ0L+vQ MIME-Version: 1.0 X-Received: by 10.202.49.138 with SMTP id x132mr22784985oix.106.1456155656737; Mon, 22 Feb 2016 07:40:56 -0800 (PST) Received: by 10.202.71.3 with HTTP; Mon, 22 Feb 2016 07:40:56 -0800 (PST) In-Reply-To: <564498C6.40002@gmail.com> References: <56448F4A.2090609@gmail.com> <1447334827.18450.73.camel@citrix.com> <564498C6.40002@gmail.com> Date: Mon, 22 Feb 2016 23:40:56 +0800 Message-ID: Subject: Re: [Xen-devel] [PATCH GRUB] Allow initrd concatenation on ARM64 From: Fu Wei To: =?UTF-8?Q?Vladimir_=27=CF=86=2Dcoder=2Fphcoder=27_Serbinenko?= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::22b Cc: The development of GRUB 2 , Julien Grall , Ian Campbell , Leif Lindholm , "xen-devel@lists.xen.org" 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, Sorry for late response, I turned to work on other tasks and haven't sent the test resulted to you. Last weekend I got a email from Julien about a xen boot problem on arm64, I just noticed that you have simplified the xen_boot.c to drop xen_linux, xen_initrd and xen_xsm. By this way, we still can boot xen on arm64 by loading modules in a specific order, and simplified the xen boot code. I guess that is also a good way to make a patch for updating boot entrance in grub.cfg. Is this still OK to update grub.cfg by this way: (1) in xen_boot.c grub_env_set ("grub_xen_boot", "y"); grub_env_export ("grub_xen_boot"); (2)in util/grub.d/20_linux_xen.in ---- Please correct me if I misunderstand something, thanks for your help, :-) and sorry for delay :-( On 12 November 2015 at 21:48, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > On 12.11.2015 14:27, Ian Campbell wrote: >> On Thu, 2015-11-12 at 14:08 +0100, Vladimir 'φ-coder/phcoder' Serbinenko >> wrote: >>> While on it also change "xen_linux" to "xen_kernel" to be vendor-neutral >>> Could someone test please? I only compile-tested it >> >> I was expecting this patch to include a change >> to ./util/grub.d/20_linux_xen.in to update the naming there, but it looks >> like that aspect of the original series isn't in tree yet? >> > We need to figure out what we should do on x86 wrt multiboot vs > multiboot2 before adapting 20_linux_xen >> BTW, you have a stray "linux" in the description of the (now) xen_kernel >> command. >> > Fixed locally, thank you >> Ian. >> >> . >> > > diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in index f532fb9..49aa709 100644 --- a/util/grub.d/20_linux_xen.in +++ b/util/grub.d/20_linux_xen.in @@ -120,16 +120,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} + ${multiboot_cmd} ${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_linux_cmd} ${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_initrd_cmd} ${rel_dirname}/${initrd} EOF fi sed "s/^/$submenu_indentation/" << EOF @@ -185,6 +185,16 @@ case "$machine" in *) GENKERNEL_ARCH="$machine" ;; esac +if [ "x$grub_xen_boot" != xy ]; then + multiboot_cmd="multiboot" + module_linux_cmd="module" + module_initrd_cmd="module --nounzip" +else + multiboot_cmd="xen_hypervisor" + module_linux_cmd="xen_module" + module_initrd_cmd="xen_module" +fi + # Extra indentation to add to menu entries in a submenu. We're not in a submenu # yet, so it's empty. In a submenu it will be equal to '\t' (one tab). submenu_indentation="" ---- (3)add xen_* aliases on x86, ---- 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_module", grub_cmd_module, + 0, N_("Load module.")); my_mod = mod; } ----