Initial Commit
- initial default booting image
This commit is contained in:
37
package/tpm2-pkcs11/Config.in
Normal file
37
package/tpm2-pkcs11/Config.in
Normal file
@@ -0,0 +1,37 @@
|
||||
config BR2_PACKAGE_TPM2_PKCS11
|
||||
bool "tpm2-pkcs11"
|
||||
depends on !BR2_STATIC_LIBS # tpm2-tss
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
select BR2_PACKAGE_LIBYAML
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
select BR2_PACKAGE_SQLITE
|
||||
select BR2_PACKAGE_TPM2_TSS
|
||||
help
|
||||
A PKCS#11 interface for TPM2 hardware
|
||||
|
||||
https://github.com/tpm2-software/tpm2-pkcs11
|
||||
|
||||
if BR2_PACKAGE_TPM2_PKCS11
|
||||
|
||||
config BR2_PACKAGE_TPM2_PKCS11_PYTHON_TOOLS
|
||||
bool "Install python tools (tpm2_ptool)"
|
||||
depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-bcrypt, python-cryptography
|
||||
depends on BR2_PACKAGE_PYTHON3
|
||||
select BR2_PACKAGE_PYTHON_BCRYPT # runtime
|
||||
select BR2_PACKAGE_PYTHON_CRYPTOGRAPHY # runtime
|
||||
select BR2_PACKAGE_PYTHON_PYASN1 # runtime
|
||||
select BR2_PACKAGE_PYTHON_PYASN1_MODULES # runtime
|
||||
select BR2_PACKAGE_PYTHON_PYYAML # runtime
|
||||
select BR2_PACKAGE_PYTHON_TPM2_PYTSS # runtime
|
||||
select BR2_PACKAGE_PYTHON3_SQLITE # runtime
|
||||
help
|
||||
Enable Python-related tools (tpm2_ptool)
|
||||
|
||||
comment "python tools needs python3"
|
||||
depends on !BR2_PACKAGE_PYTHON3
|
||||
depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
|
||||
|
||||
endif
|
||||
|
||||
comment "tpm2-pkcs11 needs a toolchain w/ dynamic library, threads"
|
||||
depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
|
||||
3
package/tpm2-pkcs11/tpm2-pkcs11.hash
Normal file
3
package/tpm2-pkcs11/tpm2-pkcs11.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally computed:
|
||||
sha256 ce24aa5ec2471545576e892b6f64fd873a424371bbf9be4ca3a0e689ea11c9b7 tpm2-pkcs11-1.9.1.tar.gz
|
||||
sha256 793aa007f793458434d7cc60b1c827053a399308658b32fcaa6023802adc22e1 LICENSE
|
||||
67
package/tpm2-pkcs11/tpm2-pkcs11.mk
Normal file
67
package/tpm2-pkcs11/tpm2-pkcs11.mk
Normal file
@@ -0,0 +1,67 @@
|
||||
################################################################################
|
||||
#
|
||||
# tpm2-pkcs11
|
||||
#
|
||||
################################################################################
|
||||
|
||||
TPM2_PKCS11_VERSION = 1.9.1
|
||||
TPM2_PKCS11_SITE = https://github.com/tpm2-software/tpm2-pkcs11/releases/download/$(TPM2_PKCS11_VERSION)
|
||||
TPM2_PKCS11_LICENSE = BSD-2-Clause
|
||||
TPM2_PKCS11_LICENSE_FILES = LICENSE
|
||||
TPM2_PKCS11_DEPENDENCIES = host-pkgconf libyaml openssl sqlite tpm2-tss
|
||||
|
||||
TPM2_PKCS11_CONF_OPTS += \
|
||||
--disable-hardening \
|
||||
--disable-ptool-checks
|
||||
|
||||
# Fix tpm.c:746:5: error: 'for' loop initial declarations are only allowed in C99 mode
|
||||
# Fix implicit declaration of function 'strnlen'
|
||||
TPM2_PKCS11_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
|
||||
|
||||
# do not build man pages
|
||||
TPM2_PKCS11_CONF_ENV += ac_cv_prog_PANDOC=''
|
||||
|
||||
# tpm2-pkcs11 checks for tpm2-tools programs and errors out if not
|
||||
# found, even though they are only used by the (unused in Buildroot)
|
||||
# python-based tools
|
||||
TPM2_PKCS11_CONF_ENV += \
|
||||
ac_cv_prog_tpm2_createprimary=yes \
|
||||
ac_cv_prog_tpm2_create=yes \
|
||||
ac_cv_prog_tpm2_evictcontrol=yes \
|
||||
ac_cv_prog_tpm2_readpublic=yes \
|
||||
ac_cv_prog_tpm2_load=yes \
|
||||
ac_cv_prog_tpm2_loadexternal=yes \
|
||||
ac_cv_prog_tpm2_unseal=yes \
|
||||
ac_cv_prog_tpm2_encryptdecrypt=yes \
|
||||
ac_cv_prog_tpm2_sign=yes \
|
||||
ac_cv_prog_tpm2_getcap=yes \
|
||||
ac_cv_prog_tpm2_import=yes \
|
||||
ac_cv_prog_tpm2_changeauth=yes
|
||||
|
||||
ifeq ($(BR2_PACKAGE_P11_KIT),y)
|
||||
TPM2_PKCS11_DEPENDENCIES += p11-kit
|
||||
TPM2_PKCS11_CONF_OPTS += \
|
||||
--with-p11kitconfigdir=/usr/share/p11-kit/modules
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_TPM2_PKCS11_PYTHON_TOOLS),y)
|
||||
TPM2_PKCS11_DEPENDENCIES += python-tpm2-pytss
|
||||
|
||||
define TPM2_PKCS11_BUILD_TOOLS
|
||||
(cd $(@D)/tools; \
|
||||
$(PKG_PYTHON_SETUPTOOLS_ENV) \
|
||||
$(HOST_DIR)/bin/python setup.py build)
|
||||
endef
|
||||
TPM2_PKCS11_POST_BUILD_HOOKS += TPM2_PKCS11_BUILD_TOOLS
|
||||
|
||||
define TPM2_PKCS11_INSTALL_TARGET_TOOLS
|
||||
(cd $(@D)/tools; \
|
||||
$(PKG_PYTHON_SETUPTOOLS_ENV) \
|
||||
$(HOST_DIR)/bin/python setup.py install \
|
||||
$(PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS) \
|
||||
--root=$(TARGET_DIR))
|
||||
endef
|
||||
TPM2_PKCS11_POST_INSTALL_TARGET_HOOKS += TPM2_PKCS11_INSTALL_TARGET_TOOLS
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user