]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
netboot_memdisk: allow each host to have different append values
authorRoger Pau Monne <roger.pau@citrix.com>
Mon, 23 Oct 2017 11:41:16 +0000 (12:41 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 24 Oct 2017 11:04:31 +0000 (12:04 +0100)
Some hosts require "append raw" [0] when booting with memdisk, while
others don't. This is based on the hardware/BIOS, and needs to be set
on a per-host basis.

In order to do this, add a new "MemdiskAppend" host property and make
use of it in the setup_netboot_memdisk helper.

[0] http://www.syslinux.org/wiki/index.php?title=MEMDISK#Memory_access_method

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v1:
 - Explicitly use NONE for no options set (instead of an empty string,
   which is the default).
 - Allow to manually pass append parameters.

Osstest/TestSupport.pm

index 4ca19d41c2b517f7531e53f52198b20ab0981d29..9d67c530382f38220c40c2fdaeab755b50d81469 100644 (file)
@@ -2588,8 +2588,11 @@ default local
 END
 }
 
-sub setup_netboot_memdisk ($$) {
-    my ($ho, $img) = @_;
+sub setup_netboot_memdisk ($$;$) {
+    my ($ho, $img, $append) = @_;
+
+    $append //= get_host_property($ho, "MemdiskAppend", "NONE");
+    $append = $append eq "NONE" ? "" : "append $append";
     setup_netboot_bootcfg($ho, <<END);
 serial 0 $c{Baud}
 timeout 5
@@ -2598,12 +2601,7 @@ label overwrite
         menu default
         kernel memdisk
         initrd $img
-        # NB: according to the memdisk syslinux wikipage [0]
-        # adding "append raw" is required in order to boot on
-        # some boxes, and in fact some hardware will not boot
-        # without it.
-        # [0] http://www.syslinux.org/wiki/index.php?title=MEMDISK#Memory_access_method
-        append raw
+        $append
 default overwrite
 END
 }