obmc-console design for multi host support

Andrew Jeffery andrew at aj.id.au
Tue Mar 3 15:18:29 AEDT 2020



On Thu, 27 Feb 2020, at 20:34, Andrew Jeffery wrote:

> 
> You'll need a .bbappend file with a do_install_append() in your machine
> layer to install the rest of your configuration files.
> 

Just following up on the .bbappend - the change for the base recipe is here:

https://gerrit.openbmc-project.xyz/c/openbmc/meta-phosphor/+/29747/1/recipes-phosphor/console/obmc-console_git.bb

In that context, .bbappends for enabling concurrent console servers should
look something like this for an example machine called 'foo':

```
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

SRC_URI += "file://server.ttyVUART0.conf"
SRC_URI_append_foo = " file://client.2201.conf"
SRC_URI_append_foo = " file://server.ttyVUART1.conf"

SRC_URI_remove = "file://${BPN}.conf"

REGISTERED_SERVICES_${PN}_append_foo = " obmc_console_guests:tcp:2201:"

SYSTEMD_SERVICE_${PN}_append_foo = " obmc-console-ssh at 2200.service \
		obmc-console-ssh at 2201.service \
                "
SYSTEMD_SERVICE_${PN}_remove_foo = "obmc-console-ssh.socket"

FILES_${PN}_remove_foo = "/lib/systemd/system/obmc-console-ssh at .service.d/use-socket.conf"

EXTRA_OECONF_append_foo = " --enable-concurrent-servers"

do_install_append_foo() {
        # 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}/
}
```

Hope that helps.

Andrew


More information about the openbmc mailing list