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