developer | 3be5f52 | 2023-11-14 14:02:54 +0800 | [diff] [blame] | 1 | # |
| 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 | |
| 8 | include $(TOPDIR)/rules.mk |
| 9 | |
| 10 | PKG_NAME:=jitterentropy-library |
| 11 | PKG_RELEASE:=3.4.1 |
| 12 | |
| 13 | PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) |
| 14 | PKG_SOURCE_PROTO:=git |
| 15 | PKG_SOURCE_URL:=https://github.com/smuellerDD/jitterentropy-library.git |
| 16 | PKG_SOURCE_VERSION:=eccabf2318c902285a8e3fbe7c2a7f84ab2e55ce |
| 17 | PKG_MIRROR_HASH:=08ccc536b7d291ce9715b746046b351710057a56c017b8c70a487f24c53392ba |
| 18 | |
| 19 | include $(INCLUDE_DIR)/package.mk |
| 20 | |
| 21 | define Package/jitterrng |
| 22 | SECTION:=Utilities |
| 23 | CATEGORY:=Utilities |
| 24 | TITLE:=JITTER |
| 25 | SUBMENU:=FIPS |
| 26 | endef |
| 27 | |
| 28 | define 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. |
| 31 | endef |
| 32 | |
| 33 | define 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 |
| 38 | endef |
| 39 | |
| 40 | define Package/jitterrng/install |
| 41 | $(CP) ./files/* $(1)/ |
| 42 | $(INSTALL_DIR) $(1)/usr/bin |
| 43 | $(CP) $(PKG_BUILD_DIR)/bin/* $(1)/usr/bin |
| 44 | endef |
| 45 | |
| 46 | $(eval $(call BuildPackage,jitterrng)) |