Andrew Geissler | da686ac | 2019-01-23 14:37:55 -0600 | [diff] [blame] | 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |
Andrew Jeffery | 274f96a | 2020-04-03 16:20:51 +1030 | [diff] [blame] | 2 | |
| 3 | SRC_URI_remove = "file://${BPN}.conf" |
| 4 | SRC_URI += "file://server.ttyVUART0.conf" |
Andrew Jeffery | 1688b15 | 2020-02-17 15:34:34 +1030 | [diff] [blame] | 5 | |
| 6 | install_concurrent_console_config() { |
| 7 | # Install configuration for the servers and clients. Keep commandline |
| 8 | # compatibility with previous configurations by defaulting to not |
| 9 | # specifying a socket-id for VUART0/2200 |
| 10 | install -m 0755 -d ${D}${sysconfdir}/${BPN} |
| 11 | |
| 12 | # Remove the default client configuration as we don't to define a |
| 13 | # socket-id for the 2200 console |
| 14 | rm -f ${D}${sysconfdir}/${BPN}/client.2200.conf |
| 15 | |
| 16 | # However, now link to /dev/null as a way of not specifying a |
| 17 | # socket-id while having a configuration file present. We need to |
| 18 | # provide a configuration path to meet the requirements of the packaged |
| 19 | # unit file. |
| 20 | ln -sr ${D}/dev/null ${D}${sysconfdir}/${BPN}/client.2200.conf |
| 21 | |
| 22 | # We need to populate socket-id for remaining consoles |
| 23 | install -m 0644 ${WORKDIR}/client.2201.conf ${D}${sysconfdir}/${BPN}/ |
| 24 | |
| 25 | # Install configuration for remaining servers - the base recipe |
| 26 | # installs the configuration for the first. |
| 27 | install -m 0644 ${WORKDIR}/server.ttyVUART1.conf ${D}${sysconfdir}/${BPN}/ |
| 28 | } |
| 29 | |
Adriana Kobylak | c923569 | 2021-03-25 16:36:59 +0000 | [diff] [blame^] | 30 | SRC_URI_append_p10bmc = " file://client.2201.conf" |
| 31 | SRC_URI_append_p10bmc = " file://server.ttyVUART1.conf" |
Andrew Jeffery | 1688b15 | 2020-02-17 15:34:34 +1030 | [diff] [blame] | 32 | |
Adriana Kobylak | c923569 | 2021-03-25 16:36:59 +0000 | [diff] [blame^] | 33 | REGISTERED_SERVICES_${PN}_append_p10bmc = " obmc_console_guests:tcp:2201:" |
Andrew Jeffery | 1688b15 | 2020-02-17 15:34:34 +1030 | [diff] [blame] | 34 | |
Adriana Kobylak | c923569 | 2021-03-25 16:36:59 +0000 | [diff] [blame^] | 35 | SYSTEMD_SERVICE_${PN}_append_p10bmc = " obmc-console-ssh@2200.service \ |
Andrew Jeffery | 1688b15 | 2020-02-17 15:34:34 +1030 | [diff] [blame] | 36 | obmc-console-ssh@2201.service \ |
| 37 | " |
Adriana Kobylak | c923569 | 2021-03-25 16:36:59 +0000 | [diff] [blame^] | 38 | SYSTEMD_SERVICE_${PN}_remove_p10bmc = "obmc-console-ssh.socket" |
Andrew Jeffery | 1688b15 | 2020-02-17 15:34:34 +1030 | [diff] [blame] | 39 | |
Adriana Kobylak | c923569 | 2021-03-25 16:36:59 +0000 | [diff] [blame^] | 40 | FILES_${PN}_remove_p10bmc = "/lib/systemd/system/obmc-console-ssh@.service.d/use-socket.conf" |
Andrew Jeffery | 1688b15 | 2020-02-17 15:34:34 +1030 | [diff] [blame] | 41 | |
Adriana Kobylak | c923569 | 2021-03-25 16:36:59 +0000 | [diff] [blame^] | 42 | EXTRA_OECONF_append_p10bmc = " --enable-concurrent-servers" |
Andrew Jeffery | 1688b15 | 2020-02-17 15:34:34 +1030 | [diff] [blame] | 43 | |
Adriana Kobylak | c923569 | 2021-03-25 16:36:59 +0000 | [diff] [blame^] | 44 | do_install_append_p10bmc() { |
Andrew Jeffery | 1688b15 | 2020-02-17 15:34:34 +1030 | [diff] [blame] | 45 | install_concurrent_console_config |
| 46 | } |
Andrew Jeffery | 35c33cc | 2020-04-02 15:29:34 +1030 | [diff] [blame] | 47 | |
| 48 | SRC_URI_append_witherspoon-tacoma = " file://client.2201.conf" |
| 49 | SRC_URI_append_witherspoon-tacoma = " file://server.ttyVUART1.conf" |
| 50 | |
| 51 | REGISTERED_SERVICES_${PN}_append_witherspoon-tacoma = " obmc_console_guests:tcp:2201:" |
| 52 | |
| 53 | SYSTEMD_SERVICE_${PN}_append_witherspoon-tacoma = " obmc-console-ssh@2200.service \ |
| 54 | obmc-console-ssh@2201.service \ |
| 55 | " |
| 56 | SYSTEMD_SERVICE_${PN}_remove_witherspoon-tacoma = "obmc-console-ssh.socket" |
| 57 | |
| 58 | FILES_${PN}_remove_witherspoon-tacoma = "/lib/systemd/system/obmc-console-ssh@.service.d/use-socket.conf" |
| 59 | |
| 60 | EXTRA_OECONF_append_witherspoon-tacoma = " --enable-concurrent-servers" |
| 61 | |
| 62 | do_install_append_witherspoon-tacoma() { |
| 63 | install_concurrent_console_config |
| 64 | } |