Skip to contentSkip to conversation

chipsec: platform security assessment framework

PATCH Superseded Liwei Song 3 participants 5 messages Sep 28, 2021 – Sep 30, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Liwei Song

author
#0 lore raw

PATCH 1/1 chipsec: platform security assessment framework

Add chipsec, tools to dump or analyzing hardware, system firmware components, like PCH register, ioport or iomem configuration space.

---
 meta-oe/recipes-bsp/chipsec/chipsec_git.bb | 35 ++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 meta-oe/recipes-bsp/chipsec/chipsec_git.bb
meta-oe/recipes-bsp/chipsec/chipsec_git.bb new file +35 -0
new file mode 100644
index 000000000000..019a8f5f12b5
@@ -0,0 +1,35 @@
+SUMMARY = "CHIPSEC: Platform Security Assessment Framework"
+
+DESCRIPTION = "CHIPSEC is a framework for analyzing the security \
+               of PC platforms including hardware, system firmware \
+               (BIOS/UEFI), and platform components."
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=bc2d1f9b427be5fb63f6af9da56f7c5d"
+
+SRC_URI = "git://github.com/chipsec/chipsec.git;branch=master \
+          "
+
+SRCREV = "b2a61684826dc8b9f622a844a40efea579cd7e7d"
+
+COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
+
+S = "${WORKDIR}/git"
+EXTRA_OEMAKE = "CC='${CC}' LDFLAGS='${LDFLAGS}' CFLAGS='${CFLAGS}'"
+
+DEPENDS = "virtual/kernel nasm-native python3-setuptools-native"
+RDEPENDS:${PN} += "python3 python3-modules"
+
+inherit module distutils3
+
+do_compile:append() {
+	cd ${S}/drivers/linux
+	oe_runmake  KSRC=${STAGING_KERNEL_BUILDDIR}
+}
+
+do_install:append() {
+	cp ${S}/drivers/linux/chipsec.ko ${D}${PYTHON_SITEPACKAGES_DIR}/chipsec/helper/linux
+}
+
+FILES:${PN} += "/usr \
+"
Signature · 1 line
2.17.1
#1 lore raw
Quoted 36 lines · LiweiSong

Add chipsec, tools to dump or analyzing hardware, system firmware components, like PCH register, ioport or iomem configuration space.

---
  meta-oe/recipes-bsp/chipsec/chipsec_git.bb | 35 ++++++++++++++++++++++
  1 file changed, 35 insertions(+)

create mode 100644 meta-oe/recipes-bsp/chipsec/chipsec_git.bb

meta-oe/recipes-bsp/chipsec/chipsec_git.bb new file +21 -0
new file mode 100644
index 000000000000..019a8f5f12b5
@@ -0,0 +1,35 @@
+SUMMARY = "CHIPSEC: Platform Security Assessment Framework"
+
+DESCRIPTION = "CHIPSEC is a framework for analyzing the security \
+               of PC platforms including hardware, system firmware \
+               (BIOS/UEFI), and platform components."
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=bc2d1f9b427be5fb63f6af9da56f7c5d"
+
+SRC_URI = "git://github.com/chipsec/chipsec.git;branch=master \
+          "
+
+SRCREV = "b2a61684826dc8b9f622a844a40efea579cd7e7d"
+
+COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
+
+S = "${WORKDIR}/git"
+EXTRA_OEMAKE = "CC='${CC}' LDFLAGS='${LDFLAGS}' CFLAGS='${CFLAGS}'"
+
+DEPENDS = "virtual/kernel nasm-native python3-setuptools-native"
+RDEPENDS:${PN} += "python3 python3-modules"

meta-oe/recipes-bsp/chipsec/chipsec_git.bb line 31

Quoted 10 lines
meta-oe/recipes-bsp/chipsec/chipsec_git.bb new file +10 -0
+
+inherit module distutils3
+
+do_compile:append() {
+	cd ${S}/drivers/linux
+	oe_runmake  KSRC=${STAGING_KERNEL_BUILDDIR}
+}
+
+do_install:append() {
+	cp ${S}/drivers/linux/chipsec.ko ${D}${PYTHON_SITEPACKAGES_DIR}/chipsec/helper/linux

Please use install utility here, so we dont have to worry about mixing build user with target user perms etc.

meta-oe/recipes-bsp/chipsec/chipsec_git.bb line 35

Quoted 5 lines
meta-oe/recipes-bsp/chipsec/chipsec_git.bb new file +4 -0
+}
+
+FILES:${PN} += "/usr \
+"

