]> xenbits.xensource.com Git - people/dariof/osstest.git/commitdiff
Osstest/Debian: Refactor code to set bootargs in u-boot script
authorIan Campbell <ian.campbell@citrix.com>
Fri, 21 Nov 2014 13:16:55 +0000 (13:16 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 10 Dec 2014 14:03:08 +0000 (14:03 +0000)
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Osstest/Debian.pm

index c8db601e4b7ddb4aab8db2ae54f463aba4a1aef0..33a4ca4b9e4380b095e39369499e6fcc43b43728 100644 (file)
@@ -660,9 +660,15 @@ END
     }
 
     if ( $ho->{Flags}{'need-uboot-bootscr'} ) {
+       my @bootargs;
+
        my $root=target_guest_lv_name($ho,"root");
-       my $console = get_host_native_linux_console($ho);
-       my $consolecmd = "console=$console" unless $console eq "NONE";
+       my $console=get_host_native_linux_console($ho);
+
+       push @bootargs, "root=$root";
+       push @bootargs, "console=$console" unless $console eq "NONE";
+
+       my $bootargs = join ' ', @bootargs;
 
        preseed_hook_command($ho, 'late_command', $sfx, <<END);
 #!/bin/sh
@@ -674,7 +680,7 @@ kernel=`readlink \$r/vmlinuz | sed -e 's|boot/||'`
 initrd=`readlink \$r/initrd.img | sed -e 's|boot/||'`
 
 cat >\$r/boot/boot <<EOF
-setenv bootargs $consolecmd root=$root
+setenv bootargs $bootargs
 mw.l 800000 0 10000
 scsi scan
 ext2load scsi 0 \\\${kernel_addr_r} \$kernel