blob: 6a6a628bd7bc146d50842287a55a46b58401e205 [file] [log] [blame]
Kumar Thangavel651d8c42022-06-07 11:09:49 +05301FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
Patrick Williamsdb126712023-10-24 03:20:31 -05002
3# Disable obmc-console ssh ports.
4PACKAGECONFIG:remove = "ssh"
5
Vijay Khemka84ca3282019-10-11 18:12:40 -07006OBMC_CONSOLE_HOST_TTY = "ttyS2"
Delphine CC Chiua576a592022-12-21 09:25:28 +08007OBMC_CONSOLE_TTYS:fb-compute-multihost = "ttyS0 ttyS1 ttyS2 ttyS3"
Vijay Khemka1de5d0f2020-04-13 13:51:18 -07008
Kumar Thangavel651d8c42022-06-07 11:09:49 +05309SRC_URI:append:fb-compute-singlehost = " file://server.ttyS2.conf"
10
11SRC_URI:append:fb-compute-multihost = " file://server.ttyS0.conf \
12 file://server.ttyS1.conf \
13 file://server.ttyS2.conf \
14 file://server.ttyS3.conf \
15 file://client.2200.conf \
16 file://client.2201.conf \
17 file://client.2202.conf \
18 file://client.2203.conf"
Vijay Khemkaddc2dfd2020-09-24 11:25:17 -070019
Delphine CC Chiua576a592022-12-21 09:25:28 +080020CLIENT_SERVICE_FILES_FMT = "file://${BPN}-{0}-ssh-host@.service \
21 file://${BPN}-{0}-ssh-bic@.service \
22 file://${BPN}-{0}-ssh-host.socket \
23 file://${BPN}-{0}-ssh-bic.socket"
24
25SRC_URI:append:fb-compute-multihost = " \
26 ${@compose_list(d, 'CLIENT_SERVICE_FILES_FMT', 'OBMC_CONSOLE_TTYS')}"
27
28CLIENT_SERVICE_FMT = "${PN}-{0}-ssh-host@.service \
29 ${PN}-{0}-ssh-bic@.service \
30 ${PN}-{0}-ssh-host.socket \
31 ${PN}-{0}-ssh-bic.socket"
32
33SYSTEMD_SERVICE:${PN}:append:fb-compute-multihost = " \
34 ${@compose_list(d, 'CLIENT_SERVICE_FMT', 'OBMC_CONSOLE_TTYS')} \
35 "
36
Patrick Williams6f746642021-08-06 07:40:55 -050037SRC_URI:remove = "file://${BPN}.conf"
Vijay Khemka1de5d0f2020-04-13 13:51:18 -070038
Kumar Thangavel651d8c42022-06-07 11:09:49 +053039SYSTEMD_SERVICE:${PN}:remove:fb-compute-multihost = "obmc-console-ssh.socket"
Delphine CC Chiua576a592022-12-21 09:25:28 +080040SYSTEMD_SERVICE:${PN}:remove:fb-compute-multihost = "obmc-console-ssh@.service"
41
Andrew Jeffery08413f22023-04-21 11:45:51 +093042PACKAGECONFIG:append:fb-compute-multihost = " concurrent-servers"
Vijay Khemka923b2482020-04-13 15:46:36 -070043
Patrick Williams6f746642021-08-06 07:40:55 -050044do_install:append() {
Vijay Khemka1de5d0f2020-04-13 13:51:18 -070045 # Install the server configuration
46 install -m 0755 -d ${D}${sysconfdir}/${BPN}
47 install -m 0644 ${WORKDIR}/*.conf ${D}${sysconfdir}/${BPN}/
48 # Remove upstream-provided server configuration
49 rm -f ${D}${sysconfdir}/${BPN}/server.ttyVUART0.conf
50}
Delphine CC Chiua576a592022-12-21 09:25:28 +080051
52do_install:append:fb-compute-multihost() {
53 # Implement a script called "select-uart-mux" in project layer and follow the interface below:
54 # Usage: select-uart-mux <slot1|slot2|slot3|slot4> <host|bic>
55 install -m 0644 ${WORKDIR}/${BPN}-*-ssh-bic@.service ${D}${systemd_system_unitdir}
56 install -m 0644 ${WORKDIR}/${BPN}-*-ssh-bic.socket ${D}${systemd_system_unitdir}
57 install -m 0644 ${WORKDIR}/${BPN}-*-ssh-host@.service ${D}${systemd_system_unitdir}
58 install -m 0644 ${WORKDIR}/${BPN}-*-ssh-host.socket ${D}${systemd_system_unitdir}
59
60 rm -rf ${D}${systemd_system_unitdir}/obmc-console-ssh@.service.d/
61 rm -f ${D}${systemd_system_unitdir}/${BPN}-ssh@.service
62 rm -f ${D}${systemd_system_unitdir}/${BPN}-ssh.socket
63}