blob: f625c85c361b913508ce1ffbcd531e983456780a [file] [log] [blame]
developer3be5f522023-11-14 14:02:54 +08001#
2# Copyright (C) 2023 Mediatek Ltd.
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=jitterentropy-library
11PKG_RELEASE:=3.4.1
12
13PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
14PKG_SOURCE_PROTO:=git
15PKG_SOURCE_URL:=https://github.com/smuellerDD/jitterentropy-library.git
16PKG_SOURCE_VERSION:=eccabf2318c902285a8e3fbe7c2a7f84ab2e55ce
17PKG_MIRROR_HASH:=08ccc536b7d291ce9715b746046b351710057a56c017b8c70a487f24c53392ba
18
19include $(INCLUDE_DIR)/package.mk
20
21define Package/jitterrng
22 SECTION:=Utilities
23 CATEGORY:=Utilities
24 TITLE:=JITTER
25 SUBMENU:=FIPS
26endef
27
28define Package/jitterrng/description
29 Jitterrng provide a noise source using CPU execution timing jitter.
30 In this package, we need getrawentropy binary to get noise source.
31endef
32
33define Build/Compile
34 mkdir -p $(PKG_BUILD_DIR)/bin
35 $(TARGET_CROSS)gcc \
36 $(PKG_BUILD_DIR)/tests/raw-entropy/recording_runtime_kernelspace/getrawentropy.c \
37 -o $(PKG_BUILD_DIR)/bin/getrawentropy
38endef
39
40define Package/jitterrng/install
41 $(CP) ./files/* $(1)/
42 $(INSTALL_DIR) $(1)/usr/bin
43 $(CP) $(PKG_BUILD_DIR)/bin/* $(1)/usr/bin
44endef
45
46$(eval $(call BuildPackage,jitterrng))