William A. Kennington III | 1987be7 | 2019-05-16 01:05:58 -0700 | [diff] [blame] | 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |
| 2 | SRC_URI += "file://10-nice.conf" |
| 3 | |
Patrick Williams | 1976e31 | 2020-03-02 12:20:12 -0600 | [diff] [blame] | 4 | PACKAGECONFIG_remove = "\ |
| 5 | ${@bb.utils.contains('MACHINE_FEATURES', 'hw-rng', \ |
| 6 | 'libjitterentropy', '', d)}\ |
| 7 | " |
| 8 | |
William A. Kennington III | 1987be7 | 2019-05-16 01:05:58 -0700 | [diff] [blame] | 9 | inherit systemd |
| 10 | |
Brad Bishop | 57e15b1 | 2021-03-25 15:40:46 -0400 | [diff] [blame] | 11 | FILES_${PN} += "${systemd_system_unitdir}/rngd.service.d" |
William A. Kennington III | 1987be7 | 2019-05-16 01:05:58 -0700 | [diff] [blame] | 12 | |
| 13 | do_install_append() { |
Patrick Williams | 1976e31 | 2020-03-02 12:20:12 -0600 | [diff] [blame] | 14 | |
| 15 | # When using systemd and using libjitterentropy, install a config |
| 16 | # which runs rngd at a 'nice' priority. libjitterentropy uses a |
| 17 | # lot of CPU early on in the boot process and makes the whole boot |
| 18 | # go slower. |
William A. Kennington III | 1987be7 | 2019-05-16 01:05:58 -0700 | [diff] [blame] | 19 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
Patrick Williams | 1976e31 | 2020-03-02 12:20:12 -0600 | [diff] [blame] | 20 | if ${@bb.utils.contains('PACKAGECONFIG', 'libjitterentropy', 'true', 'false', d)}; then |
Brad Bishop | 57e15b1 | 2021-03-25 15:40:46 -0400 | [diff] [blame] | 21 | install -d ${D}${systemd_system_unitdir}/rngd.service.d |
Patrick Williams | 1976e31 | 2020-03-02 12:20:12 -0600 | [diff] [blame] | 22 | install -m 644 ${WORKDIR}/10-nice.conf \ |
Brad Bishop | 57e15b1 | 2021-03-25 15:40:46 -0400 | [diff] [blame] | 23 | ${D}${systemd_system_unitdir}/rngd.service.d |
Patrick Williams | 1976e31 | 2020-03-02 12:20:12 -0600 | [diff] [blame] | 24 | fi |
William A. Kennington III | 1987be7 | 2019-05-16 01:05:58 -0700 | [diff] [blame] | 25 | fi |
| 26 | } |