oe-chipsec.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Updates for CHIPSEC in LUV
@ 2017-07-06  0:52 Ricardo Neri
  2017-07-06  0:52 ` [PATCH 1/2] chipsec: run CHIPSEC without the -i option Ricardo Neri
  2017-07-06  0:52 ` [PATCH 2/2] chipsec: bump to v1.3.1 Ricardo Neri
  0 siblings, 2 replies; 3+ messages in thread
From: Ricardo Neri @ 2017-07-06  0:52 UTC (permalink / raw)
  To: chipsec

[-- Attachment #1: Type: text/plain, Size: 1212 bytes --]

Now that CHIPSEC v1.3.1 is out. It might be good to update LUV to use it.
These two patches deal with this.

While bumping to v1.3.1, one our patches to not include CHIPSEC
documentation needed a trivial update. Also, now CHIPSEC determines which
version of the Linux module it needs to build (32-bit or 64-bit) based on
the kernel running in the host machine. This makes cross-compiling
difficult. Thus, this change was reverted. Instead, we allow setup.py
determine the correct version.

Lastly, the CHIPSEC team has recommended to not run the tool with the -i
option as it may lead to spurious results. This is fixed.

Thanks and BR,
Ricardo

Ricardo Neri (2):
  chipsec: run CHIPSEC without the -i option
  chipsec: bump to v1.3.1

 ...issue-with-building-driver-on-32bit-syste.patch | 43 ++++++++++++++++++++++
 .../chipsec/0001-chipsec-do-not-ship-manual.patch  |  4 +-
 meta-luv/recipes-core/chipsec/chipsec/chipsec      |  2 +-
 meta-luv/recipes-core/chipsec/chipsec_git.bb       |  5 ++-
 4 files changed, 49 insertions(+), 5 deletions(-)
 create mode 100644 meta-luv/recipes-core/chipsec/chipsec/0001-Revert-fix-issue-with-building-driver-on-32bit-syste.patch

-- 
2.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] chipsec: run CHIPSEC without the -i option
  2017-07-06  0:52 [PATCH 0/2] Updates for CHIPSEC in LUV Ricardo Neri
@ 2017-07-06  0:52 ` Ricardo Neri
  2017-07-06  0:52 ` [PATCH 2/2] chipsec: bump to v1.3.1 Ricardo Neri
  1 sibling, 0 replies; 3+ messages in thread
From: Ricardo Neri @ 2017-07-06  0:52 UTC (permalink / raw)
  To: chipsec

[-- Attachment #1: Type: text/plain, Size: 1049 bytes --]

The CHIPSEC team has advised that running with the -i is not a good idea
as it may lead to invalid results. This option is used mainly for
debugging purposes when it is necessary to ignore the fact that CHIPSEC
does not recognize the platform on which it is running. In most cases
the platform will be known. Also, it is better to simply say that a
given platform is not supported rather than giving spurious results.

Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
---
 meta-luv/recipes-core/chipsec/chipsec/chipsec | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-luv/recipes-core/chipsec/chipsec/chipsec b/meta-luv/recipes-core/chipsec/chipsec/chipsec
index fa72e45..57b5819 100644
--- a/meta-luv/recipes-core/chipsec/chipsec/chipsec
+++ b/meta-luv/recipes-core/chipsec/chipsec/chipsec
@@ -6,4 +6,4 @@
 
 # The below is replaced with the python site packages path during
 # do_patch().
-python PYTHONPATH/chipsec_main.py -i -v
+python PYTHONPATH/chipsec_main.py -v
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] chipsec: bump to v1.3.1
  2017-07-06  0:52 [PATCH 0/2] Updates for CHIPSEC in LUV Ricardo Neri
  2017-07-06  0:52 ` [PATCH 1/2] chipsec: run CHIPSEC without the -i option Ricardo Neri
@ 2017-07-06  0:52 ` Ricardo Neri
  1 sibling, 0 replies; 3+ messages in thread
From: Ricardo Neri @ 2017-07-06  0:52 UTC (permalink / raw)
  To: chipsec

