]> xenbits.xensource.com Git - people/royger/osstest.git/commitdiff
Osstest/Debian: bootloader: Understand multiboot2 syntax
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 18 May 2018 15:40:09 +0000 (16:40 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 23 May 2018 16:13:28 +0000 (17:13 +0100)
We are going to sometimes switch to the multiboot2 protocol, which has
different directives with very similar effect.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Osstest/Debian.pm

index 97d451fc106cf5cda8fc52b1a1feac467d55fa39..0185761003bfe69e6c4b5ddf2077615d2a42d524 100644 (file)
@@ -512,27 +512,27 @@ sub setupboot_grub2 ($$$$) {
                 $entry->{Hv}= $1;
                 $entry->{Chainload} = 1;
             }
-            if (m/^\s*multiboot\s*(?:\/boot)?\/(xen\-[0-9][-+.0-9a-z]*\S+)/) {
+            if (m/^\s*multiboot2?\s*(?:\/boot)?\/(xen\-[0-9][-+.0-9a-z]*\S+)/) {
                 die unless $entry;
                 $entry->{Hv}= $1;
                 $entry->{Chainload} = 0;
             }
-            if (m/^\s*multiboot\s*(?:\/boot)?\/(vmlinu[xz]-(\S+))\s+(.*)/) {
+            if (m/^\s*multiboot2?\s*(?:\/boot)?\/(vmlinu[xz]-(\S+))\s+(.*)/) {
                 die unless $entry;
                 $entry->{KernOnly}= $1;
                 $entry->{KernVer}= $2;
                 $entry->{KernOpts}= $3;
             }
-            if (m/^\s*module\s*(?:\/boot)?\/(vmlinu[xz]-(\S+))\s+(.*)/) {
+            if (m/^\s*module2?\s*(?:\/boot)?\/(vmlinu[xz]-(\S+))\s+(.*)/) {
                 die unless $entry;
                 $entry->{KernDom0}= $1;
                 $entry->{KernVer}= $2;
                 $entry->{KernOpts}= $3;
             }
-            if (m/^\s*module\s*(?:\/boot)?\/(initrd\S+)/) {
+            if (m/^\s*module2?\s*(?:\/boot)?\/(initrd\S+)/) {
                 $entry->{Initrd}= $1;
             }
-           if (m/^\s*module\s*\/(xenpolicy\S+)/) {
+           if (m/^\s*module2\s*\/(xenpolicy\S+)/) {
                 $entry->{Xenpolicy}= $1;
             }
         }