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

[Xen-devel] [PATCH OSSTEST v4 13/13] Debian: create boot.scr.nat when installing Xen on u-boot.



This boots the kernel we've build natively, where boot.xen boots Xen
and boot.deb boots the original Debian kernel.

Sometimes convenient when debugging issues.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
v4: New patch
---
 Osstest/Debian.pm | 40 ++++++++++++++++++++++++++++++++++------
 1 file changed, 34 insertions(+), 6 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 8169c01..20485e2 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -136,18 +136,32 @@ sub setupboot_uboot ($$$) {
 
        my $root= target_guest_lv_name($ho,"root");
        my $rootdelay=get_host_property($ho, "rootdelay");
+       my $natcons=get_host_native_linux_console($ho);
 
-       my @xenkopt;
+       logm("Xen options: $xenhopt");
+
+       # Common kernel options
+       my @kopt;
+
+       push @kopt, "ro";
+       push @kopt, "root=$root";
+       push @kopt, "rootdelay=$rootdelay" if $rootdelay;
+
+       # Dom0 specific kernel options
+       my @xenkopt = @kopt;
        push @xenkopt, $xenkopt;
-       push @xenkopt, "ro";
-       push @xenkopt, "root=$root";
        push @xenkopt, "clk_ignore_unused"; # 
http://bugs.xenproject.org/xen/bug/45
-       push @xenkopt, "rootdelay=$rootdelay" if $rootdelay;
 
        $xenkopt = join ' ', @xenkopt;
+       logm("Dom0 Linux options: $xenkopt");
 
-       logm("Xen options: $xenhopt");
-       logm("Linux options: $xenkopt");
+       # Native specific kernel options
+
+       my @natkopt = @kopt;
+       push @natkopt, "console=$natcons" unless $natcons eq "NONE";
+
+       my $natkopt = join ' ', @natkopt;
+       logm("Native linux options: $natkopt");
 
        my $early_commands = get_host_property($ho, 'UBootScriptEarlyCommands', 
'');
        my $xen_addr_r = get_host_property($ho, 'UBootSetXenAddrR', undef);
@@ -205,6 +219,20 @@ 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
+
+# Create boot.scr.nat for convenience too
+cat >/boot/boot.nat <<EOF
+setenv bootargs $natkopt
+${load_dtb}
+echo Loading $kern
+ext2load scsi 0 \\\${kernel_addr_r} $kern
+echo Loading $initrd
+ext2load scsi 0 \\\${ramdisk_addr_r} $initrd
+echo Booting
+bootz \\\${kernel_addr_r} \\\${ramdisk_addr_r}:\\\${filesize} \\\${fdt_addr}
+EOF
+mkimage -A arm -T script -d /boot/boot.nat /boot/boot.scr.nat
+
 END
     };
 
-- 
2.1.4


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


 


Rackspace

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