summaryrefslogtreecommitdiff
path: root/meta-ampere/meta-mitchell/recipes-phosphor/console/obmc-console/ampere_uartmux_ctrl.sh
diff options
context:
space:
mode:
authorChau Ly <chaul@amperecomputing.com>2023-01-13 07:18:51 +0300
committerChau Ly <chaul@amperecomputing.com>2023-01-13 09:57:41 +0300
commit23148bd56ea408b6ee4a7fb53b8405c738db2055 (patch)
tree65c1490195dbf58ed6e653994adf905a74b7abfc /meta-ampere/meta-mitchell/recipes-phosphor/console/obmc-console/ampere_uartmux_ctrl.sh
parent74946010ffb0b679bdf4341d8e1f012b61181ccc (diff)
downloadopenbmc-23148bd56ea408b6ee4a7fb53b8405c738db2055.tar.xz
meta-ampere: mtmitchell: Support host consoles logger
This commit supports phosphor-hostlogger in STREAM mode, to forward the byte stream from obmc-console to rsyslog via the imuxsock module. The logs can be obtained in /var/log/. The logs are rotated by logrotate. The size threshold of cpu console is 256KB and the others are 64KB. Each log is polled every 1 minute to check if its file size exceeds the threshold to rotate it to the new file. Each console can be saved in up to 2 log files. Tested (CPU console): 1. Change the mux of CPU console to BMC $ ampere_uartmux_ctrl.sh 1 2 2. Connect to CPU SOL console $ ssh root@<BMC_IP> -p 2200 3. Execute commands in the CPU SOL console => The console output on CPU SOL console will all be logged to /var/log/obmc-console-cpu.log => The log will be rotated to /var/log/obmc-console-cpu.log.1 if the original log file size exceeds 256KB every 1min poll Signed-off-by: Chau Ly <chaul@amperecomputing.com> Change-Id: I336bde09c4ef61ea68e05bef2c0b4e4298ea7959
Diffstat (limited to 'meta-ampere/meta-mitchell/recipes-phosphor/console/obmc-console/ampere_uartmux_ctrl.sh')
-rw-r--r--meta-ampere/meta-mitchell/recipes-phosphor/console/obmc-console/ampere_uartmux_ctrl.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/meta-ampere/meta-mitchell/recipes-phosphor/console/obmc-console/ampere_uartmux_ctrl.sh b/meta-ampere/meta-mitchell/recipes-phosphor/console/obmc-console/ampere_uartmux_ctrl.sh
index 387cfcf92c..1d1fbed121 100644
--- a/meta-ampere/meta-mitchell/recipes-phosphor/console/obmc-console/ampere_uartmux_ctrl.sh
+++ b/meta-ampere/meta-mitchell/recipes-phosphor/console/obmc-console/ampere_uartmux_ctrl.sh
@@ -12,6 +12,21 @@ case "$1" in
# CPU0 UART0 connects to BMC UART1
CONSOLE_PORT=0
;;
+ 2) GPIO_UARTx_MODE0="uart2-mode0"
+ GPIO_UARTx_MODE1="uart2-mode1"
+ # CPU0 UART1 connects to BMC UART2
+ CONSOLE_PORT=1
+ ;;
+ 3) GPIO_UARTx_MODE0="uart3-mode0"
+ GPIO_UARTx_MODE1="uart3-mode1"
+ # CPU0 UART4 connects to BMC UART3
+ CONSOLE_PORT=2
+ ;;
+ 4) GPIO_UARTx_MODE0="uart4-mode0"
+ GPIO_UARTx_MODE1="uart4-mode1"
+ # CPU1 UART1 connects to BMC UART4
+ CONSOLE_PORT=3
+ ;;
*) echo "Invalid UART port selection"
exit 1
;;