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