rng-tools: Remove depndencies on hwrng

Delete dependency on dev-hwrng.device and systemd-udev-settle services
as they can be troublesome because difference devices may have different
devices to detect resulting in delayed boot.

do not run if included in a container image

Add EXTRA_ARGS via /etc/default/rng-tools e.g. if your device has
hw RNG then something like this

EXTRA_ARGS="-r /dev/hwrng"

You can also use drop-ins for enhacing systemd unit file from machine
layer via a bbappend and adding a fragment to systemd

/etc/systemd/system/rng-tools.service.d/10-hwrng.conf

where you can add

[Unit]
Requires=dev-hwrng.device
After=dev-hwrng.device

(From OE-Core rev: ab73f6e8efb97682441f012c41d35a549e899cce)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj
2022-08-22 18:47:05 -07:00
committed by Richard Purdie
parent e0c378d692
commit 0a095d4afb

View File

@@ -1,11 +1,9 @@
[Unit]
Description=Hardware RNG Entropy Gatherer Daemon
DefaultDependencies=no
After=systemd-udev-settle.service
Before=sysinit.target shutdown.target
Requires=dev-hwrng.device
After=dev-hwrng.device
Conflicts=shutdown.target
Before=sysinit.target shutdown.target
ConditionVirtualization=!container
[Service]
EnvironmentFile=-@SYSCONFDIR@/default/rng-tools