This is for testing build system changes and `capsule.sh` updates.
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I92de68aa4714c849e5da7cc51a4359dafcfb368a
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
The version is queried from EC and date there is parsed into a 32-bit
integer version (so two releases on the same day look identical). GUID,
LSV and size come from Kconfig options.
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: Icfa91b9d95b6a4d289a060fa4647b6e3c73a5e11
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
CONFI_DRIVERS_EFI_EC_FW_GUID is a counterpart of
CONFIG_DRIVERS_EFI_MAIN_FW_GUID but for EC. When
empty (the default), implies absence of EC or a method of updates other
than a dedicated capsule. The option's value is passed to EDK as
CAPSULE_EC_FW_GUID macro. Requires EC_DASHARO_EC to be able to query
EC's version.
CONFIG_EC_DASHARO_EC_UPDATE now depends on
CONFIG_DRIVERS_EFI_MAIN_FW_GUID being empty to avoid performing updates
in two different ways.
CONFIG_DRIVERS_EFI_EC_FW_LSV and CONFIG_DRIVERS_EFI_EC_FW_SIZE were
added mostly for completeness to match the information that's published
for the main firmware. They are exposed by coreboot as is and don't
need to be filled. However, CONFIG_DRIVERS_EFI_EC_FW_SIZE may be useful
to check that coreboot and EDK are in agreement about EC.
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: Ia6054440af41069e797675a027fe7548fcb097e8
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
"payloads/external/edk2: configure capsule updates" should have been
dropped when rebasing onto 2024.12, it introduces the duplicates.
Change-Id: Ia9950f38eec002e979e491d648f1520fbdb39e74
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>
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>
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>
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>
There was one outlier in this file.
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I3334d8eccaf64c57fc37580dce3d057938795427
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>
* 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>
* 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>
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>
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>
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>
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>
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>