Brandon Kim | dc43764 | 2022-04-13 10:00:14 -0700 | [diff] [blame] | 1 | FILESEXTRAPATHS:prepend:gbmc := "${THISDIR}/${PN}:" |
| 2 | |
| 3 | SRC_URI:append:gbmc = " \ |
| 4 | file://serial-to-bmc@.service \ |
| 5 | file://serial-to-host@.service.in \ |
| 6 | file://host-console-journal.service.in \ |
| 7 | file://host-console-filtered.sh \ |
| 8 | " |
| 9 | |
| 10 | SYSTEMD_SERVICE:${PN}:append:gbmc = " serial-to-bmc@.service" |
| 11 | SYSTEMD_SERVICE:${PN}:append:gbmc= " serial-to-host@.service" |
| 12 | |
| 13 | OBMC_CONSOLE_FRONT_TTY ?= "" |
| 14 | |
| 15 | RDEPENDS:${PN}:append:gbmc = " bash" |
| 16 | |
| 17 | FILES:${PN}:append:gbmc = " ${systemd_system_unitdir}/host-console-journal.service" |
| 18 | |
| 19 | do_install:append:gbmc() { |
| 20 | install -d ${D}${systemd_system_unitdir} |
| 21 | install -m 0644 ${WORKDIR}/serial-to-bmc@.service \ |
| 22 | ${D}${systemd_system_unitdir} |
| 23 | |
| 24 | sed "s,@HOST_TTY@,${OBMC_CONSOLE_HOST_TTY}," \ |
| 25 | ${WORKDIR}/serial-to-host@.service.in \ |
| 26 | >${D}${systemd_system_unitdir}/serial-to-host@.service |
| 27 | |
| 28 | sed 's,@HOST_TTY@,${OBMC_CONSOLE_HOST_TTY},' \ |
| 29 | ${WORKDIR}/host-console-journal.service.in \ |
| 30 | >${D}${systemd_system_unitdir}/host-console-journal.service |
| 31 | |
| 32 | install -d ${D}${bindir} |
| 33 | install -m0755 ${WORKDIR}/host-console-filtered.sh ${D}${bindir}/ |
| 34 | } |
| 35 | |
| 36 | pkg_postinst:${PN}:append:gbmc () { |
| 37 | if [ -n "${OBMC_CONSOLE_FRONT_TTY}" ]; then |
| 38 | systemctl --root=$D enable serial-to-host@${OBMC_CONSOLE_FRONT_TTY}.service |
| 39 | fi |
| 40 | } |