Skip to content

Commit bf08086

Browse files
committed
add utils::chipsec v1.13.20
1 parent 8b57e53 commit bf08086

File tree

4 files changed

+94
-0
lines changed

4 files changed

+94
-0
lines changed

recipes/utils/chipsec.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
inherit: ['python3::setuptools', 'python3::cext', make, patch]
2+
3+
metaEnvironment:
4+
PKG_VERSION: "1.13.20"
5+
PKG_LICENSE: "GPL-2.0-only"
6+
7+
depends:
8+
- tools:
9+
target-toolchain: host-compat-toolchain
10+
name: devel::nasm
11+
use: [tools]
12+
- kernel::linux-kmod-dist
13+
14+
checkoutSCM:
15+
scm: url
16+
url: ${GITHUB_MIRROR}/chipsec/chipsec/releases/download/${PKG_VERSION}/chipsec-${PKG_VERSION}.zip
17+
digestSHA256: b4ac10a4833f5132e040f92ed74d3f20b1dd1dd1ada81339775a61251a34a61a
18+
19+
checkoutDeterministic: True
20+
checkoutScript: |
21+
patchApplySeries $<@chipsec/*.patch@>
22+
23+
buildVars: [CC, LD]
24+
buildSetup: |
25+
export KSRC=${BOB_DEP_PATHS['kernel::linux-kmod-dist']}
26+
export CFLAGS="${CFLAGS} -Wno-error=missing-prototypes"
27+
buildTools: [nasm]
28+
buildScript: |
29+
python3BuildSetuptools $1
30+
31+
packageScript: |
32+
python3PackageTgt
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Pass CC and LD to the kernel module makefile to support cross compilation
2+
diff -Nurp a/setup.py b/setup.py
3+
--- a/setup.py 2026-01-31 00:44:59.000000000 +0100
4+
+++ b/setup.py 2026-03-16 08:33:04.873656735 +0100
5+
@@ -85,7 +85,8 @@ class build_ext(_build_ext):
6+
# We copy the drivers extension to the build directory.
7+
self.copy_tree(os.path.join('drivers', 'linux'), build_driver)
8+
# Run the makefile there.
9+
- subprocess.check_output(['make', '-C', build_driver])
10+
+ subprocess.check_output(['make', '-C', build_driver,
11+
+ "CC="+os.getenv('CC'), "LD="+os.getenv('LD')])
12+
# And copy the resulting .ko to the right place.
13+
# That is to the source directory if we are in 'develop' mode,
14+
# otherwise to the helper subdirectory in the build directory.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
diff -Nurp a/drivers/linux/chipsec_km.c b/drivers/linux/chipsec_km.c
2+
--- a/drivers/linux/chipsec_km.c 2026-01-31 00:44:59.000000000 +0100
3+
+++ b/drivers/linux/chipsec_km.c 2026-03-16 08:33:04.901657276 +0100
4+
@@ -258,6 +258,34 @@ typedef SMI_CONTEXT SMI_CTX, *PSMI_CTX;
5+
uint16_t *address // rdi
6+
);
7+
8+
+ uint32_t ReadPCICfg(
9+
+ uint8_t bus,
10+
+ uint8_t dev,
11+
+ uint8_t fun,
12+
+ uint8_t off,
13+
+ uint8_t len // 1, 2, 4 bytes
14+
+ );
15+
+
16+
+ void WritePCICfg(
17+
+ uint8_t bus,
18+
+ uint8_t dev,
19+
+ uint8_t fun,
20+
+ uint8_t off,
21+
+ uint8_t len, // 1, 2, 4 bytes
22+
+ uint32_t val
23+
+ );
24+
+
25+
+ void WriteIOPort(
26+
+ uint32_t value,
27+
+ uint16_t io_port,
28+
+ uint8_t len // 1, 2, 4 bytes
29+
+ );
30+
+
31+
+ uint32_t ReadIOPort(
32+
+ uint16_t io_port,
33+
+ uint8_t len // 1, 2, 4 bytes
34+
+ );
35+
+
36+
uint32_t
37+
ReadPCICfg(
38+
uint8_t bus,
39+
@@ -718,6 +746,8 @@ static loff_t memory_lseek(struct file *
40+
}
41+
42+
#ifdef EFI_NOT_READY
43+
+void print_stat(efi_status_t stat);
44+
+
45+
void print_stat(efi_status_t stat)
46+
{
47+
switch (stat) {

tests/buildall/recipes/all.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ depends:
193193

194194
- utils::acpica
195195
- utils::brtools
196+
- utils::chipsec
196197
- utils::cpio
197198
- utils::cryptsetup
198199
- utils::dmidecode

0 commit comments

Comments
 (0)