urng: add micro non-physical true RNG based on timing jitter
[openwrt/staging/lynxis.git] / package / system / urngd / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=urngd
4 PKG_RELEASE:=1
5
6 PKG_SOURCE_PROTO:=git
7 PKG_SOURCE_URL=https://github.com/ynezz/openwrt-urngd
8 PKG_SOURCE_DATE:=2019-05-27
9 PKG_SOURCE_VERSION:=41e4163b2e7f4c1c1f51cdfa487d6052ff859cf2
10 PKG_MIRROR_HASH:=303595b7ec7367264a159dbd26d1d18c7ee3cf5e10bab25a315a7ec621b80ab4
11
12 PKG_LICENSE:=GPL-2.0 BSD-3-Clause
13 PKG_LICENSE_FILES:=
14
15 PKG_BUILD_PARALLEL:=1
16
17 include $(INCLUDE_DIR)/package.mk
18 include $(INCLUDE_DIR)/cmake.mk
19
20 define Package/$(PKG_NAME)
21 SECTION:=utils
22 CATEGORY:=Base system
23 TITLE:=OpenWrt non-physical true random number generator based on timing jitter
24 DEPENDS:=+libubox
25 endef
26
27 define Package/$(PKG_NAME)/description
28 urngd is OpenWrt's micro non-physical true random number generator based on
29 timing jitter.
30
31 Using the Jitter RNG core, the rngd provides an entropy source that feeds into
32 the Linux /dev/random device if its entropy runs low. It updates the
33 /dev/random entropy estimator such that the newly provided entropy unblocks
34 /dev/random.
35
36 The seeding of /dev/random also ensures that /dev/urandom benefits from
37 entropy. Especially during boot time, when the entropy of Linux is low, the
38 Jitter RNGd provides a source of sufficient entropy.
39 endef
40
41 define Package/$(PKG_NAME)/install
42 $(INSTALL_DIR) $(1)/etc/init.d
43 $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
44 $(INSTALL_DIR) $(1)/sbin
45 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/sbin/$(PKG_NAME)
46 endef
47
48 $(eval $(call BuildPackage,$(PKG_NAME)))