Initial commit
This commit is contained in:
+1
@@ -0,0 +1 @@
|
||||
console-id = host0
|
||||
+1
@@ -0,0 +1 @@
|
||||
console-id = host1
|
||||
+1
@@ -0,0 +1 @@
|
||||
console-id = host2
|
||||
+1
@@ -0,0 +1 @@
|
||||
console-id = host3
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Phosphor BIC Console SSH socket for Slot1
|
||||
Wants=obmc-console@ttyS0.service
|
||||
|
||||
[Socket]
|
||||
ListenStream=2300
|
||||
Accept=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Phosphor BIC Console SSH socket for Slot1
|
||||
Wants=obmc-console@ttyS0.service
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/usr/bin/select-uart-mux slot1 bic
|
||||
ExecStart=/usr/sbin/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key -c "/usr/bin/obmc-console-client -i host0" $DROPBEAR_EXTRA_ARGS
|
||||
SyslogIdentifier=console-client-ttyS0
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
StandardInput=socket
|
||||
KillMode=process
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Phosphor Host Console SSH socket for Slot1
|
||||
Wants=obmc-console@ttyS0.service
|
||||
|
||||
[Socket]
|
||||
ListenStream=2200
|
||||
Accept=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Phosphor Host Console SSH socket for Slot1
|
||||
Wants=obmc-console@ttyS0.service
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/usr/bin/select-uart-mux slot1 host
|
||||
ExecStart=/usr/sbin/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key -c "/usr/bin/obmc-console-client -i host0" $DROPBEAR_EXTRA_ARGS
|
||||
SyslogIdentifier=console-client-ttyS0
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
StandardInput=socket
|
||||
KillMode=process
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Phosphor BIC Console SSH socket for Slot2
|
||||
Wants=obmc-console@ttyS1.service
|
||||
|
||||
[Socket]
|
||||
ListenStream=2301
|
||||
Accept=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Phosphor BIC Console SSH socket for Slot2
|
||||
Wants=obmc-console@ttyS1.service
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/usr/bin/select-uart-mux slot2 bic
|
||||
ExecStart=/usr/sbin/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key -c "/usr/bin/obmc-console-client -i host1" $DROPBEAR_EXTRA_ARGS
|
||||
SyslogIdentifier=console-client-ttyS1
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
StandardInput=socket
|
||||
KillMode=process
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Phosphor Host Console SSH socket for Slot2
|
||||
Wants=obmc-console@ttyS1.service
|
||||
|
||||
[Socket]
|
||||
ListenStream=2201
|
||||
Accept=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Phosphor Host Console SSH socket for Slot2
|
||||
Wants=obmc-console@ttyS1.service
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/usr/bin/select-uart-mux slot2 host
|
||||
ExecStart=/usr/sbin/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key -c "/usr/bin/obmc-console-client -i host1" $DROPBEAR_EXTRA_ARGS
|
||||
SyslogIdentifier=console-client-ttyS1
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
StandardInput=socket
|
||||
KillMode=process
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Phosphor BIC Console SSH socket for Slot3
|
||||
Wants=obmc-console@ttyS2.service
|
||||
|
||||
[Socket]
|
||||
ListenStream=2302
|
||||
Accept=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Phosphor BIC Console SSH socket for Slot3
|
||||
Wants=obmc-console@ttyS2.service
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/usr/bin/select-uart-mux slot3 bic
|
||||
ExecStart=/usr/sbin/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key -c "/usr/bin/obmc-console-client -i host2" $DROPBEAR_EXTRA_ARGS
|
||||
SyslogIdentifier=console-client-ttyS2
|
||||
CollectMode=inactive-or-failed
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
StandardInput=socket
|
||||
KillMode=process
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Phosphor Host Console SSH socket for Slot3
|
||||
Wants=obmc-console@ttyS2.service
|
||||
|
||||
[Socket]
|
||||
ListenStream=2202
|
||||
Accept=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Phosphor Host Console SSH socket for Slot3
|
||||
Wants=obmc-console@ttyS2.service
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/usr/bin/select-uart-mux slot3 host
|
||||
ExecStart=/usr/sbin/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key -c "/usr/bin/obmc-console-client -i host2" $DROPBEAR_EXTRA_ARGS
|
||||
SyslogIdentifier=console-client-ttyS2
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
StandardInput=socket
|
||||
KillMode=process
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Phosphor BIC Console SSH socket for Slot4
|
||||
Wants=obmc-console@ttyS3.service
|
||||
|
||||
[Socket]
|
||||
ListenStream=2303
|
||||
Accept=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Phosphor BIC Console SSH socket for Slot4
|
||||
Wants=obmc-console@ttyS3.service
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/usr/bin/select-uart-mux slot4 bic
|
||||
ExecStart=/usr/sbin/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key -c "/usr/bin/obmc-console-client -i host3" $DROPBEAR_EXTRA_ARGS
|
||||
SyslogIdentifier=console-client-ttyS3
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
StandardInput=socket
|
||||
KillMode=process
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Phosphor Host Console SSH socket for Slot4
|
||||
Wants=obmc-console@ttyS3.service
|
||||
|
||||
[Socket]
|
||||
ListenStream=2203
|
||||
Accept=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Phosphor Host Console SSH socket for Slot4
|
||||
Wants=obmc-console@ttyS3.service
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/usr/bin/select-uart-mux slot4 host
|
||||
ExecStart=/usr/sbin/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key -c "/usr/bin/obmc-console-client -i host3" $DROPBEAR_EXTRA_ARGS
|
||||
SyslogIdentifier=console-client-ttyS3
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
StandardInput=socket
|
||||
KillMode=process
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
local-tty = ttyS0
|
||||
baud = 57600
|
||||
console-id = host0
|
||||
logfile = /var/log/obmc-console0.log
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
local-tty = ttyS1
|
||||
baud = 57600
|
||||
console-id = host1
|
||||
logfile = /var/log/obmc-console1.log
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
local-tty = ttyS2
|
||||
baud = 57600
|
||||
console-id = host2
|
||||
logfile = /var/log/obmc-console2.log
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
local-tty = ttyS3
|
||||
baud = 57600
|
||||
console-id = host3
|
||||
logfile = /var/log/obmc-console3.log
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
local-tty = ttyS2
|
||||
baud = 57600
|
||||
@@ -0,0 +1,59 @@
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
OBMC_CONSOLE_HOST_TTY = "ttyS2"
|
||||
OBMC_CONSOLE_TTYS:fb-compute-multihost = "ttyS0 ttyS1 ttyS2 ttyS3"
|
||||
|
||||
SRC_URI:append:fb-compute-singlehost = " file://server.ttyS2.conf"
|
||||
|
||||
SRC_URI:append:fb-compute-multihost = " file://server.ttyS0.conf \
|
||||
file://server.ttyS1.conf \
|
||||
file://server.ttyS2.conf \
|
||||
file://server.ttyS3.conf \
|
||||
file://client.2200.conf \
|
||||
file://client.2201.conf \
|
||||
file://client.2202.conf \
|
||||
file://client.2203.conf"
|
||||
|
||||
CLIENT_SERVICE_FILES_FMT = "file://${BPN}-{0}-ssh-host@.service \
|
||||
file://${BPN}-{0}-ssh-bic@.service \
|
||||
file://${BPN}-{0}-ssh-host.socket \
|
||||
file://${BPN}-{0}-ssh-bic.socket"
|
||||
|
||||
SRC_URI:append:fb-compute-multihost = " \
|
||||
${@compose_list(d, 'CLIENT_SERVICE_FILES_FMT', 'OBMC_CONSOLE_TTYS')}"
|
||||
|
||||
CLIENT_SERVICE_FMT = "${PN}-{0}-ssh-host@.service \
|
||||
${PN}-{0}-ssh-bic@.service \
|
||||
${PN}-{0}-ssh-host.socket \
|
||||
${PN}-{0}-ssh-bic.socket"
|
||||
|
||||
SYSTEMD_SERVICE:${PN}:append:fb-compute-multihost = " \
|
||||
${@compose_list(d, 'CLIENT_SERVICE_FMT', 'OBMC_CONSOLE_TTYS')} \
|
||||
"
|
||||
|
||||
SRC_URI:remove = "file://${BPN}.conf"
|
||||
|
||||
SYSTEMD_SERVICE:${PN}:remove:fb-compute-multihost = "obmc-console-ssh.socket"
|
||||
SYSTEMD_SERVICE:${PN}:remove:fb-compute-multihost = "obmc-console-ssh@.service"
|
||||
|
||||
PACKAGECONFIG:append:fb-compute-multihost = " concurrent-servers"
|
||||
|
||||
do_install:append() {
|
||||
# Install the server configuration
|
||||
install -m 0755 -d ${D}${sysconfdir}/${BPN}
|
||||
install -m 0644 ${WORKDIR}/*.conf ${D}${sysconfdir}/${BPN}/
|
||||
# Remove upstream-provided server configuration
|
||||
rm -f ${D}${sysconfdir}/${BPN}/server.ttyVUART0.conf
|
||||
}
|
||||
|
||||
do_install:append:fb-compute-multihost() {
|
||||
# Implement a script called "select-uart-mux" in project layer and follow the interface below:
|
||||
# Usage: select-uart-mux <slot1|slot2|slot3|slot4> <host|bic>
|
||||
install -m 0644 ${WORKDIR}/${BPN}-*-ssh-bic@.service ${D}${systemd_system_unitdir}
|
||||
install -m 0644 ${WORKDIR}/${BPN}-*-ssh-bic.socket ${D}${systemd_system_unitdir}
|
||||
install -m 0644 ${WORKDIR}/${BPN}-*-ssh-host@.service ${D}${systemd_system_unitdir}
|
||||
install -m 0644 ${WORKDIR}/${BPN}-*-ssh-host.socket ${D}${systemd_system_unitdir}
|
||||
|
||||
rm -rf ${D}${systemd_system_unitdir}/obmc-console-ssh@.service.d/
|
||||
rm -f ${D}${systemd_system_unitdir}/${BPN}-ssh@.service
|
||||
rm -f ${D}${systemd_system_unitdir}/${BPN}-ssh.socket
|
||||
}
|
||||
Reference in New Issue
Block a user