blob: e6386792c10a31ef8e0337b22c32f8601c43571f [file] [log] [blame]
Mohaimen Alsamaraif59d0172021-08-17 09:34:22 -05001FILESEXTRAPATHS:prepend:kudo := "${THISDIR}/${PN}:"
2RDEPENDS:${PN}:append:kudo = " bash"
Lancelot Kaodc456f92021-02-21 18:42:38 -06003
Charles Boyerc33f2352022-01-12 17:10:17 -06004OBMC_CONSOLE_TTYS = "ttyS1 ttyS3"
Lancelot Kaodc456f92021-02-21 18:42:38 -06005
Charles Boyerc33f2352022-01-12 17:10:17 -06006SRC_URI:append:kudo = " file://${BPN}@.service \
7 file://kudo_uart_mux_ctrl.sh \
Charles Boyeref34d6f2022-01-31 14:17:58 -06008 file://server.ttyS1.conf \
9 file://server.ttyS3.conf \
Charles Boyerc33f2352022-01-12 17:10:17 -060010 "
Lancelot Kaodc456f92021-02-21 18:42:38 -060011
Mohaimen Alsamaraif59d0172021-08-17 09:34:22 -050012SYSTEMD_SERVICE:${PN}:append:kudo = " \
Charles Boyerc33f2352022-01-12 17:10:17 -060013 ${BPN}@.service \
Lancelot Kaodc456f92021-02-21 18:42:38 -060014 "
15
Mohaimen Alsamaraif59d0172021-08-17 09:34:22 -050016do_install:append() {
Lancelot Kaodc456f92021-02-21 18:42:38 -060017 # Overwrite base package's obmc-console@.service with our own
18 install -m 0644 ${WORKDIR}/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@.service
Charles Boyer2adad362021-11-24 15:58:03 -060019 install -d ${D}${libexecdir}/${PN}
20 install -m 0755 ${WORKDIR}/kudo_uart_mux_ctrl.sh ${D}${libexecdir}/${PN}/kudo_uart_mux_ctrl.sh
Lancelot Kaodc456f92021-02-21 18:42:38 -060021}
22
Mohaimen Alsamaraif59d0172021-08-17 09:34:22 -050023pkg_postinst:${PN}:append () {
Lancelot Kaodc456f92021-02-21 18:42:38 -060024 systemctl --root=$D enable obmc-console@ttyS1.service
25 systemctl --root=$D enable obmc-console@ttyS3.service
26}
Charles Boyer2adad362021-11-24 15:58:03 -060027