blob: 13d037e4186b72d4a98c52aff5fdea7cb2783b0e [file] [log] [blame]
Hank Lioubf5dffe2019-05-24 10:27:08 +08001FILESEXTRAPATHS_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"
Hank Liou39041e22019-07-17 09:57:48 +08005SRC_URI_append_gsj = " file://fan-default-speed.sh"
Hank Lioubf5dffe2019-05-24 10:27:08 +08006SRC_URI_append_gsj = " file://phosphor-pid-control.service"
7SRC_URI_append_gsj = " file://fan-reboot-control.service"
Hank Liou39041e22019-07-17 09:57:48 +08008SRC_URI_append_gsj = " file://fan-boot-control.service"
Hank Lioubf5dffe2019-05-24 10:27:08 +08009
10FILES_${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"
Hank Liou39041e22019-07-17 09:57:48 +080013FILES_${PN}_append_gsj = " ${bindir}/fan-default-speed.sh"
Hank Lioubf5dffe2019-05-24 10:27:08 +080014
15inherit systemd
16RDEPENDS_${PN} += "bash"
17
18SYSTEMD_SERVICE_${PN}_append_gsj = " phosphor-pid-control.service"
19SYSTEMD_SERVICE_${PN}_append_gsj = " fan-reboot-control.service"
Hank Liou39041e22019-07-17 09:57:48 +080020SYSTEMD_SERVICE_${PN}_append_gsj = " fan-boot-control.service"
Hank Lioubf5dffe2019-05-24 10:27:08 +080021
22do_install_append_gsj() {
23 install -d ${D}/${bindir}
24 install -m 0755 ${WORKDIR}/fan-control.sh ${D}/${bindir}
Hank Liou39041e22019-07-17 09:57:48 +080025 install -m 0755 ${WORKDIR}/fan-default-speed.sh ${D}/${bindir}
Hank Lioubf5dffe2019-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 Liou39041e22019-07-17 09:57:48 +080038 install -m 0644 ${WORKDIR}/fan-boot-control.service \
39 ${D}${systemd_unitdir}/system
40}