xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>,
	xen-devel@lists.xensource.com,
	Ian Campbell <Ian.Campbell@citrix.com>,
	Andrei Borzenkov <arvidjaar@gmail.com>,
	Vladimir Serbinenko <phcoder@gmail.com>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	Ryan Harkin <ryan.harkin@linaro.org>,
	Linaro UEFI Mailman List <linaro-uefi@lists.linaro.org>,
	Jon Masters <jcm@redhat.com>, Fu Wei <fu.wei@linaro.org>
Subject: Re: [PATCH v3 0/4] arm64: Add Xen boot support (via fdt)
Date: Thu, 1 Oct 2015 17:19:21 +0100	[thread overview]
Message-ID: <alpine.DEB.2.02.1510011714390.14155@kaball.uk.xensource.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1509301522450.14155@kaball.uk.xensource.com>

On Wed, 30 Sep 2015, Stefano Stabellini wrote:
> Hi Fu,
> 
> I backported your patches to the CentOS aarch64 grub2 rpm.  I am testing
> it on X-Gene with EFI firmware. It works fine when booting Xen, but
> booting native kernels (no Xen) doesn't work anymore. Grub prints
> 
> error: out of memory.
> 
> Press any key to continue...
> 
> grub is still able to continue and load Linux, but then the kernel fails
> to boot with "Cannot open root device", even though the grub config is
> still same as before and the rootfs (which is xfs) hasn't changed.
> Reverting the patches solved the problem.
> 
> Do you have any ideas on what is causing the issue? Maybe the initramfs
> hasn't been properly loaded?

It looks like the following chunk of commit
f8451af8251a3866cb8b7307b9917dd5d34fbd0a "arm64: Export useful functions
from linux.c" causes troubles:


diff --git a/grub-core/loader/linux.c b/grub-core/loader/linux.c
index 117232f..a63a11a 100644
--- a/grub-core/loader/linux.c
+++ b/grub-core/loader/linux.c
@@ -205,7 +205,8 @@ grub_initrd_init (int argc, char *argv[],
       initrd_ctx->nfiles++;
       initrd_ctx->components[i].size
        = grub_file_size (initrd_ctx->components[i].file);
-      initrd_ctx->size += ALIGN_UP (initrd_ctx->components[i].size, 4);
+      if (argc != 1)
+       initrd_ctx->size += ALIGN_UP (initrd_ctx->components[i].size, 4);
     }
 
   if (newc)


Simply removing this change seems to fix the issue and Xen still boots
fine.

  reply	other threads:[~2015-10-01 16:19 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <=fu.wei@linaro.org>
2015-07-13  8:53 ` [PATCH v2 0/3] arm64: Add multiboot support (via fdt) for Xen boot fu.wei
2015-07-13  8:53   ` [PATCH v2 1/3] arm64: Add Xen boot support file fu.wei
2015-07-15 16:18     ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-07-16 16:46       ` Ian Campbell
2015-07-23 10:16       ` Fu Wei
2015-07-13  8:53   ` [PATCH v2 2/3] util/grub.d/20_linux_xen.in: Add arm64 support fu.wei
2015-07-14  3:53     ` Andrei Borzenkov
2015-07-14  9:41       ` Ian Campbell
2015-07-14 15:23         ` [Xen-devel] " Konrad Rzeszutek Wilk
2015-07-14 13:09       ` Fu Wei
2015-07-15 16:24         ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-07-13  8:54   ` [PATCH v2 3/3] arm64: Add the introduction of Xen boot command fu.wei
2015-07-14  9:29   ` [Xen-devel] [PATCH v2 0/3] arm64: Add multiboot support (via fdt) for Xen boot Ian Campbell
2015-07-14 11:56     ` Fu Wei
2015-07-15 15:56   ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-07-23  5:16 ` [PATCH v3 0/4] arm64: Add Xen boot support (via fdt) fu.wei
2015-07-23  5:16   ` [PATCH v3 1/4] arm64: Add and export some accessor functions for xen boot fu.wei
2015-10-29 12:03     ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-10-30  7:11       ` Fu Wei
2015-07-23  5:16   ` [PATCH v3 2/4] arm64: Add xen_boot module file fu.wei
2015-10-29 14:27     ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-10-30  8:08       ` Fu Wei
2015-11-03 14:57         ` Fu Wei
2015-11-03 15:22           ` Ian Campbell
2015-11-05  9:46             ` Fu Wei
2015-07-23  5:16   ` [PATCH v3 3/4] * util/grub.d/20_linux_xen.in: Add support of the XEN boot on aarch64 fu.wei
2015-10-29 15:25     ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-10-29 19:53       ` Andrei Borzenkov
2015-10-30  8:44       ` Fu Wei
2015-10-30  9:50         ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-10-30 10:07           ` Andrei Borzenkov
2015-07-23  5:16   ` [PATCH v3 4/4] arm64: Add the introduction of xen boot commands in docs/grub.texi fu.wei
2015-08-04  8:34   ` [PATCH v3 0/4] arm64: Add Xen boot support (via fdt) Fu Wei
2015-09-08  3:38     ` Fu Wei
2015-09-30 16:00       ` Stefano Stabellini
2015-10-01 16:19         ` Stefano Stabellini [this message]
2015-10-29  2:43           ` Fu Wei
2015-10-29  6:06         ` Fu Wei
2015-10-29 11:00           ` Stefano Stabellini
2016-02-25  6:50 ` [PATCH v2 0/4] arm64,xen: add xen_boot support into grup-mkconfig fu.wei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.02.1510011714390.14155@kaball.uk.xensource.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=arvidjaar@gmail.com \
    --cc=fu.wei@linaro.org \
    --cc=grub-devel@gnu.org \
    --cc=jcm@redhat.com \
    --cc=leif.lindholm@linaro.org \
    --cc=linaro-uefi@lists.linaro.org \
    --cc=phcoder@gmail.com \
    --cc=ryan.harkin@linaro.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).