Mohaimen Alsamarai | f59d017 | 2021-08-17 09:34:22 -0500 | [diff] [blame] | 1 | FILESEXTRAPATHS:prepend:kudo := "${THISDIR}/${PN}:" |
| 2 | RDEPENDS:${PN}:append:kudo = " bash" |
Lancelot Kao | dc456f9 | 2021-02-21 18:42:38 -0600 | [diff] [blame] | 3 | |
Charles Boyer | c33f235 | 2022-01-12 17:10:17 -0600 | [diff] [blame] | 4 | OBMC_CONSOLE_TTYS = "ttyS1 ttyS3" |
Lancelot Kao | dc456f9 | 2021-02-21 18:42:38 -0600 | [diff] [blame] | 5 | |
Charles Boyer | c33f235 | 2022-01-12 17:10:17 -0600 | [diff] [blame] | 6 | SRC_URI:append:kudo = " file://${BPN}@.service \ |
| 7 | file://kudo_uart_mux_ctrl.sh \ |
Charles Boyer | ef34d6f | 2022-01-31 14:17:58 -0600 | [diff] [blame] | 8 | file://server.ttyS1.conf \ |
| 9 | file://server.ttyS3.conf \ |
Charles Boyer | c33f235 | 2022-01-12 17:10:17 -0600 | [diff] [blame] | 10 | " |
Lancelot Kao | dc456f9 | 2021-02-21 18:42:38 -0600 | [diff] [blame] | 11 | |
Mohaimen Alsamarai | f59d017 | 2021-08-17 09:34:22 -0500 | [diff] [blame] | 12 | SYSTEMD_SERVICE:${PN}:append:kudo = " \ |
Charles Boyer | c33f235 | 2022-01-12 17:10:17 -0600 | [diff] [blame] | 13 | ${BPN}@.service \ |
Lancelot Kao | dc456f9 | 2021-02-21 18:42:38 -0600 | [diff] [blame] | 14 | " |
| 15 | |
Mohaimen Alsamarai | f59d017 | 2021-08-17 09:34:22 -0500 | [diff] [blame] | 16 | do_install:append() { |
Lancelot Kao | dc456f9 | 2021-02-21 18:42:38 -0600 | [diff] [blame] | 17 | # Overwrite base package's obmc-console@.service with our own |
| 18 | install -m 0644 ${WORKDIR}/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@.service |
Charles Boyer | 2adad36 | 2021-11-24 15:58:03 -0600 | [diff] [blame] | 19 | install -d ${D}${libexecdir}/${PN} |
| 20 | install -m 0755 ${WORKDIR}/kudo_uart_mux_ctrl.sh ${D}${libexecdir}/${PN}/kudo_uart_mux_ctrl.sh |
Lancelot Kao | dc456f9 | 2021-02-21 18:42:38 -0600 | [diff] [blame] | 21 | } |
| 22 | |
Mohaimen Alsamarai | f59d017 | 2021-08-17 09:34:22 -0500 | [diff] [blame] | 23 | pkg_postinst:${PN}:append () { |
Lancelot Kao | dc456f9 | 2021-02-21 18:42:38 -0600 | [diff] [blame] | 24 | systemctl --root=$D enable obmc-console@ttyS1.service |
| 25 | systemctl --root=$D enable obmc-console@ttyS3.service |
| 26 | } |
Charles Boyer | 2adad36 | 2021-11-24 15:58:03 -0600 | [diff] [blame] | 27 | |