coreboot icon indicating copy to clipboard operation
coreboot copied to clipboard

Support updates via UEFI capsules

Open SergiiDmytruk opened this issue 1 year ago • 10 comments

Originally: capsule parsing and coalescing. Now: integration branch for UEFI capsules.

Other coreboot PRs merged into this one:

  • https://github.com/Dasharo/coreboot/pull/527
  • https://github.com/Dasharo/coreboot/pull/511
  • https://github.com/Dasharo/coreboot/pull/562
  • https://github.com/Dasharo/coreboot/pull/563

Related EDK PRs:

  • https://github.com/Dasharo/edk2/pull/131
  • https://github.com/Dasharo/edk2/pull/145
  • https://github.com/Dasharo/edk2/pull/147
  • https://github.com/Dasharo/edk2/pull/166
  • https://github.com/Dasharo/edk2/pull/167

SergiiDmytruk avatar May 18 '24 22:05 SergiiDmytruk

Fixed GUID of CapsuleUpdate* variables and an issue with coalesced capsule overwriting cbmem.

SergiiDmytruk avatar Jun 29 '24 22:06 SergiiDmytruk

Same story as https://github.com/Dasharo/coreboot/pull/527, but since this has better branch name, perhaps closing #527 and using this as a target would make more sense. In any case, there are comments that hasn't been marked as resolved (@miczyg1 ping), I won't close the other PR until then to not mess up with how GH shows the changes.

krystian-hebel avatar Jul 02 '24 12:07 krystian-hebel

The last force push apart from updating EDK revision (and rebasing on dasharo just to not lag behind) extends firmware information to include firmware size.

SergiiDmytruk avatar Jul 09 '24 17:07 SergiiDmytruk

Last force push:

  • rebase on newer dasharo
  • update EDK hash to point to https://github.com/Dasharo/edk2/pull/154
  • add buffer allocation fix in https://github.com/Dasharo/coreboot/pull/509/commits/e4fcc9be50795b13e7c5836cbc69dcd07d528499 (to be squashed later)
  • update EDK-related part of build system to enable capsules

SergiiDmytruk avatar Jul 24 '24 22:07 SergiiDmytruk

Force-push: rebase to squash and update one of commit messages, also sync top-most commit with the Gerrit.

SergiiDmytruk avatar Jul 30 '24 13:07 SergiiDmytruk

Force-push:

  • update EDK's commit hash
  • switch define from CAPSULE_ENABLE to CAPSULE_SUPPORT because that's what UefiPayloadPkg is using (despite tianocore's wiki) and that's how changes were sent upstream

SergiiDmytruk avatar Aug 24 '24 17:08 SergiiDmytruk

Force-push:

  • rebase
  • update EDK2 revision (see https://github.com/Dasharo/edk2/pull/147#issuecomment-2336841445)

SergiiDmytruk avatar Sep 08 '24 22:09 SergiiDmytruk

Force-push:

  • rebase (picks up boot logo for Q35)
  • resolve conflicts
  • point EDK revision at https://github.com/Dasharo/edk2/pull/166 so CI artifacts can be used to test it

SergiiDmytruk avatar Sep 19 '24 13:09 SergiiDmytruk

Force-push:

  • rebase
  • update revision of EDK2
  • squash coalescing fixes
  • make whole flash accessible to Fast SPI

SergiiDmytruk avatar Sep 24 '24 17:09 SergiiDmytruk

Force-push:

  • rebase
  • squash recent commits
  • update EDK2 revision

SergiiDmytruk avatar Sep 27 '24 21:09 SergiiDmytruk

@macpijan, you didn't update CONFIG_DRIVERS_EFI_MAIN_FW_VERSION in configs, was that intentional? The last byte should be changed to 0x80 for a release (so that release version is bigger than any RC version).

SergiiDmytruk avatar Nov 14 '24 18:11 SergiiDmytruk

@macpijan, you didn't update CONFIG_DRIVERS_EFI_MAIN_FW_VERSION in configs, was that intentional? The last byte should be changed to 0x80 for a release (so that release version is bigger than any RC version).

@SergiiDmytruk @krystian-hebel I was simply not aware of this being also needed right now.

If we need to fix it, we can still do it I guess.

macpijan avatar Nov 20 '24 20:11 macpijan

CI complains about it:

config.msi_ms7d25_ddr4: CONFIG_LOCALVERSION doesn't match CONFIG_DRIVERS_EFI_MAIN_FW_VERSION
                        v1.1.4 != v1.1.4-rc3 (0x01010403)
config.msi_ms7d25_ddr5: CONFIG_LOCALVERSION doesn't match CONFIG_DRIVERS_EFI_MAIN_FW_VERSION
                        v1.1.4 != v1.1.4-rc3 (0x01010403)
config.msi_ms7e06_ddr4: CONFIG_LOCALVERSION doesn't match CONFIG_DRIVERS_EFI_MAIN_FW_VERSION
                        v0.9.2 != v0.9.2-rc3 (0x00090203)
config.msi_ms7e06_ddr5: CONFIG_LOCALVERSION doesn't match CONFIG_DRIVERS_EFI_MAIN_FW_VERSION
                        v0.9.2 != v0.9.2-rc3 (0x00090203)

We don't rely on it in code and capsule updates should be fine, so it's not a hard requirement if there is any cost to updating configs again.

SergiiDmytruk avatar Nov 20 '24 22:11 SergiiDmytruk

I've updated the configs as a new rebase was needed anyway. When CI builds pass ~~this PR can be merged~~ https://github.com/Dasharo/edk2/pull/147 will have to be merged before this one, and it may also need a rebase...

krystian-hebel avatar Nov 21 '24 15:11 krystian-hebel

After consulting with Beata, I've restored this PR to msi_ms7d25_v1.1.4-rc3 with just a change to local version and CONFIG_DRIVERS_EFI_MAIN_FW_VERSION. The release tag is supposed to be put on it, however we would have to keep the branch (not safe, someone may remove it) or tag (safer) edk2 version that this PR points to. Otherwise, after rebasing https://github.com/Dasharo/edk2/pull/147 the hash will change, and it would be impossible to build this release. (This happened before, for Q35 v0.2.0, it can no longer be built from the release tag).

krystian-hebel avatar Nov 21 '24 17:11 krystian-hebel

(This happened before, for Q35 v0.2.0, it can no longer be built from the release tag).

Are you sure, seems to build? https://github.com/Dasharo/edk2/commit/11b26796145e29b2ceeb5a00b130f81246115159 is there and it's part of some branches/tags.

SergiiDmytruk avatar Nov 24 '24 23:11 SergiiDmytruk

Are you sure, seems to build? Dasharo/edk2@11b2679 is there and it's part of some branches/tags.

Huh, I must've be mistaken...

krystian-hebel avatar Nov 25 '24 14:11 krystian-hebel