Initial commit
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description = UART Activation Sequence
|
||||
Before=host-powerctrl.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/libexec/obmc-console/mori_uart_mux_ctrl.sh
|
||||
Type=oneshot
|
||||
|
||||
[Install]
|
||||
RequiredBy=multi-user.target
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# Provide source directive to shellcheck.
|
||||
# shellcheck source=meta-fii/meta-mori/recipes-mori/mori-fw-utility/mori-fw/mori-lib.sh
|
||||
source /usr/libexec/mori-fw/mori-lib.sh
|
||||
|
||||
set_gpio_ctrl S0_UART0_BMC_SEL 1
|
||||
set_gpio_ctrl S0_UART1_BMC_SEL 1
|
||||
echo "UART initialization complete"
|
||||
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Phosphor Console Muxer listening on device /dev/%I
|
||||
BindsTo=dev-%i.device
|
||||
After=dev-%i.device
|
||||
StartLimitBurst=3
|
||||
StartLimitIntervalSec=300
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/obmc-console-server --config /etc/obmc-console/server.%i.conf %i
|
||||
SyslogIdentifier=obmc-console-server
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
TimeoutStartSec=60
|
||||
TimeoutStopSec=60
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,3 @@
|
||||
baud = 115200
|
||||
logfile = /var/log/obmc-console-cpu.log
|
||||
logsize = 1M
|
||||
@@ -0,0 +1,4 @@
|
||||
baud = 115200
|
||||
console-id = ttyS3
|
||||
logfile = /var/log/obmc-console-mpro.log
|
||||
logsize = 1M
|
||||
@@ -0,0 +1,34 @@
|
||||
FILESEXTRAPATHS:prepend:mori := "${THISDIR}/${PN}:"
|
||||
|
||||
SRC_URI:append:mori = " \
|
||||
file://${BPN}@.service \
|
||||
file://host_console_uart_config.service \
|
||||
file://mori_uart_mux_ctrl.sh \
|
||||
file://server.ttyS1.conf \
|
||||
file://server.ttyS3.conf \
|
||||
"
|
||||
|
||||
SYSTEMD_SERVICE:${PN}:append:mori = " \
|
||||
${BPN}@.service \
|
||||
host_console_uart_config.service \
|
||||
"
|
||||
|
||||
do_install:append:mori() {
|
||||
install -d ${D}${libexecdir}/${PN}
|
||||
install -m 0755 ${WORKDIR}/mori_uart_mux_ctrl.sh \
|
||||
${D}${libexecdir}/${PN}/mori_uart_mux_ctrl.sh
|
||||
install -m 0644 ${WORKDIR}/host_console_uart_config.service \
|
||||
${D}${systemd_unitdir}/system
|
||||
# Overwrite base package's obmc-console@.service with our own
|
||||
install -m 0644 ${WORKDIR}/${BPN}@.service \
|
||||
${D}${systemd_unitdir}/system/${BPN}@.service
|
||||
}
|
||||
|
||||
RDEPENDS:${PN}:append:mori = " bash"
|
||||
|
||||
pkg_postinst:${PN}:append:mori () {
|
||||
systemctl --root=$D enable obmc-console@ttyS1.service
|
||||
systemctl --root=$D enable obmc-console@ttyS3.service
|
||||
}
|
||||
|
||||
OBMC_CONSOLE_TTYS:mori = "ttyS1 ttyS3"
|
||||
Reference in New Issue
Block a user