Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: yegorslists at googlemail.com <yegorslists@googlemail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/rng-tools: add jitterentropy library option
Date: Tue,  8 Dec 2020 15:53:38 +0100	[thread overview]
Message-ID: <20201208145338.29199-1-yegorslists@googlemail.com> (raw)

From: Yegor Yefremov <yegorslists@googlemail.com>

Add a menu entry to enable/disable jitterentropy library. Make it
enabled by default to preserve the old behavior.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 package/rng-tools/Config.in    | 12 +++++++++++-
 package/rng-tools/rng-tools.mk |  9 ++++++++-
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/package/rng-tools/Config.in b/package/rng-tools/Config.in
index 25b41f40d6..67e3d4185b 100644
--- a/package/rng-tools/Config.in
+++ b/package/rng-tools/Config.in
@@ -3,7 +3,6 @@ config BR2_PACKAGE_RNG_TOOLS
 	# pthread_setaffinity_np
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
 	select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL
-	select BR2_PACKAGE_JITTERENTROPY_LIBRARY
 	select BR2_PACKAGE_LIBSYSFS
 	select BR2_PACKAGE_OPENSSL
 	help
@@ -13,6 +12,17 @@ config BR2_PACKAGE_RNG_TOOLS
 
 if BR2_PACKAGE_RNG_TOOLS
 
+config BR2_PACKAGE_RNG_TOOLS_JITTERENTROPY_LIBRARY
+	bool "Jitterentropy Library support"
+	default y
+	select BR2_PACKAGE_JITTERENTROPY_LIBRARY
+	help
+	  Enable Jitterentropy Library support.
+
+	  The Jitter RNG provides a noise source using the CPU
+	  execution timing jitter. It does not depend on any
+	  system resource other than a high-resolution time stamp.
+
 config BR2_PACKAGE_RNG_TOOLS_NISTBEACON
 	bool "NIST Entropy Beacon support"
 	select BR2_PACKAGE_JANSSON
diff --git a/package/rng-tools/rng-tools.mk b/package/rng-tools/rng-tools.mk
index 3baddb98ee..8a971de5e9 100644
--- a/package/rng-tools/rng-tools.mk
+++ b/package/rng-tools/rng-tools.mk
@@ -8,7 +8,7 @@ RNG_TOOLS_VERSION = 6.10
 RNG_TOOLS_SITE = $(call github,nhorman,$(RNG_TOOLS_NAME),v$(RNG_TOOLS_VERSION))
 RNG_TOOLS_LICENSE = GPL-2.0
 RNG_TOOLS_LICENSE_FILES = COPYING
-RNG_TOOLS_DEPENDENCIES = libsysfs jitterentropy-library host-pkgconf openssl
+RNG_TOOLS_DEPENDENCIES = libsysfs host-pkgconf openssl
 # From git
 RNG_TOOLS_AUTORECONF = YES
 
@@ -28,6 +28,13 @@ else
 RNG_TOOLS_CONF_OPTS += --without-rtlsdr
 endif
 
+ifeq ($(BR2_PACKAGE_RNG_TOOLS_JITTERENTROPY_LIBRARY),y)
+RNG_TOOLS_DEPENDENCIES += jitterentropy-library
+RNG_TOOLS_CONF_OPTS += --enable-jitterentropy
+else
+RNG_TOOLS_CONF_OPTS += --disable-jitterentropy
+endif
+
 ifeq ($(BR2_PACKAGE_RNG_TOOLS_NISTBEACON),y)
 RNG_TOOLS_DEPENDENCIES += jansson libcurl libxml2
 RNG_TOOLS_CONF_OPTS += --with-nistbeacon
-- 
2.17.0

             reply	other threads:[~2020-12-08 14:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08 14:53 yegorslists at googlemail.com [this message]
2021-01-02  9:43 ` [Buildroot] [PATCH] package/rng-tools: add jitterentropy library option Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201208145338.29199-1-yegorslists@googlemail.com \
    --to=yegorslists@googlemail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox