Skip to content

Commit e7ad631

Browse files
authored
Merge pull request #2 from zarhus/move-recipes
Added recipes from meta-dts-distro to meta-coreboot as part of migratiom
2 parents 0cac162 + 0ea7450 commit e7ad631

18 files changed

+369
-8
lines changed

.codespellrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[codespell]
22
exclude-file = .codespellx
3-
ignore-words-list = "FPT,FTP,fpt,ftp"
3+
ignore-words-list = FPT,FTP,fpt,ftp,crate

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ repos:
4646
args: [--fix]
4747

4848
- repo: https://github.com/priv-kweihmann/oelint-adv
49-
rev: 6.5.6
49+
rev: 6.6.2
5050
hooks:
5151
- id: oelint-adv
52-
args: [--rulefile=.oelint-ruleset.json, --hide=info, --quiet, --fix]
52+
args: [--rulefile=.oelint-ruleset.json, --hide=info, --quiet]
5353
name: Advanced oelint
5454
description: Based on the OpenEmbedded Styleguide and work done by oe-stylize-tool this module offers a (nearly) complete linter for bitbake-recipes.
5555
entry: oelint-adv

conf/layer.conf

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
BBPATH .= ":${LAYERDIR}"
22

33
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
4-
${LAYERDIR}/recipes-*/*/*.bbappend"
4+
${LAYERDIR}/recipes-*/*/*.bbappend \
5+
"
56

67
BBFILE_COLLECTIONS += "coreboot"
7-
BBFILE_PATTERN_dasharo = "^${LAYERDIR}/"
8-
BBFILE_PRIORITY_dasharo = "85"
8+
BBFILE_PATTERN_coreboot = "^${LAYERDIR}/"
9+
BBFILE_PRIORITY_coreboot = "85"
910

10-
LAYERVERSION_dasharo = "1"
11+
LAYERVERSION_coreboot = "1"
1112

12-
LAYERSERIES_COMPAT_meta-dasharo = "scarthgap master"
13+
LAYERSERIES_COMPAT_coreboot = "scarthgap master"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
require coreboot-utils.inc
2+
3+
SUMMARY = "Tool for manipulating CBFS file"
4+
5+
SRC_URI += " \
6+
git://review.coreboot.org/vboot.git;destsuffix=git/3rdparty/vboot;name=vboot;protocol=https;branch=main \
7+
"
8+
9+
SRCREV_vboot = "0c11187c755394683d1b75bdb103cb1959fa6d40"
10+
SRCREV_FORMAT = "vboot"
11+
12+
TARGET_CC_ARCH += "${LDFLAGS}"
13+
14+
EXTRA_OEMAKE = " \
15+
DESTDIR=\"${D}\" \
16+
PREFIX=\"${prefix}\" \
17+
"
18+
19+
INSANE_SKIP:${PN} = "textrel"
20+
21+
do_compile () {
22+
oe_runmake -C util/cbfstool cbfstool
23+
}
24+
25+
do_install () {
26+
install -d ${D}/${sbindir}
27+
install ${S}/util/${PN}/${PN} ${D}/${sbindir}
28+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
require coreboot-utils.inc
2+
3+
SUMMARY = "CBMEM parser to read e.g. timestamps and console log"
4+
5+
DEPENDS += "pciutils zlib"
6+
7+
EXTRA_OEMAKE = ' \
8+
DESTDIR="${D}" \
9+
PREFIX="${prefix}" \
10+
'
11+
12+
do_compile () {
13+
oe_runmake -C util/cbmem
14+
}
15+
16+
do_install () {
17+
oe_runmake -C util/cbmem install
18+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
DESCRIPTION = "coreboot tools"
2+
HOMEPAGE = "https://doc.coreboot.org/util.html"
3+
SECTION = "coreboot"
4+
5+
LICENSE = "LGPL-2.1-only"
6+
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
7+
8+
PV = "4.21+git${SRCPV}"
9+
10+
SRC_URI = " \
11+
git://github.com/Dasharo/coreboot.git;protocol=https;branch=dasharo-4.21\
12+
"
13+
14+
SRCREV = "d08d5eaa98b1204b5e665d3ae4f63fb6f84a0d77"
15+
16+
S = "${WORKDIR}/git"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
require coreboot-utils.inc
2+
3+
SUMMARY = "Dumps the RAM of a laptop's Embedded/Environmental Controller (EC)."
4+
5+
EXTRA_OEMAKE = ' \
6+
DESTDIR="${D}" \
7+
PREFIX="${prefix}" \
8+
'
9+
10+
do_compile () {
11+
oe_runmake -C util/ectool
12+
}
13+
14+
do_install () {
15+
oe_runmake -C util/ectool install
16+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 2c095fae49351a6be86934658e20de0e9f985061 Mon Sep 17 00:00:00 2001
2+
From: wkawka <[email protected]>
3+
Date: Fri, 16 Sep 2022 11:09:29 +0200
4+
Subject: [PATCH] Makefile: disable deprecated warnings as errors
5+
6+
Signed-off-by: wkawka <[email protected]>
7+
---
8+
Makefile | 2 +-
9+
1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+
diff --git a/Makefile b/Makefile
12+
index 7f38bd6b..e3615a11 100644
13+
--- a/Makefile
14+
+++ b/Makefile
15+
@@ -124,7 +124,7 @@ endif
16+
# Provide default CC and CFLAGS for firmware builds; if you have any -D flags,
17+
# please add them after this point (e.g., -DVBOOT_DEBUG).
18+
DEBUG_FLAGS := $(if ${DEBUG},-g -Og,-g -Os)
19+
-WERROR := -Werror
20+
+WERROR := -Werror -Wno-deprecated-declarations
21+
FIRMWARE_FLAGS := -nostdinc -ffreestanding -fno-builtin -fno-stack-protector
22+
COMMON_FLAGS := -pipe ${WERROR} -Wall -Wstrict-prototypes -Wtype-limits \
23+
-Wundef -Wmissing-prototypes -Wno-trigraphs -Wredundant-decls -Wshadow \
24+
--
25+
2.25.1
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
SUMMARY = "\
2+
Firmware utility tool, used to create, sign, and validate Chrome \
3+
OS images."
4+
5+
HOMEPAGE = "https://github.com/Dasharo/vboot"
6+
7+
LICENSE = "BSD-3-Clause"
8+
LIC_FILES_CHKSUM = "file://LICENSE;md5=562c740877935f40b262db8af30bca36"
9+
10+
DEPENDS += " \
11+
openssl \
12+
flashrom \
13+
"
14+
15+
PV = "1.0+git${SRCPV}"
16+
17+
SRC_URI = " \
18+
git://github.com/Dasharo/vboot.git;protocol=https;branch=dasharo \
19+
file://0001-Makefile-disable-deprecated-warnigs-as-errors.patch \
20+
"
21+
SRCREV = "dc68f9f1b56d92f76026dca490e79493599ff4cf"
22+
23+
S = "${WORKDIR}/git"
24+
25+
inherit pkgconfig
26+
27+
TARGET_CC_ARCH += "${LDFLAGS}"
28+
29+
RDEPENDS:${PN} += " \
30+
bash \
31+
"
32+
33+
EXTRA_OEMAKE = " \
34+
DESTDIR=\"${D}\" \
35+
PREFIX=\"${prefix}\"\
36+
"
37+
38+
INSANE_SKIP:${PN} = "textrel"
39+
40+
do_compile() {
41+
oe_runmake futil
42+
}
43+
44+
do_install() {
45+
# we only install futility binary and couple of scripts that are used by
46+
# dasharo-deploy script
47+
install -d ${D}/${sbindir}
48+
install -d ${D}/${bindir}
49+
install -m 755 ${S}/build/futility/futility ${D}/${bindir}
50+
install ${S}/scripts/image_signing/resign_firmwarefd.sh ${D}/${sbindir}
51+
install ${S}/scripts/image_signing/common_minimal.sh ${D}/${sbindir}
52+
install ${S}/scripts/image_signing/sign_firmware.sh ${D}/${sbindir}
53+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
require coreboot-utils.inc
2+
3+
SUMMARY = "Extract and dump Intel Firmware Descriptor information"
4+
5+
TARGET_CC_ARCH += "${LDFLAGS}"
6+
7+
EXTRA_OEMAKE = ' \
8+
DESTDIR="${D}" \
9+
PREFIX="${prefix}" \
10+
'
11+
12+
do_compile () {
13+
oe_runmake -C util/ifdtool
14+
}
15+
16+
do_install () {
17+
oe_runmake -C util/ifdtool install
18+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
require coreboot-utils.inc
2+
3+
SUMMARY = "Dump interesting things about Management Engine even if hidden"
4+
5+
DEPENDS += "pciutils zlib"
6+
7+
EXTRA_OEMAKE = ' \
8+
DESTDIR="${D}" \
9+
PREFIX="${prefix}" \
10+
'
11+
12+
TARGET_CFLAGS += "-I../../src/commonlib/bsd/include"
13+
14+
do_compile () {
15+
oe_runmake -C util/intelmetool
16+
}
17+
18+
do_install () {
19+
oe_runmake -C util/intelmetool install
20+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
require coreboot-utils.inc
2+
3+
SUMMARY = "\
4+
Converts the configuration DW0/1 registers value from an inteltool \
5+
dump to coreboot macros.\
6+
"
7+
8+
LIC_FILES_CHKSUM = "file://../../COPYING;md5=751419260aa954499f7abaabaa882bbe"
9+
10+
GO_IMPORT = "github.com/dasharo/coreboot/"
11+
12+
# we need to override SRC_URI from coreboot-utils.inc so it's unpacked in the
13+
# directory as expected by the go bbclass
14+
SRC_URI = " \
15+
git://github.com/dasharo/coreboot.git;protocol=https;branch=dasharo-4.21;destsuffix=${GO_IMPORT} \
16+
"
17+
18+
S = "${WORKDIR}/${GO_IMPORT}/util/intelp2m"
19+
20+
inherit goarch
21+
inherit go
22+
23+
do_compile() {
24+
export GOARCH="${TARGET_GOARCH}"
25+
26+
cd ${S}
27+
28+
go build -trimpath -v -o intelp2m
29+
}
30+
31+
do_install() {
32+
install -d ${D}/${sbindir}
33+
install ${S}/${PN} ${D}/${sbindir}
34+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
require coreboot-utils.inc
2+
3+
SUMMARY = "\
4+
Provides information about the Intel CPU/chipset hardware \
5+
configuration (register contents, MSRs, etc).\
6+
"
7+
8+
DEPENDS += "pciutils zlib"
9+
10+
EXTRA_OEMAKE = ' \
11+
DESTDIR="${D}" \
12+
PREFIX="${prefix}" \
13+
'
14+
15+
do_compile () {
16+
oe_runmake -C util/inteltool
17+
}
18+
19+
do_install () {
20+
oe_runmake -C util/inteltool install
21+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
require coreboot-utils.inc
2+
3+
SUMMARY = "Dumps chipset-specific MSR registers."
4+
DEPENDS += "pciutils"
5+
S = "${WORKDIR}/git/util/msrtool"
6+
export PREFIX = "${prefix}"
7+
inherit autotools-brokensep
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
require coreboot-utils.inc
2+
3+
SUMMARY = "Reads and writes coreboot parameters and displaying information from the coreboot table in CMOS/NVRAM. "
4+
5+
EXTRA_OEMAKE = ' \
6+
DESTDIR="${D}" \
7+
PREFIX="${prefix}" \
8+
'
9+
10+
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
11+
12+
do_compile () {
13+
oe_runmake -C util/nvramtool
14+
}
15+
16+
do_install () {
17+
oe_runmake -C util/nvramtool install
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
require coreboot-utils.inc
2+
3+
SUMMARY = "A user-space utility to detect Super I/O of a mainboard and provide detailed information about the register contents of the Super I/O. "
4+
5+
DEPENDS += "pciutils zlib"
6+
7+
EXTRA_OEMAKE = ' \
8+
DESTDIR="${D}" \
9+
PREFIX="${prefix}" \
10+
'
11+
12+
do_compile () {
13+
oe_runmake -C util/superiotool
14+
}
15+
16+
do_install () {
17+
oe_runmake -C util/superiotool install
18+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
SUMMARY = "Utility for generating TXE Secure Boot manifests"
2+
HOMEPAGE = "https://github.com/Dasharo/coreboot"
3+
4+
LICENSE = "GPL-2.0-only"
5+
LIC_FILES_CHKSUM = "\
6+
file://${WORKDIR}/git/LICENSES/GPL-2.0-only.txt;md5=5430828348d2cf7d4b5e8395f774a68e\
7+
"
8+
9+
DEPENDS += "wolfssl"
10+
11+
PV = "1.0+git${SRCPV}"
12+
13+
SRC_URI = "\
14+
git://github.com/Dasharo/coreboot.git;branch=dasharo;protocol=https\
15+
"
16+
17+
SRCREV = "4706227e009b758a1bebace99f5bfba431874d7a"
18+
19+
S = "${WORKDIR}/git/util/txesbmantool"
20+
21+
inherit pkgconfig
22+
23+
EXTRA_OEMAKE = ' \
24+
DESTDIR="${D}" \
25+
PREFIX="${prefix}" \
26+
'
27+
28+
do_configure:prepend(){
29+
export PKG_CONFIG_PATH="${STAGING_LIBDIR}/pkgconfig:${STAGING_DIR_HOST}/usr/lib/pkgconfig"
30+
}
31+
32+
do_compile:prepend() {
33+
export PKG_CONFIG_PATH="${STAGING_LIBDIR}/pkgconfig:${STAGING_DIR_HOST}/usr/lib/pkgconfig"
34+
}
35+
36+
do_install() {
37+
oe_runmake 'DESTDIR=${D}' install
38+
}
39+
40+
INSANE_SKIP:${PN} += "ldflags"
41+
42+
FILES:${PN} += "\
43+
${bindir}/txesbmantool\
44+
"

0 commit comments

Comments
 (0)