Hank Liou | bf5dffe | 2019-05-24 10:27:08 +0800 | [diff] [blame] | 1 | FILESEXTRAPATHS_prepend_gsj := "${THISDIR}/${PN}:" |
| 2 | SRC_URI_append_gsj = " file://config-8ssd.json" |
| 3 | SRC_URI_append_gsj = " file://config-2ssd.json" |
| 4 | SRC_URI_append_gsj = " file://fan-control.sh" |
Hank Liou | 39041e2 | 2019-07-17 09:57:48 +0800 | [diff] [blame] | 5 | SRC_URI_append_gsj = " file://fan-default-speed.sh" |
Hank Liou | bf5dffe | 2019-05-24 10:27:08 +0800 | [diff] [blame] | 6 | SRC_URI_append_gsj = " file://phosphor-pid-control.service" |
| 7 | SRC_URI_append_gsj = " file://fan-reboot-control.service" |
Hank Liou | 39041e2 | 2019-07-17 09:57:48 +0800 | [diff] [blame] | 8 | SRC_URI_append_gsj = " file://fan-boot-control.service" |
Hank Liou | bf5dffe | 2019-05-24 10:27:08 +0800 | [diff] [blame] | 9 | |
| 10 | FILES_${PN}_append_gsj = " ${datadir}/swampd/config-8ssd.json" |
| 11 | FILES_${PN}_append_gsj = " ${datadir}/swampd/config-2ssd.json" |
| 12 | FILES_${PN}_append_gsj = " ${bindir}/fan-control.sh" |
Hank Liou | 39041e2 | 2019-07-17 09:57:48 +0800 | [diff] [blame] | 13 | FILES_${PN}_append_gsj = " ${bindir}/fan-default-speed.sh" |
Hank Liou | bf5dffe | 2019-05-24 10:27:08 +0800 | [diff] [blame] | 14 | |
| 15 | inherit systemd |
| 16 | RDEPENDS_${PN} += "bash" |
| 17 | |
| 18 | SYSTEMD_SERVICE_${PN}_append_gsj = " phosphor-pid-control.service" |
| 19 | SYSTEMD_SERVICE_${PN}_append_gsj = " fan-reboot-control.service" |
Hank Liou | 39041e2 | 2019-07-17 09:57:48 +0800 | [diff] [blame] | 20 | SYSTEMD_SERVICE_${PN}_append_gsj = " fan-boot-control.service" |
Hank Liou | bf5dffe | 2019-05-24 10:27:08 +0800 | [diff] [blame] | 21 | |
| 22 | do_install_append_gsj() { |
| 23 | install -d ${D}/${bindir} |
| 24 | install -m 0755 ${WORKDIR}/fan-control.sh ${D}/${bindir} |
Hank Liou | 39041e2 | 2019-07-17 09:57:48 +0800 | [diff] [blame] | 25 | install -m 0755 ${WORKDIR}/fan-default-speed.sh ${D}/${bindir} |
Hank Liou | bf5dffe | 2019-05-24 10:27:08 +0800 | [diff] [blame] | 26 | |
| 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 Liou | 39041e2 | 2019-07-17 09:57:48 +0800 | [diff] [blame] | 38 | install -m 0644 ${WORKDIR}/fan-boot-control.service \ |
| 39 | ${D}${systemd_unitdir}/system |
| 40 | } |