package/chipsec: new package
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 package/chipsec: new package
--- package/Config.in | 1 + ...ed-modules-instead-of-source-modules.patch | 27 +++++++++++++++++++ package/chipsec/Config.in | 19 +++++++++++++ package/chipsec/chipsec.hash | 3 +++ package/chipsec/chipsec.mk | 23 ++++++++++++++++ 5 files changed, 73 insertions(+) create mode 100644 package/chipsec/0001-search-for-compiled-modules-instead-of-source-modules.patch create mode 100644 package/chipsec/Config.in create mode 100644 package/chipsec/chipsec.hash create mode 100644 package/chipsec/chipsec.mk
package/Config.in +1 -0
@@ -2010,6 +2010,7 @@ endif endmenu menu "Security" + source "package/chipsec/Config.in" source "package/libapparmor/Config.in" source "package/libselinux/Config.in" source "package/libsemanage/Config.in"
package/chipsec/0001-search-for-compiled-modules-instead-of-source-modules.patch new file +27 -0
@@ -0,0 +1,27 @@ +From fd67e6878daec7abeef649bb687464c832a04ee6 Mon Sep 17 00:00:00 2001 +From: Tal Lubko <[email protected]> +Date: Wed, 22 Sep 2021 15:50:46 +0300 +Subject: [PATCH] search for compiled modules instead of source code modules + +change chipsec_main to search for compiled modules (PYCs) instead of +source code modules (PYs). +--- + chipsec_main.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/chipsec_main.py b/chipsec_main.py +index 1aa46ea..11cf9c6 100755 +--- a/chipsec_main.py ++++ b/chipsec_main.py +@@ -215,7 +215,7 @@ class ChipsecMain: + while len(subdirs) > 0: + subdirs.pop() + for modx in mod_fnames: +- if fnmatch.fnmatch( modx, '*.py' ) and not fnmatch.fnmatch( modx, '__init__.py' ): ++ if fnmatch.fnmatch( modx, '*.pyc' ) and not fnmatch.fnmatch( modx, '__init__.pyc' ): + self.load_module( os.path.join( dirname, modx ), self._module_argv ) + self.Loaded_Modules.sort() + +-- +2.17.1 +
package/chipsec/Config.in new file +19 -0
@@ -0,0 +1,19 @@ +config BR2_PACKAGE_CHIPSEC + bool "chipsec" + depends on BR2_LINUX_KERNEL + depends on BR2_PACKAGE_PYTHON3 + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_PYTHON_SETUPTOOLS # runtime + + help + CHIPSEC is a framework for analyzing the security of PC + platforms including hardware, system firmware (BIOS/UEFI), + and platform components. + + https://github.com/chipsec/chipsec + +comment "chipsec needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL + +comment "chipsec depends on python3" + depends on !BR2_PACKAGE_PYTHON3
package/chipsec/chipsec.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 0470326e00f66c91d751e9827d9e0050e3e4ac5b2bc7a9943a76381beda58162 chipsec-1.7.1.tar.gz +sha256 4c2ca80f4d3675a53a216a64d67e7b411a81a6e958defd248c6f1ecf44dc6607 COPYING
package/chipsec/chipsec.mk new file +23 -0
@@ -0,0 +1,23 @@ +################################################################################ +# +# chipsec +# +################################################################################ + +CHIPSEC_VERSION = 1.7.1 +CHIPSEC_SITE = $(call github,chipsec,chipsec,$(CHIPSEC_VERSION)) +CHIPSEC_SETUP_TYPE = setuptools +CHIPSEC_LICENSE = GPL-2.0 +CHIPSEC_LICENSE_FILES = LICENSE +CHIPSEC_DEPENDENCIES = linux +CHIPSEC_ENV = KSRC=$(LINUX_DIR) +CHIPSEC_BUILD_OPTS = build_ext -i + +CHIPSEC_POST_INSTALL_TARGET_HOOKS += CHIPSEC_INSTALL_LKM + +define CHIPSEC_INSTALL_LKM + $(INSTALL) -m 0644 -D $(@D)/chipsec/helper/linux/chipsec.ko \ + $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/chipsec/helper/linux +endef + +$(eval $(python-package))
Signature · 6 lines
2.17.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot