From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: [PATCH 02/27] Osstest/Debian.pm: fix identifying a Linux baremetal grub2 entry Date: Wed, 10 Dec 2014 19:09:10 +0100 Message-ID: <20141210180910.26400.81758.stgit@Abyss.station> References: <20141210180651.26400.13356.stgit@Abyss.station> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20141210180651.26400.13356.stgit@Abyss.station> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Ian Jackson , Wei Liu , Ian Campbell List-Id: xen-devel@lists.xenproject.org From: Dario Faggioli In fact, in setupboot_grub2(), if we are interested in a Linux baremetal entry, there is no point in asking for the entry to contain an hypervisor line ("Hv"). Also, in such entry, Linux kernel and initrd are to be found in "linux" and "initrd" lines, rather than in "multiboot" and "module" ones. I haven't actually checked whether also grub1 and/or uboot needs fixing. Signed-off-by: Dario Faggioli Cc: Wei Liu Cc: Ian Campbell Cc: Ian Jackson --- Osstest/Debian.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index c8db601..70afaec 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -293,8 +293,8 @@ sub setupboot_grub2 ($$$) { my (@missing) = grep { !defined $entry->{$_} } (defined $xenhopt - ? qw(Title Hv KernDom0 KernVer) - : qw(Title Hv KernOnly KernVer)); + ? qw(Title Hv KernDom0 KernVer) + : qw(Title KernOnly KernVer)); if (@missing) { logm("(skipping entry at $entry->{StartLine};". " no @missing)"); @@ -321,11 +321,14 @@ sub setupboot_grub2 ($$$) { die unless $entry; $entry->{Hv}= $1; } - if (m/^\s*multiboot\s*\/(vmlinu[xz]-(\S+))/) { + if (m/^\s*linux\s*\/(vmlinu[xz]-(\S+))/) { die unless $entry; $entry->{KernOnly}= $1; $entry->{KernVer}= $2; } + if (m/^\s*initrd\s*\/(initrd\S+)/) { + $entry->{Initrd}= $1; + } if (m/^\s*module\s*\/(vmlinu[xz]-(\S+))/) { die unless $entry; $entry->{KernDom0}= $1;