Bump our recipe for CHIPSEC v1.2.5+. While here, drop three patches that are not longer needed as these changes are already present in the CHIPSEC source code. Also, update the path of chipsec_main.py with its new location for the LUV runner script. The version is renamed as v1.2.5+ as it includes CHIPSEC v1.2.5 plus all the changes present in its repository available at the time of writing this patch. Signed-off-by: Ricardo Neri --- ...utilize-inode_lock-unlock-wrappers-for-ne.patch | 44 ---------------------- ...up-install-cores-library-under-helper-lin.patch | 31 --------------- meta-luv/recipes-core/chipsec/chipsec_git.bb | 12 +++--- 3 files changed, 5 insertions(+), 82 deletions(-) delete mode 100644 meta-luv/recipes-core/chipsec/chipsec/0002-chipsec_km-utilize-inode_lock-unlock-wrappers-for-ne.patch delete mode 100644 meta-luv/recipes-core/chipsec/chipsec/chipsec-setup-install-cores-library-under-helper-lin.patch diff --git a/meta-luv/recipes-core/chipsec/chipsec/0002-chipsec_km-utilize-inode_lock-unlock-wrappers-for-ne.patch b/meta-luv/recipes-core/chipsec/chipsec/0002-chipsec_km-utilize-inode_lock-unlock-wrappers-for-ne.patch deleted file mode 100644 index 486c0f6..0000000 --- a/meta-luv/recipes-core/chipsec/chipsec/0002-chipsec_km-utilize-inode_lock-unlock-wrappers-for-ne.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 69f6b51a0291cc49854b5125aac7ebbb576a73a3 Mon Sep 17 00:00:00 2001 -From: Ricardo Neri -Date: Thu, 2 Jun 2016 09:46:45 -0700 -Subject: [PATCH] chipsec_km: utilize inode_lock/unlock wrappers for new - kernels - -As of v4.5, wrappers to lock and unlock the inode's mutex were -introduced. This change is useful to leverage future changes in the -implementation of inode locking. For instance, a new change coming in -Linux v4.7-rc1 changed the i_node locking mechanism from using a mutex -to a rw sempahore. - -Signed-off-by: Ricardo Neri ---- - source/drivers/linux/chipsec_km.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/source/drivers/linux/chipsec_km.c b/source/drivers/linux/chipsec_km.c -index e76f6a9..f2d8332 100644 ---- a/source/drivers/linux/chipsec_km.c -+++ b/source/drivers/linux/chipsec_km.c -@@ -535,6 +535,9 @@ static loff_t memory_lseek(struct file * file, loff_t offset, int orig) - //Older kernels (<20) uses f_dentry instead of f_path.dentry - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) - mutex_lock(&file->f_dentry->d_inode->i_mutex); -+//As of v4.5, use the wrappers inode_lock/unlock -+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0) -+ inode_lock(file->f_path.dentry->d_inode); - #else - mutex_lock(&file->f_path.dentry->d_inode->i_mutex); - #endif -@@ -556,6 +559,9 @@ static loff_t memory_lseek(struct file * file, loff_t offset, int orig) - //Older kernels (<20) uses f_dentry instead of f_path.dentry - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) - mutex_unlock(&file->f_dentry->d_inode->i_mutex); -+//As of v4.5, use the wrappers inode_lock/unlock -+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0) -+ inode_unlock(file->f_path.dentry->d_inode); - #else - mutex_unlock(&file->f_path.dentry->d_inode->i_mutex); - #endif --- -2.8.3 - diff --git a/meta-luv/recipes-core/chipsec/chipsec/chipsec-setup-install-cores-library-under-helper-lin.patch b/meta-luv/recipes-core/chipsec/chipsec/chipsec-setup-install-cores-library-under-helper-lin.patch deleted file mode 100644 index 979a3e7..0000000 --- a/meta-luv/recipes-core/chipsec/chipsec/chipsec-setup-install-cores-library-under-helper-lin.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 7693ec8b167a1b82b58d997f79640048e4e896b5 Mon Sep 17 00:00:00 2001 -From: Ricardo Neri -Date: Mon, 14 Dec 2015 07:23:36 -0800 -Subject: [PATCH] chipsec: setup: install cores library under helper/linux - -Simply setting 'cores' in the constructor of Extension causes the library -to be installed under the root of the package. However, the helper.py module -expects to find it under [package-root]/helper/linux. Thus, install the library -where helper.py can find it. - -Signed-off-by: Ricardo Neri ---- - source/tool/setup.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/source/tool/setup.py b/source/tool/setup.py -index 7dce743..66a74d5 100644 ---- a/source/tool/setup.py -+++ b/source/tool/setup.py -@@ -49,7 +49,7 @@ if platform.system().lower() == "windows": - - if platform.system().lower() == "linux": - data_files = [] -- extensions = [ Extension('cores', sources=['chipsec/helper/linux/cores.c']) ] -+ extensions = [ Extension('chipsec.helper.linux.cores', sources=['chipsec/helper/linux/cores.c']) ] - - version = "" - VERSION_FILE = os.path.join( os.path.dirname( __file__ ),'VERSION' ) --- -1.9.1 - diff --git a/meta-luv/recipes-core/chipsec/chipsec_git.bb b/meta-luv/recipes-core/chipsec/chipsec_git.bb index 1365da2..5755e4e 100644 --- a/meta-luv/recipes-core/chipsec/chipsec_git.bb +++ b/meta-luv/recipes-core/chipsec/chipsec_git.bb @@ -9,13 +9,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=8c16666ae6c159876a0ba63099614381" SRC_URI = "git://github.com/chipsec/chipsec.git \ file://0001-drivers-linux-Do-not-host-system-s-kernel-source-dir.patch \ file://chipsec file://luv-parser-chipsec \ - file://fix-setup.py-for-Linux.patch \ - file://chipsec-setup-install-cores-library-under-helper-lin.patch \ file://0001-chipsec-building-for-32-bit-systems.patch \ - file://0002-chipsec_km-utilize-inode_lock-unlock-wrappers-for-ne.patch" + " -SRCREV="20cc5a30675548a764dadfe0dc677a283816906c" -PV="1.2.2" +SRCREV="2fbb7a4eeb3752998dfbcbdf771cd3f8ed1985ae" +PV="1.2.5+" DEPENDS = "virtual/kernel python-core nasm-native python-setuptools-native" RDEPENDS_${PN} = "python python-shell python-stringold python-xml \ @@ -51,8 +49,8 @@ DISTUTILS_INSTALL_ARGS = "--root=${D}${PYTHON_SITEPACKAGES_DIR} \ --install-data=${D}/${datadir}" fix_mod_path() { - sed -i -e "s:^INSTALL_MOD_PATH_PREFIX = .*:INSTALL_MOD_PATH_PREFIX = \"${PYTHON_SITEPACKAGES_DIR}\":" ${S}/source/tool/chipsec_main.py - sed -i -e "s:PYTHONPATH:${PYTHON_SITEPACKAGES_DIR}:" ${WORKDIR}/chipsec + sed -i -e "s:^INSTALL_MOD_PATH_PREFIX = .*:INSTALL_MOD_PATH_PREFIX = \"${PYTHON_SITEPACKAGES_DIR}\":" ${S}/chipsec_main.py + sed -i -e "s:PYTHONPATH:${PYTHON_SITEPACKAGES_DIR}/chipsec:" ${WORKDIR}/chipsec } fix_kernel_source_dir() { -- 2.7.4