diff options
Diffstat (limited to 'meta-bytedance/meta-g220a/recipes-phosphor')
3 files changed, 37 insertions, 0 deletions
diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/console/obmc-console/obmc-console.conf b/meta-bytedance/meta-g220a/recipes-phosphor/console/obmc-console/obmc-console.conf new file mode 100644 index 000000000..8491f5365 --- /dev/null +++ b/meta-bytedance/meta-g220a/recipes-phosphor/console/obmc-console/obmc-console.conf @@ -0,0 +1,3 @@ +baud = 115200 +local-tty = ttyS3 +local-tty-baud = 115200 diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/console/obmc-console/obmc-console@.service b/meta-bytedance/meta-g220a/recipes-phosphor/console/obmc-console/obmc-console@.service new file mode 100644 index 000000000..1a1dfffa1 --- /dev/null +++ b/meta-bytedance/meta-g220a/recipes-phosphor/console/obmc-console/obmc-console@.service @@ -0,0 +1,20 @@ +[Unit] +Description=Phosphor Console Muxer listening on device /dev/%I +BindsTo=dev-%i.device +After=dev-%i.device + +[Service] +ExecStartPre=/bin/sh -c 'echo -n "uart3" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart_routing/uart1' +ExecStartPre=/bin/sh -c 'echo -n "uart1" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart_routing/uart3' +ExecStartPre=/bin/sh -c 'echo -n "io1" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart_routing/uart4' +ExecStartPre=/bin/sh -c 'echo -n "uart4" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart_routing/io1' +ExecStart=/usr/bin/env obmc-console-server --config {sysconfdir}/obmc-console.conf %i +ExecStopPost=/bin/sh -c 'echo -n "io1" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart_routing/uart1' +ExecStopPost=/bin/sh -c 'echo -n "io3" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart_routing/uart3' +ExecStopPost=/bin/sh -c 'echo -n "io4" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart_routing/uart4' +ExecStopPost=/bin/sh -c 'echo -n "uart1" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart_routing/io1' +SyslogIdentifier=obmc-console-server +Restart=always + +[Install] +WantedBy={SYSTEMD_DEFAULT_TARGET} diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/console/obmc-console_%.bbappend b/meta-bytedance/meta-g220a/recipes-phosphor/console/obmc-console_%.bbappend new file mode 100644 index 000000000..a5d722fda --- /dev/null +++ b/meta-bytedance/meta-g220a/recipes-phosphor/console/obmc-console_%.bbappend @@ -0,0 +1,14 @@ +FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" +OBMC_CONSOLE_HOST_TTY = "ttyS2" +SRC_URI += "file://obmc-console@.service \ + " +inherit obmc-phosphor-systemd + +SYSTEMD_SERVICE_${PN} += " \ + ${PN}@${OBMC_CONSOLE_HOST_TTY}.service \ + " + +do_install_append() { + rm -rf ${D}${base_libdir}/udev/rules.d/80-obmc-console-uart.rules + install -m 0644 ${WORKDIR}/${PN}@.service ${D}${systemd_system_unitdir} +} |