Lancelot Kao | dc456f9 | 2021-02-21 18:42:38 -0600 | [diff] [blame] | 1 | FILESEXTRAPATHS_prepend_kudo := "${THISDIR}/${PN}:" |
| 2 | RDEPENDS_${PN}_append_kudo = " bash" |
| 3 | |
| 4 | # Remove what installed by common recipe |
| 5 | OBMC_CONSOLE_HOST_TTY = "" |
| 6 | SYSTEMD_SUBSTITUTIONS_remove_kudo = " OBMC_CONSOLE_HOST_TTY:${OBMC_CONSOLE_HOST_TTY}:${PN}-ssh@.service" |
| 7 | SYSTEMD_SUBSTITUTIONS_remove_kudo = " OBMC_CONSOLE_HOST_TTY:${OBMC_CONSOLE_HOST_TTY}:${PN}-ssh.socket" |
| 8 | |
| 9 | # Declare port spcific conf and service files |
| 10 | HOST_CONSOLE_TTY = "ttyS1 ttyS3" |
| 11 | |
| 12 | CONSOLE_CONF_FMT = "file://server.{0}.conf" |
| 13 | SRC_URI_append_kudo = " ${@compose_list(d, 'CONSOLE_CONF_FMT', 'HOST_CONSOLE_TTY')}" |
| 14 | SRC_URI_append_kudo = " file://${BPN}@.service" |
| 15 | SRC_URI_append_kudo = " file://kudo_uart_mux_ctrl.sh" |
| 16 | |
| 17 | SYSTEMD_SERVICE_${PN}_append_kudo = " \ |
| 18 | ${PN}@.service \ |
| 19 | " |
| 20 | |
| 21 | do_install_append() { |
| 22 | for i in ${HOST_CONSOLE_TTY} |
| 23 | do |
| 24 | install -m 0644 ${WORKDIR}/server.${i}.conf ${D}${sysconfdir}/${BPN}/server.${i}.conf |
| 25 | done |
| 26 | |
| 27 | # Deal with files installed by the base package's .bb install function |
| 28 | rm -f ${D}${sysconfdir}/${BPN}.conf |
| 29 | rm -f ${D}${sysconfdir}/${BPN}/server.ttyVUART0.conf |
| 30 | |
| 31 | # Overwrite base package's obmc-console@.service with our own |
| 32 | install -m 0644 ${WORKDIR}/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@.service |
| 33 | install -d ${D}/usr/sbin |
| 34 | install -m 0755 ${WORKDIR}/kudo_uart_mux_ctrl.sh ${D}/${sbindir}/kudo_uart_mux_ctrl.sh |
| 35 | |
| 36 | } |
| 37 | |
| 38 | pkg_postinst_${PN}_append () { |
| 39 | systemctl --root=$D enable obmc-console@ttyS1.service |
| 40 | systemctl --root=$D enable obmc-console@ttyS3.service |
| 41 | } |