blob: ce5d7994b4b2d8b2f0f258b546f9fc797d124d6c [file] [log] [blame]
William A. Kennington IIIfb85bf92019-05-16 01:05:58 -07001FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2SRC_URI += "file://10-nice.conf"
3
Patrick Williamse60e3092020-03-02 12:20:12 -06004PACKAGECONFIG_remove = "\
5 ${@bb.utils.contains('MACHINE_FEATURES', 'hw-rng', \
6 'libjitterentropy', '', d)}\
7 "
8
William A. Kennington IIIfb85bf92019-05-16 01:05:58 -07009inherit systemd
10
11FILES_${PN} += "${systemd_unitdir}/system/rngd.service.d"
12
13do_install_append() {
Patrick Williamse60e3092020-03-02 12:20:12 -060014
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 IIIfb85bf92019-05-16 01:05:58 -070019 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
Patrick Williamse60e3092020-03-02 12:20:12 -060020 if ${@bb.utils.contains('PACKAGECONFIG', 'libjitterentropy', 'true', 'false', d)}; then
21 install -d ${D}${systemd_unitdir}/system/rngd.service.d
22 install -m 644 ${WORKDIR}/10-nice.conf \
23 ${D}${systemd_unitdir}/system/rngd.service.d
24 fi
William A. Kennington IIIfb85bf92019-05-16 01:05:58 -070025 fi
26}