Add obmc-console conf
Config UART2 to obmc-console source
Use script to control UART Mux
Change-Id: I73d5165e497c7af1bc445ae8d365deb49b1f508d
Signed-off-by: Ken Chen <chen.kenyy@inventec.com>
diff --git a/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/conf/machine/centriq2400-rep.conf b/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/conf/machine/centriq2400-rep.conf
index 00d1db1..9ad9714 100644
--- a/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/conf/machine/centriq2400-rep.conf
+++ b/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/conf/machine/centriq2400-rep.conf
@@ -12,4 +12,5 @@
require conf/machine/include/qualcomm.inc
IMAGE_INSTALL_append = " ir38163-workaround \
+ centriq-2400rep-console-client \
"
diff --git a/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/console/centriq-2400rep-console-client.bb b/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/console/centriq-2400rep-console-client.bb
new file mode 100644
index 0000000..4c8dc15
--- /dev/null
+++ b/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/console/centriq-2400rep-console-client.bb
@@ -0,0 +1,10 @@
+FILESEXTRAPATHS_prepend_centriq2400-rep := "${THISDIR}/${PN}:"
+inherit obmc-phosphor-license
+
+SRC_URI += "file://centriq-2400rep-console-client.sh"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/centriq-2400rep-console-client.sh ${D}${bindir}/centriq-2400rep-console-client.sh
+}
+
diff --git a/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/console/centriq-2400rep-console-client/centriq-2400rep-console-client.sh b/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/console/centriq-2400rep-console-client/centriq-2400rep-console-client.sh
new file mode 100644
index 0000000..3ecd0f8
--- /dev/null
+++ b/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/console/centriq-2400rep-console-client/centriq-2400rep-console-client.sh
@@ -0,0 +1,7 @@
+#!/bin/sh -e
+#Control UART mux for obmc-console-client
+echo 0 > /sys/class/gpio/gpio325/value
+obmc-console-client
+echo 1 > /sys/class/gpio/gpio325/value
+
+
diff --git a/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/console/centriq-2400rep-console-client/centriq-2400rep-console-client@.service b/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/console/centriq-2400rep-console-client/centriq-2400rep-console-client@.service
new file mode 100644
index 0000000..81d3bfe
--- /dev/null
+++ b/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/console/centriq-2400rep-console-client/centriq-2400rep-console-client@.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Control UART mux for obmc-console-client
+
+[Service]
+ExecStart=/usr/bin/env centriq-2400rep-console-client.sh
+SyslogIdentifier=centriq-2400rep-console-client.sh
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/console/obmc-console.bbappend b/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/console/obmc-console.bbappend
new file mode 100644
index 0000000..101fe64
--- /dev/null
+++ b/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/console/obmc-console.bbappend
@@ -0,0 +1,2 @@
+FILESEXTRAPATHS_prepend_centriq2400-rep := "${THISDIR}/${PN}:"
+OBMC_CONSOLE_HOST_TTY = "ttyS2"
diff --git a/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/console/obmc-console/obmc-console.conf b/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/console/obmc-console/obmc-console.conf
new file mode 100644
index 0000000..85f35c1
--- /dev/null
+++ b/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/console/obmc-console/obmc-console.conf
@@ -0,0 +1,2 @@
+local-tty = ttyS2
+local-tty-baud = 115200