package/chipsec: new package
Tal Lubko via buildroot buildroot 3 versions – New
Get series with b4
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
| 1/1 | package/chipsec: new packageDEVELOPERSindex 65240615b0..581eb3f272 100644--- a/DEVELOPERS+++ b/DEVELOPERS@@ -2599,6 +2599,9 @@ F: package/python-influxdb/ N: Sven Oliver Moll <[email protected]> F: package/most/ +N: Tal Lubko <[email protected]>+F: package/chipsec/+ N: Theo Debrouwere <[email protected]> F: board/beagleboardx15/ F: configs/beagleboardx15_defconfigdiff --git a/package/Config.in b/package/Config.inindex c23755a421..6c683aaa86 100644--- a/package/Config.in+++ b/package/Config.in@@ -2400,6 +2400,7 @@ endmenu menu "Security" source "package/apparmor/Config.in" source "package/checkpolicy/Config.in"+ source "package/chipsec/Config.in" source "package/ima-evm-utils/Config.in" source "package/optee-benchmark/Config.in" source "package/optee-client/Config.in"diff --git a/package/chipsec/0001-extend-modules-search-add-pycs.patch b/package/chipsec/0001-extend-modules-search-add-pycs.patchnew file mode 100644index 0000000000..3f783a109e--- /dev/null+++ b/package/chipsec/0001-extend-modules-search-add-pycs.patch@@ -0,0 +1,16 @@+diff --git a/chipsec_main.py b/chipsec_main.py+index 1aa46ea..5acb768 100755+--- a/chipsec_main.py++++ b/chipsec_main.py+@@ -215,8 +215,9 @@ 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' ):+- self.load_module( os.path.join( dirname, modx ), self._module_argv )++ if ((fnmatch.fnmatch( modx, '*.py' ) and not fnmatch.fnmatch( modx, '__init__.py' )) or++ (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()+ + def load_my_modules(self):diff --git a/package/chipsec/Config.in b/package/chipsec/Config.innew file mode 100644index 0000000000..839204301e--- /dev/null+++ b/package/chipsec/Config.in@@ -0,0 +1,37 @@+config BR2_PACKAGE_CHIPSEC+ bool "chipsec"+ depends on !BR2_PACKAGE_PYTHON # python3+ depends on BR2_USE_WCHAR # python3+ depends on BR2_TOOLCHAIN_HAS_THREADS # python3+ depends on BR2_USE_MMU # python3+ depends on !BR2_STATIC_LIBS # python3+ depends on BR2_i386 || BR2_x86_64 # supported only on x86/x86_64+ depends on BR2_LINUX_KERNEL+ select BR2_PACKAGE_PYTHON3++ 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 toolchain w/ wchar, threads, dynamic library"+ depends on BR2_USE_MMU+ depends on BR2_i386 || BR2_x86_64+ depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS++comment "chipsec needs a Linux kernel to be built"+ depends on BR2_USE_MMU+ depends on BR2_i386 || BR2_x86_64+ depends on !BR2_LINUX_KERNEL++comment "chipsec is not compatible with python"+ depends on BR2_USE_MMU+ depends on BR2_i386 || BR2_x86_64+ depends on BR2_PACKAGE_PYTHON++comment "chipsec depends on python3"+ depends on BR2_USE_MMU+ depends on BR2_i386 || BR2_x86_64+ depends on !BR2_PACKAGE_PYTHON3diff --git a/package/chipsec/chipsec.hash b/package/chipsec/chipsec.hashnew file mode 100644index 0000000000..a1f38304d1--- /dev/null+++ b/package/chipsec/chipsec.hash@@ -0,0 +1,3 @@+# Locally calculated+sha256 b13ad6f3923b2a38e9574cf150d60e947783663abcf93fb3672c9b2de47b6f63 chipsec-1.7.3.tar.gz+sha256 4c2ca80f4d3675a53a216a64d67e7b411a81a6e958defd248c6f1ecf44dc6607 COPYINGdiff --git a/package/chipsec/chipsec.mk b/package/chipsec/chipsec.mknew file mode 100644index 0000000000..e8b6b69a00--- /dev/null+++ b/package/chipsec/chipsec.mk@@ -0,0 +1,28 @@+################################################################################+#+# chipsec+#+################################################################################++CHIPSEC_VERSION = 1.7.3+CHIPSEC_SITE = $(call github,chipsec,chipsec,v$(CHIPSEC_VERSION))+CHIPSEC_SETUP_TYPE = setuptools+CHIPSEC_LICENSE = GPL-2.0+CHIPSEC_LICENSE_FILES = LICENSE+CHIPSEC_DEPENDENCIES = linux host-nasm++# needed in order to build chipsec's LKM against Buildroot's kernel+CHIPSEC_ENV = KSRC=$(LINUX_DIR)++# build command according to chipsec's manual (chipsec-manual.pdf)+CHIPSEC_BUILD_OPTS = build_ext -i++define CHIPSEC_INSTALL_LKM+ # chipsec's scripts search chipsec.ko in a non-standart location+ $(INSTALL) -m 0644 -D $(@D)/chipsec/helper/linux/chipsec.ko \+ $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/chipsec/helper/linux+endef++CHIPSEC_POST_INSTALL_TARGET_HOOKS += CHIPSEC_INSTALL_LKM++$(eval $(python-package))-- 2.17.1 | +0 -0 | 0 replies | |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Read the v3 thread →