hardcoding user here seems suboptimal, can we represent it using some form of bitbake variables e.g. prefix or exec_prefix etc ?

Quoted 10 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#93161): https://lists.openembedded.org/g/openembedded-devel/message/93161
Mute This Topic: https://lists.openembedded.org/mt/85920605/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#2 lore raw
Quoted 52 lines · Khem Raj
Quoted 36 lines · LiweiSong

Add chipsec, tools to dump or analyzing hardware, system firmware components, like PCH register, ioport or iomem configuration space.

---
  meta-oe/recipes-bsp/chipsec/chipsec_git.bb | 35 ++++++++++++++++++++++

  1 file changed, 35 insertions(+)

  create mode 100644 meta-oe/recipes-bsp/chipsec/chipsec_git.bb

meta-oe/recipes-bsp/chipsec/chipsec_git.bb new file +21 -0
new file mode 100644
index 000000000000..019a8f5f12b5
@@ -0,0 +1,35 @@
+SUMMARY = "CHIPSEC: Platform Security Assessment Framework"
+
+DESCRIPTION = "CHIPSEC is a framework for analyzing the security \
+               of PC platforms including hardware, system firmware \
+               (BIOS/UEFI), and platform components."
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=bc2d1f9b427be5fb63f6af9da56f7c5d"
+
+SRC_URI = "git://github.com/chipsec/chipsec.git;branch=master \
+          "
+
+SRCREV = "b2a61684826dc8b9f622a844a40efea579cd7e7d"
+
+COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
+
+S = "${WORKDIR}/git"
+EXTRA_OEMAKE = "CC='${CC}' LDFLAGS='${LDFLAGS}' CFLAGS='${CFLAGS}'"
+
+DEPENDS = "virtual/kernel nasm-native python3-setuptools-native"
+RDEPENDS:${PN} += "python3 python3-modules"

meta-oe/recipes-bsp/chipsec/chipsec_git.bb line 31

Quoted 10 lines
meta-oe/recipes-bsp/chipsec/chipsec_git.bb new file +10 -0
+
+inherit module distutils3
+
+do_compile:append() {
+    cd ${S}/drivers/linux
+    oe_runmake  KSRC=${STAGING_KERNEL_BUILDDIR}
+}
+
+do_install:append() {
+    cp ${S}/drivers/linux/chipsec.ko ${D}${PYTHON_SITEPACKAGES_DIR}/chipsec/helper/linux

Please use install utility here, so we dont have to worry about mixing build user with target user perms etc.

Quoted 7 lines

meta-oe/recipes-bsp/chipsec/chipsec_git.bb line 35

Quoted 5 lines
meta-oe/recipes-bsp/chipsec/chipsec_git.bb new file +4 -0
+}
+
+FILES:${PN} += "/usr \
+"

hardcoding user here seems suboptimal, can we represent it using some form of bitbake variables e.g. prefix or exec_prefix etc ?

Got it, will fix it in next version.

Thanks,
Liwei.

Quoted 11 lines
Quoted 11 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#93161): https://lists.openembedded.org/g/openembedded-devel/message/93161
Mute This Topic: https://lists.openembedded.org/mt/85920605/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#4 lore raw
Quoted 5 lines · Scott Murray
Quoted 3 lines · LiweiSong

Add chipsec, tools to dump or analyzing hardware, system firmware components, like PCH register, ioport or iomem configuration space.

Quoted 7 lines
Quoted 1 line

[snip]

This sounds like something that might be a better fit in meta-security?

Scott

After rereading the README of project a bit more, I think it would fit in meta-security aptly, Please send a patch to move it to meta-security since its already in meta-oe now.

Quoted 10 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#93181): https://lists.openembedded.org/g/openembedded-devel/message/93181
Mute This Topic: https://lists.openembedded.org/mt/85920605/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-