blob: 1160fcfc6810b160c113cefa3ced530e982589b4 [file] [log] [blame]
Willy Tua38b7cc2021-08-10 15:33:55 -07001FILESEXTRAPATHS:prepend:gsj := "${THISDIR}/${PN}:"
2SRC_URI:append:gsj = " file://config-8ssd.json"
3SRC_URI:append:gsj = " file://config-2ssd.json"
4SRC_URI:append:gsj = " file://fan-control.sh"
5SRC_URI:append:gsj = " file://fan-default-speed.sh"
6SRC_URI:append:gsj = " file://phosphor-pid-control.service"
7SRC_URI:append:gsj = " file://fan-reboot-control.service"
8SRC_URI:append:gsj = " file://fan-boot-control.service"
Hank Lioua9672e52019-05-24 10:27:08 +08009
Willy Tua38b7cc2021-08-10 15:33:55 -070010FILES:${PN}:append:gsj = " ${datadir}/swampd/config-8ssd.json"
11FILES:${PN}:append:gsj = " ${datadir}/swampd/config-2ssd.json"
12FILES:${PN}:append:gsj = " ${bindir}/fan-control.sh"
13FILES:${PN}:append:gsj = " ${bindir}/fan-default-speed.sh"
Hank Lioua9672e52019-05-24 10:27:08 +080014
15inherit systemd
Willy Tua38b7cc2021-08-10 15:33:55 -070016RDEPENDS:${PN} += "bash"
Hank Lioua9672e52019-05-24 10:27:08 +080017
Willy Tua38b7cc2021-08-10 15:33:55 -070018SYSTEMD_SERVICE:${PN}:append:gsj = " phosphor-pid-control.service"
19SYSTEMD_SERVICE:${PN}:append:gsj = " fan-reboot-control.service"
20SYSTEMD_SERVICE:${PN}:append:gsj = " fan-boot-control.service"
Hank Lioua9672e52019-05-24 10:27:08 +080021
Willy Tua38b7cc2021-08-10 15:33:55 -070022do_install:append:gsj() {
Hank Lioua9672e52019-05-24 10:27:08 +080023 install -d ${D}/${bindir}
24 install -m 0755 ${WORKDIR}/fan-control.sh ${D}/${bindir}
Hank Liou38e869d2019-07-17 09:57:48 +080025 install -m 0755 ${WORKDIR}/fan-default-speed.sh ${D}/${bindir}
Hank Lioua9672e52019-05-24 10:27:08 +080026
27 install -d ${D}${datadir}/swampd
28 install -m 0644 -D ${WORKDIR}/config-8ssd.json \
29 ${D}${datadir}/swampd/config-8ssd.json
30 install -m 0644 -D ${WORKDIR}/config-2ssd.json \
31 ${D}${datadir}/swampd/config-2ssd.json
32
33 install -d ${D}${systemd_unitdir}/system/
34 install -m 0644 ${WORKDIR}/phosphor-pid-control.service \
35 ${D}${systemd_unitdir}/system
36 install -m 0644 ${WORKDIR}/fan-reboot-control.service \
37 ${D}${systemd_unitdir}/system
Hank Liou38e869d2019-07-17 09:57:48 +080038 install -m 0644 ${WORKDIR}/fan-boot-control.service \
39 ${D}${systemd_unitdir}/system
40}