init src 1d072180a

This commit is contained in:
michael
2024-06-17 20:39:36 +08:00
commit 75e64c9ee9
10624 changed files with 617016 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
config BR2_PACKAGE_HAVEGED
bool "haveged"
depends on BR2_USE_MMU # fork()
help
The haveged project is an attempt to provide an easy-to-use,
unpredictable random number generator based upon an adaptation
of the HAVEGE algorithm.
http://www.issihosts.com/haveged/
+23
View File
@@ -0,0 +1,23 @@
#!/bin/sh
case "$1" in
start)
printf "Starting haveged: "
start-stop-daemon -S -x /usr/sbin/haveged -- -w 1024 -r 0
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
printf "Stopping haveged: "
start-stop-daemon -K -x /usr/sbin/haveged
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
restart|reload)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
+3
View File
@@ -0,0 +1,3 @@
# Locally calculated
sha256 d17bd22fa1745daca5ac72e014ed3b0fe5720da4c115953124b1bf2a0aa2b04b haveged-1.9.13.tar.gz
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING
+27
View File
@@ -0,0 +1,27 @@
################################################################################
#
# haveged
#
################################################################################
HAVEGED_VERSION = 1.9.13
HAVEGED_SITE = $(call github,jirka-h,haveged,v$(HAVEGED_VERSION))
HAVEGED_LICENSE = GPL-3.0+
HAVEGED_LICENSE_FILES = COPYING
HAVEGED_SELINUX_MODULES = entropyd
ifeq ($(BR2_sparc_v8)$(BR2_sparc_leon3),y)
HAVEGED_CONF_OPTS += --enable-clock_gettime=yes
endif
define HAVEGED_INSTALL_INIT_SYSV
$(INSTALL) -m 755 -D package/haveged/S21haveged \
$(TARGET_DIR)/etc/init.d/S21haveged
endef
define HAVEGED_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/haveged/haveged.service \
$(TARGET_DIR)/usr/lib/systemd/system/haveged.service
endef
$(eval $(autotools-package))
+22
View File
@@ -0,0 +1,22 @@
[Unit]
# inspiration from upstream init.d/service.fedora
Description=Entropy Daemon based on the HAVEGE algorithm
Documentation=man:haveged(8) http://www.issihosts.com/haveged/
DefaultDependencies=no
# This would wait for filesystems, but we only need /dev/random, which
# is certainly available after systemd initialised
# After=systemd-tmpfiles-setup-dev.service
Before=sysinit.target shutdown.target systemd-journald.service
[Service]
ExecStart=/usr/sbin/haveged -w 1024 -v 1 --Foreground
Restart=always
SuccessExitStatus=137 143
# Only simple isolation methods that don't pull in dependencies
CapabilityBoundingSet=CAP_SYS_ADMIN
SecureBits=noroot-locked
ProtectSystem=full
[Install]
WantedBy=sysinit.target