Kumar Thangavel | 651d8c4 | 2022-06-07 11:09:49 +0530 | [diff] [blame] | 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" |
Vijay Khemka | 84ca328 | 2019-10-11 18:12:40 -0700 | [diff] [blame] | 2 | OBMC_CONSOLE_HOST_TTY = "ttyS2" |
Delphine CC Chiu | a576a59 | 2022-12-21 09:25:28 +0800 | [diff] [blame] | 3 | OBMC_CONSOLE_TTYS:fb-compute-multihost = "ttyS0 ttyS1 ttyS2 ttyS3" |
Vijay Khemka | 1de5d0f | 2020-04-13 13:51:18 -0700 | [diff] [blame] | 4 | |
Kumar Thangavel | 651d8c4 | 2022-06-07 11:09:49 +0530 | [diff] [blame] | 5 | SRC_URI:append:fb-compute-singlehost = " file://server.ttyS2.conf" |
| 6 | |
| 7 | SRC_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 Khemka | ddc2dfd | 2020-09-24 11:25:17 -0700 | [diff] [blame] | 15 | |
Delphine CC Chiu | a576a59 | 2022-12-21 09:25:28 +0800 | [diff] [blame] | 16 | CLIENT_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 | |
| 21 | SRC_URI:append:fb-compute-multihost = " \ |
| 22 | ${@compose_list(d, 'CLIENT_SERVICE_FILES_FMT', 'OBMC_CONSOLE_TTYS')}" |
| 23 | |
| 24 | CLIENT_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 | |
| 29 | SYSTEMD_SERVICE:${PN}:append:fb-compute-multihost = " \ |
| 30 | ${@compose_list(d, 'CLIENT_SERVICE_FMT', 'OBMC_CONSOLE_TTYS')} \ |
| 31 | " |
| 32 | |
Patrick Williams | 6f74664 | 2021-08-06 07:40:55 -0500 | [diff] [blame] | 33 | SRC_URI:remove = "file://${BPN}.conf" |
Vijay Khemka | 1de5d0f | 2020-04-13 13:51:18 -0700 | [diff] [blame] | 34 | |
Kumar Thangavel | 651d8c4 | 2022-06-07 11:09:49 +0530 | [diff] [blame] | 35 | SYSTEMD_SERVICE:${PN}:remove:fb-compute-multihost = "obmc-console-ssh.socket" |
Delphine CC Chiu | a576a59 | 2022-12-21 09:25:28 +0800 | [diff] [blame] | 36 | SYSTEMD_SERVICE:${PN}:remove:fb-compute-multihost = "obmc-console-ssh@.service" |
| 37 | |
Andrew Jeffery | 08413f2 | 2023-04-21 11:45:51 +0930 | [diff] [blame] | 38 | PACKAGECONFIG:append:fb-compute-multihost = " concurrent-servers" |
Vijay Khemka | 923b248 | 2020-04-13 15:46:36 -0700 | [diff] [blame] | 39 | |
Patrick Williams | 6f74664 | 2021-08-06 07:40:55 -0500 | [diff] [blame] | 40 | do_install:append() { |
Vijay Khemka | 1de5d0f | 2020-04-13 13:51:18 -0700 | [diff] [blame] | 41 | # 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 Chiu | a576a59 | 2022-12-21 09:25:28 +0800 | [diff] [blame] | 47 | |
| 48 | do_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 | } |