From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com
Cc: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xen.org
Subject: [PATCH OSSTEST v2 05/20] ts-host-install: Refactor code to construct a Linux console= for a host
Date: Wed, 29 Oct 2014 10:41:27 +0000 [thread overview]
Message-ID: <1414579302-6692-5-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1414579268.29975.13.camel@citrix.com>
And reuse it in when writing the u-boot script for initial boot. This was
previously hardcoded to ttyAMA which matches the production host DB for the
current set of hosts which use this script.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Osstest/Debian.pm | 4 +++-
Osstest/TestSupport.pm | 10 ++++++++++
ts-host-install | 6 +++---
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index ab09abb..29dec3b 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -660,6 +660,8 @@ END
if ( $ho->{Flags}{'need-uboot-bootscr'} ) {
my $root=target_guest_lv_name($ho,"root");
+ my $console = get_host_native_linux_console($ho);
+ my $consolecmd = "console=$console" unless $console eq "NONE";
preseed_hook_command($ho, 'late_command', $sfx, <<END);
#!/bin/sh
@@ -671,7 +673,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 console=ttyAMA0 root=$root
+setenv bootargs $consolecmd root=$root
mw.l 800000 0 10000
scsi scan
ext2load scsi 0 \\\${kernel_addr_r} \$kernel
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 1d77933..d66708e 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -65,6 +65,7 @@ BEGIN {
contents_make_cpio file_simple_write_contents
selecthost get_hostflags get_host_property
+ get_host_native_linux_console
power_state power_cycle power_cycle_time
serial_fetch_logs
propname_massage
@@ -863,6 +864,15 @@ sub get_host_property ($$;$) {
return defined($val) ? $val : $defval;
}
+sub get_host_native_linux_console ($) {
+ my ($ho) = @_;
+
+ my $console = get_host_property($ho, "LinuxSerialConsole", "ttyS0");
+ return $console if $console eq 'NONE';
+
+ return "$console,$c{Baud}n8";
+}
+
sub get_host_method_object ($$$) {
my ($ho, $kind, $meth) = @_;
my (@meth) = split /\s+/, $meth;
diff --git a/ts-host-install b/ts-host-install
index 90058e3..881c2fd 100755
--- a/ts-host-install
+++ b/ts-host-install
@@ -210,9 +210,9 @@ END
push @installcmdline, qw(--);
- my $console = get_host_property($ho, "LinuxSerialConsole", "ttyS0");
- push @installcmdline, "console=$console,$c{Baud}n8"
- unless $console eq "NONE";
+ my $console = get_host_native_linux_console($ho);
+
+ push @installcmdline, "console=$console" unless $console eq "NONE";
my $installcmdline= join ' ', @installcmdline;
--
2.1.1
next prev parent reply other threads:[~2014-10-29 10:41 UTC|newest]
Thread overview: 168+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-29 10:41 [PATCH OSSTEST v2 00/20] support for ARM32 arndale and cubietruck platforms Ian Campbell
2014-10-29 10:41 ` [PATCH OSSTEST v2 01/20] standalone: Provide a helper to clear the host runvar Ian Campbell
2014-10-29 10:41 ` [PATCH OSSTEST v2 02/20] mg-debian-installer-update: Include any device tree blobs in the tftp dir Ian Campbell
2014-10-29 10:41 ` [PATCH OSSTEST v2 03/20] mg-debian-installer-update: Add more modules when creating initrd overlay Ian Campbell
2014-10-29 10:41 ` [PATCH OSSTEST v2 04/20] ts-host-install: Add fdtdir to PXE stanza if dtbs directory exists Ian Campbell
2014-10-29 10:41 ` Ian Campbell [this message]
2014-10-29 10:41 ` [PATCH OSSTEST v2 06/20] ts-host-install: include console before *and* after the -- marker Ian Campbell
2014-10-29 10:41 ` [PATCH OSSTEST v2 07/20] ts-host-install: Add option to boot debian-installer in rescue mode Ian Campbell
2014-10-29 10:41 ` [PATCH OSSTEST v2 08/20] ts-host-install: Add force-mac-address host flag Ian Campbell
2014-10-29 10:41 ` [PATCH OSSTEST v2 09/20] make-flight: Run a basic test on each arm platform Ian Campbell
2014-10-29 16:17 ` Ian Jackson
2014-10-29 10:41 ` [PATCH OSSTEST v2 10/20] standalone: Introduce "HostGroups" for use in OSSTEST_CONFIG Ian Campbell
2014-10-29 16:22 ` Ian Jackson
2014-10-29 16:34 ` Ian Campbell
2014-10-29 10:41 ` [PATCH OSSTEST v2 11/20] Osstest/PDU: Add eth008.pm method to control the ARM rack PDU Ian Campbell
2014-10-29 16:27 ` Ian Jackson
2014-10-29 16:39 ` Ian Campbell
2014-10-29 10:41 ` [PATCH OSSTEST v2 12/20] Osstest/Debian: Refactor code to set bootargs in u-boot script Ian Campbell
2014-10-29 10:41 ` [PATCH OSSTEST v2 13/20] Osstest/Debian: Install dtbs into target filesystem in /boot/dtbs Ian Campbell
2014-10-29 16:30 ` Ian Jackson
2014-10-29 10:41 ` [PATCH OSSTEST v2 14/20] Osstest/Debian: Support for loading an FDT from u-boot script Ian Campbell
2014-10-29 16:33 ` Ian Jackson
2014-10-29 10:41 ` [PATCH OSSTEST v2 15/20] Osstest/Debian: Add support for "ExtraInitramfsModules" host property Ian Campbell
2014-10-29 16:34 ` Ian Jackson
2014-10-29 10:41 ` [PATCH OSSTEST v2 16/20] Osstest/Debian: support adding a rootdelay property to bootargs Ian Campbell
2014-10-29 10:41 ` [PATCH OSSTEST v2 17/20] Osstest/Debian: Remove hardcoded midway specific addresses from boot.scr Ian Campbell
2014-10-10 12:00 ` [PATCH OSSTEST RFC 00/19] support for ARM32 arndale and cubietruck platforms Ian Campbell
2014-10-10 12:02 ` [PATCH RFC OSSTEST 01/19] standalone: Provide a helper to clear the host runvar Ian Campbell
2014-10-10 13:51 ` Ian Jackson
2014-10-10 13:53 ` Ian Campbell
2014-10-10 12:02 ` [PATCH RFC OSSTEST 02/19] Osstest/PDU: Add eth008.pm method to control the ARM rack PDU Ian Campbell
2014-10-10 13:56 ` Ian Jackson
2014-10-10 14:05 ` Ian Campbell
2014-10-10 12:02 ` [PATCH RFC OSSTEST 03/19] mg-debian-installer-update: Include any device tree blobs in the tftp dir Ian Campbell
2014-10-10 13:57 ` Ian Jackson
2014-10-10 12:02 ` [PATCH RFC OSSTEST 04/19] mg-debian-installer-update: Add more modules when creating initrd overlay Ian Campbell
2014-10-10 13:58 ` Ian Jackson
2014-10-10 14:08 ` Ian Campbell
2014-10-10 12:02 ` [PATCH RFC OSSTEST 05/19] ts-host-install: Add fdtdir to PXE stanza if dtbs directory exists Ian Campbell
2014-10-10 14:01 ` Ian Jackson
2014-10-10 14:08 ` Ian Campbell
2014-10-10 12:02 ` [PATCH RFC OSSTEST 06/19] ts-host-install: Refactor code to construct a Linux console= for a host Ian Campbell
2014-10-10 14:02 ` Ian Jackson
2014-10-10 12:02 ` [PATCH RFC OSSTEST 07/19] ts-host-install: include console before *and* after the -- marker Ian Campbell
2014-10-10 14:05 ` Ian Jackson
2014-10-10 12:02 ` [PATCH RFC OSSTEST 08/19] ts-host-install: Add option to boot debian-installer in rescue mode Ian Campbell
2014-10-10 14:06 ` Ian Jackson
2014-10-10 12:02 ` [PATCH RFC OSSTEST 09/19] ts-host-install: Add force-mac-address host flag Ian Campbell
2014-10-10 14:09 ` Ian Jackson
2014-10-10 14:12 ` Ian Campbell
2014-10-10 14:55 ` Ian Jackson
2014-10-10 12:02 ` [PATCH RFC OSSTEST 10/19] make-flight: Run a basic test on each arm platform Ian Campbell
2014-10-10 14:20 ` Ian Jackson
2014-10-10 14:27 ` Ian Campbell
2014-10-10 15:03 ` Ian Jackson
2014-10-27 13:20 ` Ian Campbell
2014-10-10 12:02 ` [PATCH RFC OSSTEST 11/19] standalone: Introduce "HostGroups" for use in OSSTEST_CONFIG Ian Campbell
2014-10-10 14:44 ` Ian Jackson
2014-10-10 14:48 ` Ian Campbell
2014-10-10 15:09 ` Ian Jackson
2014-10-10 12:02 ` [PATCH RFC OSSTEST 12/19] Osstest/Debian: Refactor code to set bootargs in u-boot script Ian Campbell
2014-10-10 14:31 ` Ian Jackson
2014-10-10 12:02 ` [PATCH RFC OSSTEST 13/19] Osstest/Debian: Install dtbs into target filesystem in /boot/dtbs Ian Campbell
2014-10-10 14:45 ` Ian Jackson
2014-10-10 14:49 ` Ian Campbell
2014-10-10 15:10 ` Ian Jackson
2014-10-10 15:14 ` Ian Campbell
2014-10-10 16:03 ` Ian Jackson
2014-10-10 12:02 ` [PATCH RFC OSSTEST 14/19] Osstest/Debian: Support for loading an FDT from u-boot script Ian Campbell
2014-10-10 14:29 ` Ian Jackson
2014-10-10 14:37 ` Ian Campbell
2014-10-10 15:05 ` Ian Jackson
2014-10-10 12:02 ` [PATCH RFC OSSTEST 15/19] Osstest/Debian: Add support for "ExtraInitramfsModules" host property Ian Campbell
2014-10-10 14:47 ` Ian Jackson
2014-10-10 14:50 ` Ian Campbell
2014-10-10 12:02 ` [PATCH RFC OSSTEST 16/19] Osstest/Debian: support adding a rootdelay property to bootargs Ian Campbell
2014-10-10 14:49 ` Ian Jackson
2014-10-10 12:02 ` [PATCH RFC OSSTEST 17/19] Osstest/Debian: Remove hardcoded midway specific addresses from boot.scr Ian Campbell
2014-10-10 14:30 ` Ian Jackson
2014-10-10 14:32 ` Ian Campbell
2014-10-29 16:37 ` [PATCH RFC OSSTEST 17/19] Osstest/Debian: Remove hardcoded midway specific addresses from boot.scr [and 1 more messages] Ian Jackson
2014-10-29 16:41 ` Ian Campbell
2014-10-10 12:02 ` [PATCH RFC OSSTEST 18/19] ts-kernel-build: Enable CONFIG_PHY_EXYNOS5250_SATA Ian Campbell
2014-10-10 14:31 ` Ian Jackson
2014-10-10 12:02 ` [PATCH RFC OSSTEST 19/19] Osstest/Debian: Workaround oddities in the u-boot script parser Ian Campbell
2014-10-10 14:48 ` Ian Jackson
2014-10-29 10:41 ` [PATCH OSSTEST v2 18/20] Osstest/Debian: Add "clk_ignore_unused" to default command line Ian Campbell
2014-10-29 16:39 ` Ian Jackson
2014-10-30 12:33 ` Ian Campbell
2014-10-30 12:45 ` Processed: " xen
2014-10-30 13:46 ` Ian Jackson
2014-11-11 16:50 ` Julien Grall
2014-11-12 10:07 ` Ian Campbell
2014-11-12 14:26 ` Julien Grall
2018-03-07 14:50 ` [OSSTEST PATCH v2 15/19] Add clk_ignore_unused for stretch for arm hosts Ian Jackson
2014-10-29 10:41 ` [PATCH OSSTEST v2 19/20] Osstest/Debian: Add 0x prefix to $filesize Ian Campbell
2014-10-29 16:40 ` Ian Jackson
2014-10-30 14:01 ` Ian Campbell
2014-10-30 14:22 ` Ian Campbell
2014-10-30 14:49 ` Ian Jackson
2014-10-30 14:51 ` Ian Campbell
2014-10-30 14:54 ` Ian Jackson
2014-10-30 15:03 ` Ian Campbell
2014-10-29 10:41 ` [PATCH OSSTEST v2 20/20] ts-kernel-build: Enable CONFIG_PHY_EXYNOS5250_SATA Ian Campbell
2014-10-29 16:51 ` [PATCH OSSTEST v2 00/20] support for ARM32 arndale and cubietruck platforms Ian Campbell
2014-10-29 17:13 ` Ian Jackson
2014-10-29 17:15 ` Ian Campbell
2014-10-30 11:30 ` Ian Jackson
2014-10-30 11:43 ` Ian Campbell
2014-10-30 12:07 ` Ian Jackson
2014-11-03 10:23 ` Ian Campbell
-- strict thread matches above, loose matches on Subject: below --
2017-10-31 13:51 [OSSTEST PATCH v2 00/19] Upgrade to Stretch Wei Liu
2017-10-31 13:51 ` [OSSTEST PATCH v2 01/19] gitignore: ignore vim swap file Wei Liu
2017-10-31 13:51 ` [OSSTEST PATCH v2 02/19] ts-xen-build-prep: only install w3c-dtd-xhtml for suites <Stretch Wei Liu
2018-03-07 14:34 ` Ian Jackson
2017-10-31 13:51 ` [OSSTEST PATCH v2 03/19] ts-xen-build-prep: install packages for suites >jessie Wei Liu
2017-10-31 13:51 ` [OSSTEST PATCH v2 04/19] ts-xen-install: install some packages on stretch Wei Liu
2018-03-07 14:36 ` Ian Jackson
2017-10-31 13:51 ` [OSSTEST PATCH v2 05/19] Debian.pm: use sysvinit-core instead of systemd Wei Liu
2018-03-07 14:57 ` Ian Jackson
2017-10-31 13:51 ` [OSSTEST PATCH v2 06/19] ts-leak-check: suppress systemd-shim, which leaks in stretch Wei Liu
2017-10-31 13:51 ` [OSSTEST PATCH v2 07/19] ts-host-install: don't use the new nic naming scheme Wei Liu
[not found] ` <bca1c4ed-c061-3510-e80d-69802a8ac806@linaro.org>
2017-12-15 15:45 ` Julien Grall
2018-01-19 14:21 ` Wei Liu
2018-01-19 17:08 ` Ian Jackson
2018-01-19 17:12 ` Wei Liu
2018-01-19 17:56 ` Ian Jackson
2018-01-19 17:58 ` Wei Liu
2018-01-19 18:39 ` Ian Jackson
2018-03-07 15:43 ` Ian Jackson
2017-10-31 13:51 ` [OSSTEST PATCH v2 08/19] ts-guests-nbd-mirror: use target_{get, put}file_root to transfter cfg Wei Liu
2018-03-07 15:04 ` Ian Jackson
2018-05-08 8:14 ` Wei Liu
2017-10-31 13:51 ` [OSSTEST PATCH v2 09/19] ts-debian-fixup: merge origin extra= to our own Wei Liu
2018-03-07 15:06 ` Ian Jackson
2018-03-15 17:00 ` Wei Liu
2017-10-31 13:51 ` [OSSTEST PATCH v2 10/19] ts-debian-fixup: use correct resume device Wei Liu
2018-03-07 15:08 ` Ian Jackson
2017-10-31 13:51 ` [OSSTEST PATCH v2 11/19] ts-debian-hvm-install: disable new nic naming scheme Wei Liu
2018-03-07 15:09 ` Ian Jackson
2017-10-31 13:51 ` [OSSTEST PATCH v2 12/19] ts-xen-build-prep: install e2fslibs-dev Wei Liu
2018-03-07 15:10 ` Ian Jackson
2017-10-31 13:51 ` [OSSTEST PATCH v2 13/19] TestSupport: add dpkg option when installing packages Wei Liu
2018-03-07 15:11 ` Ian Jackson
2018-05-08 9:11 ` Wei Liu
2017-10-31 13:51 ` [OSSTEST PATCH v2 14/19] ts-guests-nbd-mirror: make it work with stretch Wei Liu
2018-03-07 14:45 ` Ian Jackson
2018-05-08 9:20 ` Wei Liu
2018-05-08 9:23 ` Wei Liu
2017-10-31 13:51 ` [OSSTEST PATCH v2 15/19] Add clk_ignore_unused for stretch for arm hosts Wei Liu
2017-10-31 13:52 ` [OSSTEST PATCH v2 16/19] Set mac address in interfaces(5) if force-mac-address is set Wei Liu
2018-03-07 15:13 ` Ian Jackson
2017-10-31 13:52 ` [OSSTEST PATCH v2 17/19] Skip bootloader installation for arm32 in Stretch Wei Liu
2018-03-07 14:48 ` Ian Jackson
2017-10-31 13:52 ` [OSSTEST PATCH v2 18/19] make-flight: don't test pvgrub for Xen XXX Wei Liu
2017-11-03 14:06 ` [OSSTEST PATCH 0/2] Keep pvgrub tests Wei Liu
2017-11-03 14:06 ` [OSSTEST PATCH 1/2] ts-debian-di-install: use gho to pick d-i Wei Liu
2017-11-03 14:45 ` Ian Jackson
2017-11-03 14:06 ` [OSSTEST PATCH 2/2] make-flight: guest should use jessie to test pvgrub Wei Liu
2017-11-03 19:29 ` Ian Jackson
2018-03-07 15:14 ` [OSSTEST PATCH v2 18/19] make-flight: don't test pvgrub for Xen XXX Ian Jackson
2017-10-31 13:52 ` [OSSTEST PATCH v2 19/19] Switch to Debian Stretch Wei Liu
2018-03-07 14:50 ` Ian Jackson
2017-10-31 18:42 ` [OSSTEST PATCH v2 00/19] Upgrade to Stretch Wei Liu
2017-11-01 10:05 ` Wei Liu
2018-02-20 13:38 ` Julien Grall
2018-02-20 14:40 ` Wei Liu
2018-02-20 15:13 ` Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1414579302-6692-5-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).