meta-somdevices: rng-tools: Execute rngd excluding jitter entropy generator to speed...
authorJosep Orga <jorga@somdevices.com>
Thu, 15 Apr 2021 17:09:56 +0000 (19:09 +0200)
committerJosep Orga <jorga@somdevices.com>
Thu, 15 Apr 2021 17:09:56 +0000 (19:09 +0200)
Signed-off-by: Josep Orga <jorga@somdevices.com>
recipes-somdevices/rng-tools/rng-tools/rngd.service [new file with mode: 0644]
recipes-somdevices/rng-tools/rng-tools_%.bbappend [new file with mode: 0644]

diff --git a/recipes-somdevices/rng-tools/rng-tools/rngd.service b/recipes-somdevices/rng-tools/rng-tools/rngd.service
new file mode 100644 (file)
index 0000000..544ec5b
--- /dev/null
@@ -0,0 +1,13 @@
+[Unit]
+Description=Hardware RNG Entropy Gatherer Daemon
+DefaultDependencies=no
+After=systemd-udev-settle.service
+Before=sysinit.target shutdown.target
+Conflicts=shutdown.target
+
+[Service]
+ExecStart=/usr/sbin/rngd -f -r /dev/hwrng -x 5
+SuccessExitStatus=66
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-somdevices/rng-tools/rng-tools_%.bbappend b/recipes-somdevices/rng-tools/rng-tools_%.bbappend
new file mode 100644 (file)
index 0000000..343f9b7
--- /dev/null
@@ -0,0 +1,10 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+PR = "somdevices.0"
+MAINTAINER = "SomDevices <somdevices@somdevices.com>"
+
+SRC_URI += " file://rngd.service \
+"
+
+do_install_append () {
+    install -m 0644 ${WORKDIR}/rngd.service ${D}${systemd_unitdir}/system/
+}
\ No newline at end of file