blob: ab6f528af781571b8e74877224f4fd77a999f141 [file] [log] [blame]
Patrick Williams12fc9392021-08-06 09:16:53 -05001FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
Patrick Williams12fc9392021-08-06 09:16:53 -05002PACKAGECONFIG:remove = "\
Patrick Williams1976e312020-03-02 12:20:12 -06003 ${@bb.utils.contains('MACHINE_FEATURES', 'hw-rng', \
4 'libjitterentropy', '', d)}\
5 "
6
Ed Tanous9936f862022-09-19 09:13:20 -07007SRC_URI += "file://10-nice.conf"
8
William A. Kennington III1987be72019-05-16 01:05:58 -07009inherit systemd
10
Patrick Williams12fc9392021-08-06 09:16:53 -050011do_install:append() {
Patrick Williams1976e312020-03-02 12:20:12 -060012 # 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 III1987be72019-05-16 01:05:58 -070016 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
Patrick Williams1976e312020-03-02 12:20:12 -060017 if ${@bb.utils.contains('PACKAGECONFIG', 'libjitterentropy', 'true', 'false', d)}; then
Brad Bishop57e15b12021-03-25 15:40:46 -040018 install -d ${D}${systemd_system_unitdir}/rngd.service.d
Patrick Williams1976e312020-03-02 12:20:12 -060019 install -m 644 ${WORKDIR}/10-nice.conf \
Brad Bishop57e15b12021-03-25 15:40:46 -040020 ${D}${systemd_system_unitdir}/rngd.service.d
Patrick Williams1976e312020-03-02 12:20:12 -060021 fi
William A. Kennington III1987be72019-05-16 01:05:58 -070022 fi
23}
Ed Tanous9936f862022-09-19 09:13:20 -070024
25FILES:${PN} += "${systemd_system_unitdir}/rngd.service.d"