summaryrefslogtreecommitdiff
path: root/meta-ibm/recipes-phosphor/console/obmc-console_%.bbappend
blob: 2ca97e1656a0187d922b3f38c442d154d099dd43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"

SRC_URI:remove = "file://${BPN}.conf"
SRC_URI += "file://server.ttyVUART0.conf"

install_concurrent_console_config() {
        # Install configuration for the servers and clients. Keep commandline
        # compatibility with previous configurations by defaulting to not
        # specifying a socket-id for VUART0/2200
        install -m 0755 -d ${D}${sysconfdir}/${BPN}

        # Remove the default client configuration as we don't to define a
        # socket-id for the 2200 console
        rm -f ${D}${sysconfdir}/${BPN}/client.2200.conf

        # However, now link to /dev/null as a way of not specifying a
        # socket-id while having a configuration file present. We need to
        # provide a configuration path to meet the requirements of the packaged
        # unit file.
        ln -sr ${D}/dev/null ${D}${sysconfdir}/${BPN}/client.2200.conf

        # We need to populate socket-id for remaining consoles
        install -m 0644 ${WORKDIR}/client.2201.conf ${D}${sysconfdir}/${BPN}/

        # Install configuration for remaining servers - the base recipe
        # installs the configuration for the first.
        install -m 0644 ${WORKDIR}/server.ttyVUART1.conf ${D}${sysconfdir}/${BPN}/
}

SRC_URI:append:p10bmc = " file://client.2201.conf"
SRC_URI:append:p10bmc = " file://server.ttyVUART1.conf"

REGISTERED_SERVICES:${PN}:append:p10bmc = " obmc_console_guests:tcp:2201:"

SYSTEMD_SERVICE:${PN}:append:p10bmc = " obmc-console-ssh@2200.service \
		obmc-console-ssh@2201.service \
                "
SYSTEMD_SERVICE:${PN}:remove:p10bmc = "obmc-console-ssh.socket"

FILES:${PN}:remove:p10bmc = "${systemd_system_unitdir}/obmc-console-ssh@.service.d/use-socket.conf"

EXTRA_OECONF:append:p10bmc = " --enable-concurrent-servers"

do_install:append:p10bmc() {
        install_concurrent_console_config
}

SRC_URI:append:witherspoon-tacoma = " file://client.2201.conf"
SRC_URI:append:witherspoon-tacoma = " file://server.ttyVUART1.conf"

REGISTERED_SERVICES:${PN}:append:witherspoon-tacoma = " obmc_console_guests:tcp:2201:"

SYSTEMD_SERVICE:${PN}:append:witherspoon-tacoma = " obmc-console-ssh@2200.service \
		obmc-console-ssh@2201.service \
                "
SYSTEMD_SERVICE:${PN}:remove:witherspoon-tacoma = "obmc-console-ssh.socket"

FILES:${PN}:remove:witherspoon-tacoma = "${systemd_system_unitdir}/obmc-console-ssh@.service.d/use-socket.conf"

EXTRA_OECONF:append:witherspoon-tacoma = " --enable-concurrent-servers"

do_install:append:witherspoon-tacoma() {
        install_concurrent_console_config
}