meta-amd: console: code restructure

Added additional configuration files to support obmc-console
for all AMD CRB's.

Tested: verified build

Change-Id: Id31ec4e9953df32d5dc8468aafedbfa014f087f4
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
diff --git a/meta-amd/meta-common/recipes-phosphor/console/obmc-console/client.2200.conf b/meta-amd/meta-common/recipes-phosphor/console/obmc-console/client.2200.conf
new file mode 100644
index 0000000..88aa57c
--- /dev/null
+++ b/meta-amd/meta-common/recipes-phosphor/console/obmc-console/client.2200.conf
@@ -0,0 +1 @@
+socket-id = host0
diff --git a/meta-amd/meta-common/recipes-phosphor/console/obmc-console/client.2201.conf b/meta-amd/meta-common/recipes-phosphor/console/obmc-console/client.2201.conf
new file mode 100644
index 0000000..22273d4
--- /dev/null
+++ b/meta-amd/meta-common/recipes-phosphor/console/obmc-console/client.2201.conf
@@ -0,0 +1 @@
+socket-id = host1
diff --git a/meta-amd/meta-common/recipes-phosphor/console/obmc-console/daytonax/server.ttyVUART0.conf b/meta-amd/meta-common/recipes-phosphor/console/obmc-console/daytonax/server.ttyVUART0.conf
deleted file mode 100644
index 8dc6943..0000000
--- a/meta-amd/meta-common/recipes-phosphor/console/obmc-console/daytonax/server.ttyVUART0.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-lpc-address = 0x3f8
-sirq = 4
-baud = 115200
diff --git a/meta-amd/meta-common/recipes-phosphor/console/obmc-console/ethanolx/server.ttyS0.conf b/meta-amd/meta-common/recipes-phosphor/console/obmc-console/ethanolx/server.ttyS0.conf
deleted file mode 100644
index 666e66a..0000000
--- a/meta-amd/meta-common/recipes-phosphor/console/obmc-console/ethanolx/server.ttyS0.conf
+++ /dev/null
@@ -1 +0,0 @@
-baud = 115200
diff --git a/meta-amd/meta-common/recipes-phosphor/console/obmc-console/server.ttyS0.conf b/meta-amd/meta-common/recipes-phosphor/console/obmc-console/server.ttyS0.conf
new file mode 100644
index 0000000..ba9eb2b
--- /dev/null
+++ b/meta-amd/meta-common/recipes-phosphor/console/obmc-console/server.ttyS0.conf
@@ -0,0 +1,3 @@
+local-tty = ttyS0
+baud = 115200
+socket-id = host0
diff --git a/meta-amd/meta-common/recipes-phosphor/console/obmc-console/server.ttyVUART0.conf b/meta-amd/meta-common/recipes-phosphor/console/obmc-console/server.ttyVUART0.conf
new file mode 100644
index 0000000..f9bd8be
--- /dev/null
+++ b/meta-amd/meta-common/recipes-phosphor/console/obmc-console/server.ttyVUART0.conf
@@ -0,0 +1,5 @@
+lpc-address = 0x3f8
+sirq = 4
+socket-id = host1
+logsize = 128k
+logfile = /var/log/obmc-console-host1.log
diff --git a/meta-amd/meta-common/recipes-phosphor/console/obmc-console_%.bbappend b/meta-amd/meta-common/recipes-phosphor/console/obmc-console_%.bbappend
index 8ffa93b..ae8b4dc 100644
--- a/meta-amd/meta-common/recipes-phosphor/console/obmc-console_%.bbappend
+++ b/meta-amd/meta-common/recipes-phosphor/console/obmc-console_%.bbappend
@@ -1,10 +1,15 @@
-FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}/${MACHINE}:"
-OBMC_CONSOLE_HOST_TTY:ethanolx = "ttyS0"
-OBMC_CONSOLE_HOST_TTY:daytonax = "ttyVUART0"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+OBMC_CONSOLE_HOST_TTY = "ttyS0"
 
 SRC_URI:remove = "file://${BPN}.conf"
-SRC_URI:append:ethanolx = " file://server.ttyS0.conf"
-SRC_URI:append:daytonax = " file://server.ttyVUART0.conf"
+
+SRC_URI:append = "\
+        file://server.ttyS0.conf \
+        file://server.ttyVUART0.conf \
+        file://client.2200.conf \
+        file://client.2201.conf \
+"
 
 do_install:append() {
         # Remove upstream-provided configuration
@@ -13,5 +18,18 @@
         # Install the server configuration
         install -m 0755 -d ${D}${sysconfdir}/${BPN}
         install -m 0644 ${WORKDIR}/*.conf ${D}${sysconfdir}/${BPN}/
-
 }
+
+EXTRA_OECONF:append = " --enable-concurrent-servers"
+
+SYSTEMD_SERVICE_${PN}:remove = "obmc-console-ssh.socket"
+
+SYSTEMD_SERVICE_${PN}:append = " obmc-console-ssh@2200.service \
+        obmc-console-ssh@2201.service \
+"
+
+REGISTERED_SERVICES_${PN}:append = " obmc_console_host0:tcp:2200: \
+        obmc_console_host1:tcp:2201: \
+"
+
+FILES_${PN}:remove = "${systemd_system_unitdir}/obmc-console-ssh@.service.d/use-socket.conf"