[PATCH 7/9] chipsec: bump to v1.2.5+
Ricardo Neri <[email protected]> Fri, 10 Mar 2017 15:36:19 -0800
| Newsgroups | dev.linux.lists.oe-chipsec |
|---|---|
| Message-ID | <1489188981-23886-8-git-send-email-ricardo.neri-calderon@linux.intel.com> |
--===============0987937840226542500== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 <[email protected]> --- ...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-u= tilize-inode_lock-unlock-wrappers-for-ne.patch delete mode 100644 meta-luv/recipes-core/chipsec/chipsec/chipsec-setup-ins= tall-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/chi= psec/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_l= ock-unlock-wrappers-for-ne.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 69f6b51a0291cc49854b5125aac7ebbb576a73a3 Mon Sep 17 00:00:00 2001 -From: Ricardo Neri <[email protected]> -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 <[email protected]> ---- - 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/chip= sec_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 >=3D 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 >=3D 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-co= res-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-lib= rary-under-helper-lin.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 7693ec8b167a1b82b58d997f79640048e4e896b5 Mon Sep 17 00:00:00 2001 -From: Ricardo Neri <[email protected]> -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 modu= le -expects to find it under [package-root]/helper/linux. Thus, install the li= brary -where helper.py can find it. - -Signed-off-by: Ricardo Neri <[email protected]> ---- - 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() =3D=3D "windows": - = - if platform.system().lower() =3D=3D "linux": - data_files =3D [] -- extensions =3D [ Extension('cores', sources=3D['chipsec/helper/linux/= cores.c']) ] -+ extensions =3D [ Extension('chipsec.helper.linux.cores', sources=3D['= chipsec/helper/linux/cores.c']) ] - = - version =3D "" - VERSION_FILE =3D 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/recipe= s-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 =3D "file://LICENSE;md5=3D8c16666ae6c159= 876a0ba63099614381" SRC_URI =3D "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=3D"20cc5a30675548a764dadfe0dc677a283816906c" -PV=3D"1.2.2" +SRCREV=3D"2fbb7a4eeb3752998dfbcbdf771cd3f8ed1985ae" +PV=3D"1.2.5+" = DEPENDS =3D "virtual/kernel python-core nasm-native python-setuptools-nati= ve" RDEPENDS_${PN} =3D "python python-shell python-stringold python-xml \ @@ -51,8 +49,8 @@ DISTUTILS_INSTALL_ARGS =3D "--root=3D${D}${PYTHON_SITEPAC= KAGES_DIR} \ --install-data=3D${D}/${datadir}" = fix_mod_path() { - sed -i -e "s:^INSTALL_MOD_PATH_PREFIX =3D .*:INSTALL_MOD_PATH_PREFIX = =3D \"${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 =3D .*:INSTALL_MOD_PATH_PREFIX = =3D \"${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 --===============0987937840226542500==--