blob: c6eb07c412e54eff04523075baacb8ea3299fb9e [file] [log] [blame]
Kumar Thangavel651d8c42022-06-07 11:09:49 +05301FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
Vijay Khemka84ca3282019-10-11 18:12:40 -07002OBMC_CONSOLE_HOST_TTY = "ttyS2"
Delphine CC Chiua576a592022-12-21 09:25:28 +08003OBMC_CONSOLE_TTYS:fb-compute-multihost = "ttyS0 ttyS1 ttyS2 ttyS3"
Vijay Khemka1de5d0f2020-04-13 13:51:18 -07004
Kumar Thangavel651d8c42022-06-07 11:09:49 +05305SRC_URI:append:fb-compute-singlehost = " file://server.ttyS2.conf"
6
7SRC_URI:append:fb-compute-multihost = " file://server.ttyS0.conf \
8 file://server.ttyS1.conf \
9 file://server.ttyS2.conf \
10 file://server.ttyS3.conf \
11 file://client.2200.conf \
12 file://client.2201.conf \
13 file://client.2202.conf \
14 file://client.2203.conf"
Vijay Khemkaddc2dfd2020-09-24 11:25:17 -070015
Delphine CC Chiua576a592022-12-21 09:25:28 +080016CLIENT_SERVICE_FILES_FMT = "file://${BPN}-{0}-ssh-host@.service \
17 file://${BPN}-{0}-ssh-bic@.service \
18 file://${BPN}-{0}-ssh-host.socket \
19 file://${BPN}-{0}-ssh-bic.socket"
20
21SRC_URI:append:fb-compute-multihost = " \
22 ${@compose_list(d, 'CLIENT_SERVICE_FILES_FMT', 'OBMC_CONSOLE_TTYS')}"
23
24CLIENT_SERVICE_FMT = "${PN}-{0}-ssh-host@.service \
25 ${PN}-{0}-ssh-bic@.service \
26 ${PN}-{0}-ssh-host.socket \
27 ${PN}-{0}-ssh-bic.socket"
28
29SYSTEMD_SERVICE:${PN}:append:fb-compute-multihost = " \
30 ${@compose_list(d, 'CLIENT_SERVICE_FMT', 'OBMC_CONSOLE_TTYS')} \
31 "
32
Patrick Williams6f746642021-08-06 07:40:55 -050033SRC_URI:remove = "file://${BPN}.conf"
Vijay Khemka1de5d0f2020-04-13 13:51:18 -070034
Kumar Thangavel651d8c42022-06-07 11:09:49 +053035SYSTEMD_SERVICE:${PN}:remove:fb-compute-multihost = "obmc-console-ssh.socket"
Delphine CC Chiua576a592022-12-21 09:25:28 +080036SYSTEMD_SERVICE:${PN}:remove:fb-compute-multihost = "obmc-console-ssh@.service"
37
Andrew Jeffery08413f22023-04-21 11:45:51 +093038PACKAGECONFIG:append:fb-compute-multihost = " concurrent-servers"
Vijay Khemka923b2482020-04-13 15:46:36 -070039
Patrick Williams6f746642021-08-06 07:40:55 -050040do_install:append() {
Vijay Khemka1de5d0f2020-04-13 13:51:18 -070041 # Install the server configuration
42 install -m 0755 -d ${D}${sysconfdir}/${BPN}
43 install -m 0644 ${WORKDIR}/*.conf ${D}${sysconfdir}/${BPN}/
44 # Remove upstream-provided server configuration
45 rm -f ${D}${sysconfdir}/${BPN}/server.ttyVUART0.conf
46}
Delphine CC Chiua576a592022-12-21 09:25:28 +080047
48do_install:append:fb-compute-multihost() {
49 # Implement a script called "select-uart-mux" in project layer and follow the interface below:
50 # Usage: select-uart-mux <slot1|slot2|slot3|slot4> <host|bic>
51 install -m 0644 ${WORKDIR}/${BPN}-*-ssh-bic@.service ${D}${systemd_system_unitdir}
52 install -m 0644 ${WORKDIR}/${BPN}-*-ssh-bic.socket ${D}${systemd_system_unitdir}
53 install -m 0644 ${WORKDIR}/${BPN}-*-ssh-host@.service ${D}${systemd_system_unitdir}
54 install -m 0644 ${WORKDIR}/${BPN}-*-ssh-host.socket ${D}${systemd_system_unitdir}
55
56 rm -rf ${D}${systemd_system_unitdir}/obmc-console-ssh@.service.d/
57 rm -f ${D}${systemd_system_unitdir}/${BPN}-ssh@.service
58 rm -f ${D}${systemd_system_unitdir}/${BPN}-ssh.socket
59}