From patchwork Mon Feb 22 15:40:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: fu.wei@linaro.org X-Patchwork-Id: 8379111 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BC82B9F1D4 for ; Mon, 22 Feb 2016 15:44:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C50CE20501 for ; Mon, 22 Feb 2016 15:44:03 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9E75720513 for ; Mon, 22 Feb 2016 15:44:02 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aXsbd-0004Bm-HH; Mon, 22 Feb 2016 15:41:01 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aXsbb-0004Bh-ER for xen-devel@lists.xen.org; Mon, 22 Feb 2016 15:40:59 +0000 Received: from [85.158.139.211] by server-14.bemta-5.messagelabs.com id 8E/F1-02992-A0C2BC65; Mon, 22 Feb 2016 15:40:58 +0000 X-Env-Sender: fu.wei@linaro.org X-Msg-Ref: server-11.tower-206.messagelabs.com!1456155657!11843040!1 X-Originating-IP: [209.85.218.44] X-SpamReason: No, hits=0.3 required=7.0 tests=RCVD_BY_IP X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 30969 invoked from network); 22 Feb 2016 15:40:57 -0000 Received: from mail-oi0-f44.google.com (HELO mail-oi0-f44.google.com) (209.85.218.44) by server-11.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 22 Feb 2016 15:40:57 -0000 Received: by mail-oi0-f44.google.com with SMTP id x21so57332671oix.2 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=Sy/ZaQ6L6SWm7DXncyQpXngl9rKljT3dQEkwj+sdyGkaVSndceKM3YRlnmaOFBlxyF KqKaQGfTxyTLnk8ZAQylFBKFX4qf3veTKVsVRFZJX0CCp/cmuQaCBolpoTyBIaAlHJsn VFKaDazhU5mDaEAOm2ocZrHWm0qjipfTbdboANeuIwe0Cl1UT6iaAvhzIryIWAl3zBGD ZLMQlOPjCEZMRQZHj/WJsDlyjJ1LL7PWDCzMkkqB3mepsBPgXHi/5u49prk0QA7XYaBn MpbJWZTRorkjTJDWTVdpLlYVGkpiKbzJ8fIVYAUUfsKPrQnPpqjKtnLtB3+WhJpCi6wP fPlw== X-Gm-Message-State: AG10YORZMj9fBo41aVmdigGoG5F4G33KzhGViltikXYY4fOzS4xNU+Rxk0nVMkusXjb9Cnhb2efFlwxT1JPxar8Z 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: From: Fu Wei To: =?UTF-8?Q?Vladimir_=27=CF=86=2Dcoder=2Fphcoder=27_Serbinenko?= Cc: The development of GRUB 2 , Julien Grall , Ian Campbell , Leif Lindholm , "xen-devel@lists.xen.org" Subject: Re: [Xen-devel] [PATCH GRUB] Allow initrd concatenation on ARM64 X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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; } ----