[-- Attachment #1: Type: text/plain, Size: 4391 bytes --]

Now that a new version of CHIPSEC is out, update our recipe accordingly.

Bumping to this version required a trivial update to one of the patches
that we carry.

Also, a new change in v1.3.1 buils the CHIPSEC Linux module based on the
architecture of the host system. This prevents cross-compilation. Thus,
revert such patch.

Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
---
 ...issue-with-building-driver-on-32bit-syste.patch | 43 ++++++++++++++++++++++
 .../chipsec/0001-chipsec-do-not-ship-manual.patch  |  4 +-
 meta-luv/recipes-core/chipsec/chipsec_git.bb       |  5 ++-
 3 files changed, 48 insertions(+), 4 deletions(-)
 create mode 100644 meta-luv/recipes-core/chipsec/chipsec/0001-Revert-fix-issue-with-building-driver-on-32bit-syste.patch

diff --git a/meta-luv/recipes-core/chipsec/chipsec/0001-Revert-fix-issue-with-building-driver-on-32bit-syste.patch b/meta-luv/recipes-core/chipsec/chipsec/0001-Revert-fix-issue-with-building-driver-on-32bit-syste.patch
new file mode 100644
index 0000000..1511bfa
--- /dev/null
+++ b/meta-luv/recipes-core/chipsec/chipsec/0001-Revert-fix-issue-with-building-driver-on-32bit-syste.patch
@@ -0,0 +1,43 @@
+From 24813411bf05b19e4a750be34f9d61833a8455e6 Mon Sep 17 00:00:00 2001
+From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
+Date: Wed, 5 Jul 2017 15:03:24 -0700
+Subject: [PATCH] Revert "fix issue with building driver on 32bit system
+ (#203)"
+
+This reverts commit 1c09ea5adad8d18bdcd9161214984ae6efec5be9.
+
+This fix can only work if the host machine is also the target machine.
+However, when cross-compiling, we cannot use uname to obtain the
+target architecture. Insted, allow the Makefile to use an externally
+defined variable.
+---
+ drivers/linux/Makefile | 12 +++++-------
+ 1 file changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/linux/Makefile b/drivers/linux/Makefile
+index 69e90e2..0766cd9 100644
+--- a/drivers/linux/Makefile
++++ b/drivers/linux/Makefile
+@@ -1,14 +1,12 @@
+ KERNEL_SRC_DIR ?= /lib/modules/`uname -r`/build
+ #KERNEL_SRC_DIR = /usr/src/android/3.0-mid
+ 
+-MACHINE ?= $(shell uname -m)
+-
+-ifeq (,$(filter %i686 %i386 %i586,$(MACHINE)))
+-	elf-size := elf64
+-	asm-path := amd64
++ifeq ($(ARCH),i386)
++elf-size := elf32
++asm-path := i386
+ else
+-	elf-size := elf32
+-	asm-path := i386
++elf-size := elf64
++asm-path := amd64
+ endif
+ 
+ chipsec-objs := chipsec_km.o $(asm-path)/cpu.o
+-- 
+2.13.0
+
diff --git a/meta-luv/recipes-core/chipsec/chipsec/0001-chipsec-do-not-ship-manual.patch b/meta-luv/recipes-core/chipsec/chipsec/0001-chipsec-do-not-ship-manual.patch
index 09fa941..f5659f3 100644
--- a/meta-luv/recipes-core/chipsec/chipsec/0001-chipsec-do-not-ship-manual.patch
+++ b/meta-luv/recipes-core/chipsec/chipsec/0001-chipsec-do-not-ship-manual.patch
@@ -25,10 +25,10 @@ index 89bcc91..fb0da43 100644
  install_requires = []
  extra_kw = {}
  
-@@ -155,7 +155,6 @@ if platform.system().lower() == "windows":
- elif platform.system().lower() == "linux":
+@@ -156,7 +156,6 @@ if platform.system().lower() == "windows":
      compression_source_files = []
      package_data["chipsec_tools.linux"] = ['*']
+     package_data["chipsec_tools.compression"] = ["*.c","*.h"]
 -    data_files = [(os.path.join("share","doc","chipsec"), ["chipsec-manual.pdf"])]
      for root, dir, path in os.walk( os.path.join( "chipsec_tools", "compression" ) ):
          for f in path:
diff --git a/meta-luv/recipes-core/chipsec/chipsec_git.bb b/meta-luv/recipes-core/chipsec/chipsec_git.bb
index 75d6b4f..da1b77d 100644
--- a/meta-luv/recipes-core/chipsec/chipsec_git.bb
+++ b/meta-luv/recipes-core/chipsec/chipsec_git.bb
@@ -12,10 +12,11 @@ SRC_URI = "git://github.com/chipsec/chipsec.git \
     file://0001-chipsec-building-for-32-bit-systems.patch \
     file://0001-chipsec-do-not-ship-manual.patch \
     file://0001-setup.py-give-CPU-architecture-to-the-driver-s-Makef.patch \
+    file://0001-Revert-fix-issue-with-building-driver-on-32bit-syste.patch \
     "
 
-SRCREV="45603c15e5dd5728551162dbad54c844d5d11f7e"
-PV="1.3.0"
+SRCREV="a82209970012e7835dc16f73af4b377f9f5329d7"
+PV="1.3.1"
 
 DEPENDS = "virtual/kernel python-core nasm-native python-setuptools-native"
 RDEPENDS_${PN} = "python python-shell python-stringold python-xml \
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-06  0:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-06  0:52 [PATCH 0/2] Updates for CHIPSEC in LUV Ricardo Neri
2017-07-06  0:52 ` [PATCH 1/2] chipsec: run CHIPSEC without the -i option Ricardo Neri
2017-07-06  0:52 ` [PATCH 2/2] chipsec: bump to v1.3.1 Ricardo Neri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).