[PATCH] [Kimchi] Updated serial console to support s390x architecture.

From: Archana Singh <archus@linux.vnet.ibm.com> On s390x architecture, serial console differ from x86. Added code to support s390x architecture. Signed-off-by: Archana Singh <archus@linux.vnet.ibm.com> --- xmlutils/serial.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/xmlutils/serial.py b/xmlutils/serial.py index 99b1e90..c823ee6 100644 --- a/xmlutils/serial.py +++ b/xmlutils/serial.py @@ -36,6 +36,11 @@ def get_serial_xml(params): <target type='serial' port='1'/> <address type='spapr-vio' reg='0x30001000'/> </console> + + For s390x + <console type='pty'> + <target type='sclp' port='0'/> + </console> """ # pcc serial console if params["arch"] in ["ppc", "ppc64"]: @@ -43,7 +48,11 @@ def get_serial_xml(params): console.append(E.target(type="serial", port='1')) console.append(E.address(type="spapr-vio", reg="0x30001000")) return ET.tostring(console, encoding='utf-8', pretty_print=True) - + # for s390x + elif params["arch"] in ["s390x"]: + console = E.console(type="pty") + console.append(E.target(type="sclp", port='0')) + return ET.tostring(console, encoding='utf-8', pretty_print=True) # for x else: serial = E.serial(type="pty") -- 2.7.4

Reviewed-by: Daniel Barboza <danielhb@linux.vnet.ibm.com> On 08/09/2016 06:04 AM, archus@linux.vnet.ibm.com wrote:
From: Archana Singh <archus@linux.vnet.ibm.com>
On s390x architecture, serial console differ from x86. Added code to support s390x architecture.
Signed-off-by: Archana Singh <archus@linux.vnet.ibm.com> --- xmlutils/serial.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/xmlutils/serial.py b/xmlutils/serial.py index 99b1e90..c823ee6 100644 --- a/xmlutils/serial.py +++ b/xmlutils/serial.py @@ -36,6 +36,11 @@ def get_serial_xml(params): <target type='serial' port='1'/> <address type='spapr-vio' reg='0x30001000'/> </console> + + For s390x + <console type='pty'> + <target type='sclp' port='0'/> + </console> """ # pcc serial console if params["arch"] in ["ppc", "ppc64"]: @@ -43,7 +48,11 @@ def get_serial_xml(params): console.append(E.target(type="serial", port='1')) console.append(E.address(type="spapr-vio", reg="0x30001000")) return ET.tostring(console, encoding='utf-8', pretty_print=True) - + # for s390x + elif params["arch"] in ["s390x"]: + console = E.console(type="pty") + console.append(E.target(type="sclp", port='0')) + return ET.tostring(console, encoding='utf-8', pretty_print=True) # for x else: serial = E.serial(type="pty")

Reviewed-by: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com> On Tue, Aug 09, 2016 at 02:34:46PM +0530, archus@linux.vnet.ibm.com wrote:
From: Archana Singh <archus@linux.vnet.ibm.com>
On s390x architecture, serial console differ from x86. Added code to support s390x architecture.
Signed-off-by: Archana Singh <archus@linux.vnet.ibm.com> --- xmlutils/serial.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/xmlutils/serial.py b/xmlutils/serial.py index 99b1e90..c823ee6 100644 --- a/xmlutils/serial.py +++ b/xmlutils/serial.py @@ -36,6 +36,11 @@ def get_serial_xml(params): <target type='serial' port='1'/> <address type='spapr-vio' reg='0x30001000'/> </console> + + For s390x + <console type='pty'> + <target type='sclp' port='0'/> + </console> """ # pcc serial console if params["arch"] in ["ppc", "ppc64"]: @@ -43,7 +48,11 @@ def get_serial_xml(params): console.append(E.target(type="serial", port='1')) console.append(E.address(type="spapr-vio", reg="0x30001000")) return ET.tostring(console, encoding='utf-8', pretty_print=True) - + # for s390x + elif params["arch"] in ["s390x"]: + console = E.console(type="pty") + console.append(E.target(type="sclp", port='0')) + return ET.tostring(console, encoding='utf-8', pretty_print=True) # for x else: serial = E.serial(type="pty") -- 2.7.4
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel

Applied to master. Thanks! On 08/09/2016 06:04 AM, archus@linux.vnet.ibm.com wrote:
From: Archana Singh <archus@linux.vnet.ibm.com>
On s390x architecture, serial console differ from x86. Added code to support s390x architecture.
Signed-off-by: Archana Singh <archus@linux.vnet.ibm.com> --- xmlutils/serial.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/xmlutils/serial.py b/xmlutils/serial.py index 99b1e90..c823ee6 100644 --- a/xmlutils/serial.py +++ b/xmlutils/serial.py @@ -36,6 +36,11 @@ def get_serial_xml(params): <target type='serial' port='1'/> <address type='spapr-vio' reg='0x30001000'/> </console> + + For s390x + <console type='pty'> + <target type='sclp' port='0'/> + </console> """ # pcc serial console if params["arch"] in ["ppc", "ppc64"]: @@ -43,7 +48,11 @@ def get_serial_xml(params): console.append(E.target(type="serial", port='1')) console.append(E.address(type="spapr-vio", reg="0x30001000")) return ET.tostring(console, encoding='utf-8', pretty_print=True) - + # for s390x + elif params["arch"] in ["s390x"]: + console = E.console(type="pty") + console.append(E.target(type="sclp", port='0')) + return ET.tostring(console, encoding='utf-8', pretty_print=True) # for x else: serial = E.serial(type="pty")
participants (3)
-
archus@linux.vnet.ibm.com
-
Daniel Henrique Barboza
-
joserz@linux.vnet.ibm.com