diff mbox

[OSSTEST,01/11] netboot_memdisk: allow each host to have different append values

Message ID 20170728152637.20301-2-roger.pau@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Roger Pau Monne July 28, 2017, 3:26 p.m. UTC
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>
---
Changes since v1:
 - Allow to manually pass append parameters.
---
 Osstest/TestSupport.pm | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
diff mbox

Patch

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index b858ac82..c24146c0 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -2672,8 +2672,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", "");
+    $append = $append ? "append $append" : "";
     setup_netboot_bootcfg($ho, <<END);
 serial 0 $c{Baud}
 timeout 5
@@ -2682,12 +2685,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
 }