[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 12/24] Debian.pm: Break out setupboot_bootloader_edited_rune



The host examination scripts are going to want this.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 Osstest/Debian.pm | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 4155056..8ba48bf 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -34,6 +34,7 @@ BEGIN {
     $VERSION     = 1.00;
     @ISA         = qw(Exporter);
     @EXPORT      = qw(debian_boot_setup
+                      setupboot_bootloader_edited_rune
                       debian_overlays
                       debian_guest_suite debian_guest_di_version
                       %preseed_cmds
@@ -165,6 +166,19 @@ fi
 END
 }
 
+sub setupboot_bootloader_edited_rune ($) {
+    my ($ho) = @_;
+    # returns script to run after actual bootloader file is edited
+    if ($ho->{Flags}{'need-uboot-bootscr'}) {
+       return <<END;
+mkimage -A arm -T script -d /boot/boot.xen /boot/boot.scr.xen
+cp /boot/boot.scr.xen /boot/boot.scr
+END
+    } else {
+       return '';
+    }
+}
+
 sub setupboot_uboot ($$$$) {
     my ($ho,$want_kernver,$want_xsm,$xenhopt,$xenkopt) = @_;
     my $bl= { };
@@ -247,6 +261,8 @@ END
        my $set_xen_addr_r =
            $xen_addr_r ? "setenv xen_addr_r $xen_addr_r" : "";
 
+       my $edited_rune = setupboot_bootloader_edited_rune($ho);
+
        target_cmd_root($ho, <<END);
 if test ! -f /boot/$kern ; then
     exit 1
@@ -297,8 +313,7 @@ fdt print /chosen
 echo Booting \\\${xen_addr_r} - \\\${fdt_addr}
 bootz \\\${xen_addr_r} - \\\${fdt_addr}
 EOF
-mkimage -A arm -T script -d /boot/boot.xen /boot/boot.scr.xen
-cp /boot/boot.scr.xen /boot/boot.scr
+$edited_rune
 
 # Create boot.scr.nat for convenience too
 cat >/boot/boot.nat <<EOF
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.