Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
config BR2_PACKAGE_RNG_TOOLS
bool "rng-tools"
# pthread_setaffinity_np
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
depends on BR2_USE_MMU # libcap
select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL
select BR2_PACKAGE_LIBCAP
select BR2_PACKAGE_OPENSSL
help
Daemon to use hardware random number generators.
https://github.com/nhorman/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
select BR2_PACKAGE_LIBCURL
select BR2_PACKAGE_LIBXML2
help
Enable NIST Entropy Beacon support.
Entropy gathered from the NIST network entropy beacon. Note
that this entropy source is disabled by default as it should
never be used for cryptographic purposes, or any use case in
which random data should be known only by a single entity.
config BR2_PACKAGE_RNG_TOOLS_QRYPT
bool "Qrypt Entropy Beacon support"
select BR2_PACKAGE_JANSSON
select BR2_PACKAGE_LIBCURL
help
Enable Qrypt NIST-Beacon like entropy support.
Entropy gathered from Qrypt server based entropy beacons. Like
NIST, it should likely not be used directly in cryptographic
operation, as the entropy may be intercepted over a network,
but can provide copius amounts of entropy for non-crypto
purposes.
endif
comment "rng-tools needs a toolchain w/ NPTL"
depends on BR2_USE_MMU
depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL

48
package/rng-tools/S21rngd Normal file
View File

@@ -0,0 +1,48 @@
#!/bin/sh
NAME="rngd"
DAEMON="/usr/sbin/${NAME}"
DAEMON_ARGS=""
CFG_FILE="/etc/default/${NAME}"
PID_FILE="/var/run/${NAME}.pid"
# Read configuration variable file if it is present
[ -r "${CFG_FILE}" ] && . "${CFG_FILE}"
start()
{
printf "Starting ${NAME}: "
start-stop-daemon -S -q -x "${DAEMON}" -- ${DAEMON_ARGS}
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop()
{
printf "Stopping ${NAME}: "
# This daemon does not exit properly with the default TERM signal unless
# it's forced to work by something reading /dev/random. Killing it and
# removing its PID file is more straightforward.
if start-stop-daemon -K -q -s KILL -p "${PID_FILE}" -n "${NAME}"; then
rm -f "${PID_FILE}"
echo "OK"
else
echo "FAIL"
fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart|reload}" >&2
exit 1
;;
esac

View File

@@ -0,0 +1,3 @@
# Locally computed
sha256 4aa50994232da74499b60b3ebf79118e30a1943be375b7d931dcf18df5442fd3 rng-tools-6.17.tar.gz
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING

View File

@@ -0,0 +1,65 @@
################################################################################
#
# rng-tools
#
################################################################################
RNG_TOOLS_VERSION = 6.17
RNG_TOOLS_SITE = $(call github,nhorman,rng-tools,v$(RNG_TOOLS_VERSION))
RNG_TOOLS_LICENSE = GPL-2.0
RNG_TOOLS_LICENSE_FILES = COPYING
RNG_TOOLS_CPE_ID_VALID = YES
RNG_TOOLS_SELINUX_MODULES = rngd
RNG_TOOLS_DEPENDENCIES = host-pkgconf libcap openssl
# From git
RNG_TOOLS_AUTORECONF = YES
RNG_TOOLS_CONF_OPTS = --without-pkcs11
# Work around for uClibc or musl toolchains which lack argp_*()
# functions.
ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
RNG_TOOLS_CONF_ENV += LIBS="-largp $(TARGET_NLS_LIBS)"
RNG_TOOLS_DEPENDENCIES += argp-standalone $(TARGET_NLS_DEPENDENCIES)
endif
ifeq ($(BR2_PACKAGE_LIBRTLSDR),y)
RNG_TOOLS_DEPENDENCIES += librtlsdr
RNG_TOOLS_CONF_OPTS += --with-rtlsdr
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
else
RNG_TOOLS_CONF_OPTS += --without-nistbeacon
endif
ifeq ($(BR2_PACKAGE_RNG_TOOLS_QRYPT),y)
RNG_TOOLS_DEPENDENCIES += jansson libcurl
RNG_TOOLS_CONF_OPTS += --with-qrypt
else
RNG_TOOLS_CONF_OPTS += --without-qrypt
endif
define RNG_TOOLS_INSTALL_INIT_SYSV
$(INSTALL) -D -m 755 package/rng-tools/S21rngd \
$(TARGET_DIR)/etc/init.d/S21rngd
endef
define RNG_TOOLS_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/rng-tools/rngd.service \
$(TARGET_DIR)/usr/lib/systemd/system/rngd.service
endef
$(eval $(autotools-package))

View File

@@ -0,0 +1,9 @@
[Unit]
Description=Hardware RNG Entropy Gatherer Daemon
[Service]
ExecStart=/usr/sbin/rngd -f $DAEMON_ARGS
EnvironmentFile=-/etc/default/rngd
[Install]
WantedBy=multi-user.target