Skip to content

Make capsule_cabinet work independently of buildsystem state - #725

Open
mkopec wants to merge 1083 commits into
dasharofrom
lvfs_script
Open

Make capsule_cabinet work independently of buildsystem state#725
mkopec wants to merge 1083 commits into
dasharofrom
lvfs_script

Conversation

@mkopec

@mkopec mkopec commented Jul 25, 2025

Copy link
Copy Markdown
Member

Extract the config from the capsule itself, to avoid depending on .config existing and being up to date.

This depends on edk2 basetools, these can be taken from the edk2 build tree, or specified as an env variable.

@mkopec
mkopec force-pushed the lvfs_script branch 4 times, most recently from 2f8cae4 to 225254c Compare July 25, 2025 14:27
@mkopec mkopec changed the title Capsule scripts: Make them work independently of buildsystem state Make capsule_cabinet work independently of buildsystem state Jul 25, 2025
@mkopec
mkopec force-pushed the lvfs_script branch 3 times, most recently from dc4919d to 02b92e1 Compare July 25, 2025 14:39
@mkopec
mkopec requested a review from filipleple July 25, 2025 14:44
@mkopec mkopec self-assigned this Jul 25, 2025
@mkopec
mkopec marked this pull request as ready for review July 25, 2025 14:44
filipleple
filipleple previously approved these changes Jul 29, 2025
Sets the MAINBOARD_FAMILY SMBIOS option to Not Applicable, to match
what the stock firmware does.

Upstream-Status: Pending
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
Changes:
- Enable SMM BWP - supported thanks to recent SMMSTORE fixes
- Show WiFi/BT enable option - for feature parity
- Disable console redirection to nonexistent serial port - speeds up
  booting significantly
- Increase CBMEM buffer size

Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
Set the s0ix_enable parameter in accordance with chosen sleep mode.

Upstream-Status: Pending
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
The VBT extracted from debugfs of a running system didn't work with the
FSP graphics init. Now with the appropriate version of a manually configured
VBT the FSP GFX init works and the EDK2 GOP driver is no longer
necessary.

Upstream-Status: Pending
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
Set the p2sb to hidden, since that's the state FSP leaves it in. This
resolves the "not found, hiding it" message in cbmem. Enable the IPU.

Upstream-Status: Pending
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
L3 cache is typically unified and shared across all logical CPUs.
The CPUID leaf 0x4 already reports the total cache size for such shared caches.

Multiplying L3 size by the number of cores sharing it results in an
inflated value that may exceed SMBIOS limits or be misinterpreted,
leading Windows and other OSes to report the L3 cache size as zero.

Upstream-Status: Pending
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>

@SergiiDmytruk SergiiDmytruk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I misunderstand the intend, the changes are incomplete. The script can't be used without .config in the current directory and it will mix configuration from .config and coreboot's config extracted from a capsule's payload.

Comment thread capsule_cabinet.sh
@@ -24,17 +27,6 @@ if [ ! -f .config ]; then
die "No '.config' file in current directory"
fi

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Existence of .config is checked here.

Comment thread capsule_cabinet.sh

capsule=$1
date=$(stat -c %w $capsule | cut -d ' ' -f 1)
vendor=$(cat .config | grep -e "CONFIG_VENDOR_.*=y" | cut -d '=' -f 1 | cut -d '_' -f 3- | awk '{ print tolower($0) }')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.config is used here.

SergiiDmytruk and others added 9 commits July 29, 2025 19:22
Updated OSFV used by this workflow requires at least Python 3.13.

Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: Id73ba9c581efb35e0872cc553217697fb664b0be
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
So we can group any checks in one place without causing a confusion.

Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I709fc05352e5eeb69a154661cf62b60dd3de3f3f
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
This results in fewer per-workflow entries on
https://github.com/Dasharo/coreboot/actions making the page more
readable.

Also don't fetch whole commit history, 2000 commits should be fine for
practically anything (we have less than a 1000 commits on top of
upstream at the moment).

Upstream-Status: Pending
Change-Id: Ica2ff8972121dba8de3e650fd045ede2763d6d29
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I60d1527f8bec4a7616566467fd2c173c95128d7b
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Upstream-Status: Pending
Change-Id: I90d931d7c1dbf36097644d49d24625206425a977
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Upstream-Status: Pending
Change-Id: Ie69105c10568932bcc3e946c8e5c3d179c1615d6
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I158946894466bee927c86359f9b9e200797b9581
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Add necessary code to support 4x1 bifurcation in M.2 NVMe slot
for Net Card 2. Create a new build variant supporting Net Card 2.

TEST=Boot Linux on ODROID H4 Ultra with Net Card 2 and run iperf
in all 4 ports from the Net Card 2.

Upstream-Status: Pending
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Fixes the issue with display not working in the firmware.
New FSP updated VBT definitions. Old VBTs no longer work with new FSP.
Update VBT so that it works with up to date ADL-N FSP.

TEST=Boot ODROID H4 Ultra with monitor plugged into all DP and HDMI
ports and observe boot logo on the screen.

Upstream-Status: Pending
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
mkopec and others added 27 commits January 23, 2026 15:33
Add functions: cbfs_unverified_area_get_size,
cbfs_unverified_area_get_type and cbfs_unverified_area_file_exists.

They allow for determining if a file exists in a specified unverified
region, as well as its type and size.

Upstream-Status: Pending
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
If Top-Swap based redundancy is enabled, the ACMs reside in the
BOOTBLOCK CBFS region of the flash. We need to handle this appropriately
in the ACM loading code.

Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
…gions

Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I1184990592abe1140e26959456c9ad4acba3089c
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
CBnT implementation requires that this be defined in cmos.layout, if the
CMOS option backend is used.

Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Per BTG BWG, they have to be included in the top-swap blocks.

Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
…cement in TS blocks

Enable CBnT for the Vault ADL-P series.

Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
… with TS

Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
To enable updates of microcode when slot B is active.

Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
This is needed to properly set addresses of objects located in the Top
Swap region of the flash, when Top Swap-based redundancy is enabled.

Upstream-Status: Pending
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Upstream-Status: Pending
Change-Id: I7803072aa0f04499c802c258d9b69ef27cd57227
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
…redudnancy enabled

Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: Id6bb4f2f6dff76cafca8636aa64ca45fd5ce66bb
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
…tmedia

Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I437818568cb1ae951a91c1de4a955ef21587cc9c
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I03e9d3fff221961921ecf08bb8b6eab3a71c5135
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
…edudnancy enabled

Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I944c18c41a103ae9c380d6102bd41394be6ad923
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: Ia7d91db301db4984e9662304045a12d193cc4e85
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I15021d070687259abcfe1930534a3910ef12867e
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I7eb8805c9e6c74d71ff0af0d98ad3e60670d684e
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I1406c21b7aeb6b97ac9e27ec487838855e4cfc24
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: Ib9cb65dc0fbb97dd401dac7fe190569a930eb19b
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: Ice02f181e23b18db105b6cf59374e3e80b37a29b
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I4fc08ebc834a676bd1782d4a77a85d483c7cd451
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: Ia09a6fc16cfa40374bb192f71dd6eeeb6fe299fe
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I1cf9e9b29b62f4b7418fead91ad5dc3f94954da1
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I1039c06dd19a671011f43a98d31a4273b094d2a5
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Extract the coreboot config from the capsule itself, in order to be able
to use the script on any coreboot capsules.

Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I49f2fb91423b912d98d55ca5e0e008b483d1322c
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
@mkopec
mkopec dismissed filipleple’s stale review August 25, 2026 08:05

The merge-base changed after approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.