summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOskar Senft <osk@google.com>2021-11-24 23:19:25 +0300
committerPatrick Williams <patrick@stwcx.xyz>2021-12-04 02:02:33 +0300
commiteefb1dde08064d8400a9107500dde5d26ebad63b (patch)
tree37b70757170fd8fe92a575def84f25d64f35b32f
parent80a527e52c625e6bc71099397e0ef5400ee5ba52 (diff)
downloadopenbmc-eefb1dde08064d8400a9107500dde5d26ebad63b.tar.xz
obmc-console: Re-introduce OBMC_CONSOLE_HOST_TTY variable
This change re-adds the OBMC_CONSOLE_HOST_TTY configuration variable to define the host TTY that the obmc-consoler-server should attach to. This allows individual machines to use a TTY different from the default ttyVUART0. Follow-up changes can then remove duplicate code in machine meta layers that work around the missing support for OBMC_CONSOLE_HOST_TTY. Tested: Ran a build for both cases with obmc-console.conf and a server.ttyS2.conf. Checked that the files got installed in the correct place with the expected names in both cases. Signed-off-by: Oskar Senft <osk@google.com> Change-Id: I4fc408577827a827ee10de4f5757726a1eec4a66
-rw-r--r--meta-phosphor/recipes-phosphor/console/obmc-console_git.bb10
1 files changed, 6 insertions, 4 deletions
diff --git a/meta-phosphor/recipes-phosphor/console/obmc-console_git.bb b/meta-phosphor/recipes-phosphor/console/obmc-console_git.bb
index dccc05cc30..97b197c93e 100644
--- a/meta-phosphor/recipes-phosphor/console/obmc-console_git.bb
+++ b/meta-phosphor/recipes-phosphor/console/obmc-console_git.bb
@@ -38,6 +38,8 @@ SYSTEMD_SERVICE:${PN} += "obmc-console-ssh@.service \
FILES:${PN} += "${systemd_system_unitdir}/obmc-console-ssh@.service.d/use-socket.conf"
+OBMC_CONSOLE_HOST_TTY ?= "ttyVUART0"
+
do_install:append() {
# Install the server configuration
install -m 0755 -d ${D}${sysconfdir}/${BPN}
@@ -47,15 +49,15 @@ do_install:append() {
# Install the old-style server configuration
install -m 0644 ${WORKDIR}/${BPN}.conf ${D}${sysconfdir}/
# Link the custom configuration to the required location
- ln -sr ${D}${sysconfdir}/${BPN}.conf ${D}${sysconfdir}/${BPN}/server.ttyVUART0.conf
- elif test -f "${WORKDIR}/server.ttyVUART0.conf" ; then
+ ln -sr ${D}${sysconfdir}/${BPN}.conf ${D}${sysconfdir}/${BPN}/server.${OBMC_CONSOLE_HOST_TTY}.conf
+ elif test -f "${WORKDIR}/server.${OBMC_CONSOLE_HOST_TTY}.conf" ; then
# Remove the upstream-provided server configuration
rm -f ${D}${sysconfdir}/${BPN}/server.ttyVUART0.conf
# Install the package-provided new-style configuration
- install -m 0644 ${WORKDIR}/server.ttyVUART0.conf ${D}${sysconfdir}/${BPN}/
+ install -m 0644 ${WORKDIR}/server.${OBMC_CONSOLE_HOST_TTY}.conf ${D}${sysconfdir}/${BPN}/
else
# Otherwise, remove socket-id from the shipped configuration to
# align with the lack of a client configuration file
- sed -ri '/^socket-id =/d' ${D}${sysconfdir}/${BPN}/server.ttyVUART0.conf
+ sed -ri '/^socket-id =/d' ${D}${sysconfdir}/${BPN}/server.${OBMC_CONSOLE_HOST_TTY}.conf
fi
}