summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-core/dropbear/files/0001-Enable-UART-mux-setting-before-SOL-activation-via-SS.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-core/dropbear/files/0001-Enable-UART-mux-setting-before-SOL-activation-via-SS.patch')
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/dropbear/files/0001-Enable-UART-mux-setting-before-SOL-activation-via-SS.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-core/dropbear/files/0001-Enable-UART-mux-setting-before-SOL-activation-via-SS.patch b/meta-openbmc-mods/meta-common/recipes-core/dropbear/files/0001-Enable-UART-mux-setting-before-SOL-activation-via-SS.patch
new file mode 100644
index 000000000..22aed3a07
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/dropbear/files/0001-Enable-UART-mux-setting-before-SOL-activation-via-SS.patch
@@ -0,0 +1,43 @@
+From 41a43e4b149af0bbfa82ca1b9479dd7dfb2455de Mon Sep 17 00:00:00 2001
+From: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com>
+Date: Wed, 13 Oct 2021 22:52:34 +0000
+Subject: [PATCH] Enable UART mux setting before SOL activation via SSH
+
+Switching UART routing when starting obmc-service introduces garbled
+character printing out on physical host serial output and it's
+inevitable so this commit moves the routing logic into host console
+connection flow in SSH SOL to avoid the issue until SOL is actually
+activated.
+
+Tested: SOL activation is working fine via SSH
+
+Signed-off-by: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com>
+---
+ svr-runopts.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/svr-runopts.c b/svr-runopts.c
+index 2c905dd..6fc25e8 100644
+--- a/svr-runopts.c
++++ b/svr-runopts.c
+@@ -414,6 +414,17 @@ void svr_getopts(int argc, char ** argv) {
+ }
+
+ if (svr_opts.forced_command) {
++ if (strcmp(svr_opts.forced_command, "/usr/bin/obmc-console-client") == 0) {
++ FILE *fp;
++ fp = fopen("/sys/bus/platform/drivers/aspeed-uart-routing/"
++ "1e789098.uart-routing/hicra",
++ "w");
++ if (fp != NULL) {
++ char *uartMuxCtrlVal = "0x03450003";
++ fprintf(fp, "%s", uartMuxCtrlVal);
++ fclose(fp);
++ }
++ }
+ dropbear_log(LOG_INFO, "Forced command set to '%s'", svr_opts.forced_command);
+ }
+ #if DROPBEAR_PLUGIN
+--
+2.17.1
+