meta-facebook: harma: Add Host BMC to SITV bmc uart
Add ttyUSB1 to login SITV BMC for debugging.
Host BMC USB -> FT4232 -> SITV UART2
Change-Id: I8f54a87fc2bc344b5e975c3c201932d219f6a299
Signed-off-by: Peter Yin <peter.yin@quantatw.com>
diff --git a/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/plat-80-obmc-console-uart.rules b/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/plat-80-obmc-console-uart.rules
new file mode 100644
index 0000000..db7919d
--- /dev/null
+++ b/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/plat-80-obmc-console-uart.rules
@@ -0,0 +1,2 @@
+SUBSYSTEM=="tty", ATTRS{iomem_base}=="0x1E78F000", ENV{SYSTEMD_WANTS}="obmc-console@ttyS2", TAG+="systemd"
+SUBSYSTEM=="tty", KERNEL=="ttyUSB1", ENV{SYSTEMD_WANTS}="obmc-console@ttyUSB1", TAG+="systemd"
diff --git a/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB1.conf b/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB1.conf
new file mode 100644
index 0000000..cedd5c4
--- /dev/null
+++ b/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB1.conf
@@ -0,0 +1,4 @@
+local-tty = ttyUSB1
+baud = 57600
+console-id = usb1
+logfile = /var/log/obmc-console-usb1.log
diff --git a/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console_%.bbappend b/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console_%.bbappend
index 2278e97..dba7b3e 100644
--- a/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console_%.bbappend
+++ b/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console_%.bbappend
@@ -1,10 +1,13 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+RDEPENDS:${PN}:append = " bash"
inherit obmc-phosphor-systemd
SRC_URI:append = " \
file://setup-uart-routing \
file://setup-uart-routing.conf \
+ file://server.ttyUSB1.conf \
+ file://plat-80-obmc-console-uart.rules \
"
do_install:append() {
@@ -12,5 +15,9 @@
install -m 0755 ${WORKDIR}/setup-uart-routing ${D}${libexecdir}/${PN}
}
-SYSTEMD_OVERRIDE:${PN}:append = " setup-uart-routing.conf:obmc-console@ttyS2.service.d/setup-uart-routing.conf"
-RDEPENDS:${PN}:append = " bash"
+OBMC_CONSOLE_TTYS:append = " ttyUSB1"
+
+do_install:append() {
+ install -d ${D}${base_libdir}/udev/rules.d/
+ install -m 0644 ${WORKDIR}/plat-80-obmc-console-uart.rules ${D}${base_libdir}/udev/rules.d/80-obmc-console-uart.rules
+}