diff mbox

[Xen-devel,RFC,OSSTEST,12/19] Osstest/Debian: Refactor code to set bootargs in u-boot script

Message ID 1412942554-752-12-git-send-email-ian.campbell@citrix.com
State New
Headers show

Commit Message

Ian Campbell Oct. 10, 2014, 12:02 p.m. UTC
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 Osstest/Debian.pm | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Comments

Ian Jackson Oct. 10, 2014, 2:31 p.m. UTC | #1
Ian Campbell writes ("[PATCH RFC OSSTEST 12/19] Osstest/Debian: Refactor code to set bootargs in u-boot script"):
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
diff mbox

Patch

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 8f80eb4..3ffbc50 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -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