]> xenbits.xensource.com Git - people/dariof/osstest.git/commitdiff
Debian: create boot.scr.nat when installing Xen on u-boot.
authorIan Campbell <ian.campbell@citrix.com>
Thu, 22 Jan 2015 11:05:07 +0000 (11:05 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 26 Jan 2015 11:01:25 +0000 (11:01 +0000)
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@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Osstest/Debian.pm

index d703e009deb471268be764bc7159e078b08d423a..3c4ac5ea7aa935ddb8a53b3aafffc0727792da63 100644 (file)
@@ -149,16 +149,28 @@ sub setupboot_uboot ($$$) {
        my $kern = "vmlinuz-$want_kernver";
        my $initrd = "initrd.img-$want_kernver";
 
-       my @xenkopt = uboot_common_kernel_bootargs($ho);
+       logm("Xen options: $xenhopt");
+
+       # Common kernel options
+       my @kopt = uboot_common_kernel_bootargs($ho);
+
+       # Dom0 specific kernel options
+       my @xenkopt = @kopt;
        push @xenkopt, $xenkopt;
        # http://bugs.xenproject.org/xen/bug/45
        push @xenkopt, "clk_ignore_unused"
            if $ho->{Suite} =~ m/wheezy|jessie/;
 
        $xenkopt = join ' ', @xenkopt;
+       logm("Dom0 Linux options: $xenkopt");
 
-       logm("Xen options: $xenhopt");
-       logm("Linux options: $xenkopt");
+       # Native specific kernel options
+       my $natcons = get_host_native_linux_console($ho);
+       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);
@@ -216,6 +228,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
     };