Skip to content

Add capsules V2 changes to dasharo-25.12#904

Open
SergiiDmytruk wants to merge 29 commits into
dasharo-25.12from
capsules-v2-25.12
Open

Add capsules V2 changes to dasharo-25.12#904
SergiiDmytruk wants to merge 29 commits into
dasharo-25.12from
capsules-v2-25.12

Conversation

@SergiiDmytruk
Copy link
Copy Markdown
Member

Many features were developed separately from dasharo on capsules-v2 branch, time to merge them into the main tree before doing releases with these features.

In addition to that:

ref: dsh-1166

Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: Id1b33912eb0172b430dbf3bf3073a823aee8d4d2
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
SergiiDmytruk and others added 20 commits May 24, 2026 19:09
This replaces CONFIG_EDK2_CAPSULE_ON_DISK_SUPPORT and
CONFIG_EDK2_SHOW_CAPSULE_REPORT to avoid proliferation of trivial
options which are always enabled together.  Most wouldn't show up
anywhere but build-system files.

Similarly switch from specifying individual PCDs for EDK to passing a
macro which will do the same but on the side of EDK.  There is no need
to bake this knowledge into coreboot's build system.

Change-Id: I603c08d07c325e4d05b86edb6667694a21212c1d
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Change-Id: Iaccb60dedad5ea089f297968e7c0778b052d87de
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Change-Id: I2b89e14e9e4d554945eb6bccdb03778e03a16f7e
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Integrate the functionality of capsule_cabinet.sh into capsule.sh.
Cabinets can now be created using `./capsule.sh create_cabinet
capsule.cap`. Prior functionality and calls of capsule.sh remain
unaffected.

Change-Id: I5c9a2aec62722a665aaef10634d729461dca64c9
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
Add a command that allows uploading built cabinets to LVFS.

Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
…RESS

The PCD flag has been obsoleted by recent changes that provide a
fallback mechanism in the graphical path in case the GOP is not
available (monitor is not plugged in)

Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: Iddfa6b6c4836ef3606e079a896b7b2e8da4ee715
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
Change-Id: I6af426d7fcb6eb4e403c995633127050bbef5028
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Upon detecting that sealed capsules are enabled:
 1. Force the use of test keys for signing a capsule with coreboot.rom
    and drivers.
 2. Wrap that capsule into another capsule signed with the user-supplied
    keys.
 3. Remove that first capsule.

Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I80f7870439d92a657df23a2740579e1bb246b18e
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
* include sizes in two log lines of is_good_capsule_head()
* spew addresses of SG blocks as they are processed

Change-Id: I002747dcc8330076745dca8dafde04105c707312
Upstream-Status: Pending
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
* This option prevents capsule.sh from generating capsules of a new kind
  to permit updates from a previous release.
* Set the option for MSI boards.

Change-Id: Ia87cb23c62f8b2296a332b3416367cb4ad931cee
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: Iedbcfcbca5c048774ae66cd4cf4566500cd615e8
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
If CapsuleRootKey.inc exists and CONFIG_EDK2_CAPSULES_V2 is set, copy
the file to EDK.  This needs to be done as part of coreboot's build
process because EDK's worktree doesn't exist right after cloning
coreboot and there is no way to initialize it without building coreboot.
This makes it impossible to provision EDK's key before the build without
coreboot knowing about it at some level.

Also reset DasharoPayloadPkg/CapsuleRootKey.inf in EDK if
CONFIG_EDK2_CAPSULES_V2 is enabled, like it's already done for logos.

Not adding the file to .gitignore so it's more visible to the user when
present.

Change-Id: I8b557c4ab239d61a5cef01928fda13b8417d54cb
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Change-Id: Ia9462cc4997dd04a17bc43d41fd3f8a08d318341
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
There was one outlier in this file.

Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I3334d8eccaf64c57fc37580dce3d057938795427
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
…ates

Check that `CONFIG_EDK2_CAPSULES_V2=y` is not added to
`CONFIG_DRIVERS_EFI_UPDATE_CAPSULES=y` without
`CONFIG_EDK2_CAPSULES_V2_TRANSITION=y`.

Check that `CONFIG_EDK2_CAPSULES_V2_TRANSITION=y` doesn't live longer
than one release cycle.

Check that `CONFIG_EDK2_CAPSULES_V2_TRANSITION=y` is not added to
`CONFIG_EDK2_CAPSULES_V2=y`.

Check that `CONFIG_EDK2_CAPSULES_V2_TRANSITION=y` is not removed.

Change-Id: I24a1fd41864983fff3f9dfa717a0e4a7505fecac
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
They will reused by upcoming changes.

Change-Id: Ie81e82f402e4c171f957a9b53b1e40dc559d19a4
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Takes a capsule and signing keys, unpacks the capsule, then packs it
back under a (likely) different name.

Two functions were borrowed from a script in OSFV.

Change-Id: I23157aaeedb4e1fdcfb10c5a0235acd571aa72b4
Upstream-Status: Inappropriate [Dasharo downstream]
Co-authored-by: Filip Gołaś <filip.golas@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
This allows bundling capsule.sh with gencap/ created by `capsule.sh box`
and use it standalone for resigning.

Change-Id: Ia36460ce4ab510b1719a2560594529304a0fe3f0
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Change-Id: I36bb570f2cf02c8f421298ef95e787cd91548d01
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
This option signifies missing implementation of tsc_freq_mhz() which
results in tsc_freq_mhz() from src/arch/x86/timestamp.c returning zero.
That zero in turn gets put into TIMESTAMP CBMEM table requiring payloads
and user-space tools to figure the frequency on their own.

Implement tsc_freq_mhz() to query timer frequency in coreboot, so it
gets reported downstream.

Change-Id: I88d1206c13f15a9f20c07b65dcec42ec614f7e6a
Upstream-Status: Pending
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
cbfstool invocations were concatenated one after another with no
separators resulting in an invocation error.

Add an empty line at the end of each invocation.

Change-Id: Ie6be3eb2264756500296f614896e170afc1c9cf0
Upstream-Status: Pending
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Enabling all supported components other than the compiler one as its
upstream version doesn't describe coreboot-specific patches.

Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: Ie2371bf3c79df1b2a3de6518c37d647bc5d1ca64
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: Icc2a74e208d5290090db528dd81ce0f711066061
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
The target didn't depend on the output directory, so the corresponding
recipe failed.

Upstream-Status: Pending
Change-Id: Ia409af3ff5d9763dec181d131f5fb5629b49f931
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
UEFI DBX keeps growing in size and we have enough UEFI variables to
start running out of space with 64 KiB of storage (with 4 blocks
available only one of them is used for data, then there is working area
and fault-tolerant area).

Double the SMMSTORE region in size to 512 KiB which triples amount of
space available for variables (so 192 KiB with DBX consuming 23.44 KiB).

Change-Id: Id3bcbcc2532b9a0f6865e2d109cb6c57435f89ea
Upstream-Status: Pending
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
SergiiDmytruk and others added 3 commits May 30, 2026 20:58
Change-Id: Ic0b5123eae7081f823b9e0f674238bef9946b54f
Upstream-Status: Pending
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Move the mountpoint to /tmp, where permissions should not be a an issue.

Upstream-Status: Inappropriate [Dasharo CI]
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
If a new defconfig was added between the previous and current tag, the
script failed with an error like this:

    fatal: path 'configs/config.gigabyte_mz33-ar1' exists on disk, but
    not in 'msi_ms7e06_v0.9.4'

Change-Id: Ic50dbfb5432cc59ec2ac9e14eb5296e08fe28da2
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
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.

2 participants