Skip to content

U-Boot RB1: Add support for EFI firmware capsule updates via fwupdtool #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 14, 2025

Conversation

b49020
Copy link

@b49020 b49020 commented May 2, 2025

Enable support for EFI firmware capsule updates via fwupdtool on RB1 U-Boot. fwupd allows to perform over the air EFI firmware capsule updates. U-Boot script is updated to additionally build LVFS cabinet archive which can be deployed on RB1 using:

$ sudo fwupdtool install u-boot.cab

@b49020 b49020 changed the title debos: rootfs: Install fwupd U-Boot RB1: Add support for EFI firmware capsule updates via fwupdtool May 7, 2025
@b49020 b49020 marked this pull request as ready for review May 7, 2025 10:51
@b49020
Copy link
Author

b49020 commented May 7, 2025

@lool Just fyi.., marking this PR as ready for review as I am able to test EFI firmware capsule updates on RB1. Note that currently we only support updating U-Boot without dual A/B bank support.

Copy link
Contributor

@lool lool left a comment

Choose a reason for hiding this comment

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

Meh, I typed a long review comment after my misc other comments yesterday, but I'm not sure how I lost it, so this will be the short version instead :-)

I wish there would be:

  • a mini doc / update to some doc somewhere explaining how the capsule update stuff works for the RB1 using these binaries – right now it's only in the commit message
  • we need to address hardcoded ids in comments and assumptions/requirements somewhere

This is good to build for now as for us to play with capsule updates, I do think we need to write our plan on how we / others would implement capsule updates end-to-end, I believe we'll need a boot firmware "product" for that (I can think of a good person to lead that :D)

@b49020
Copy link
Author

b49020 commented May 9, 2025

Thanks @lool for your comments

This is good to build for now as for us to play with capsule updates, I do think we need to write our plan on how we / others would implement capsule updates end-to-end, I believe we'll need a boot firmware "product" for that (I can think of a good person to lead that :D)

Yeah this is really the next step we have to take to see how we can create a boot firmware product. Ideally we should upload the EFI capsule updates cabinet archive to https://fwupd.org/ for firmware updates to happen automatically via the fwupd daemon.

a mini doc / update to some doc somewhere explaining how the capsule update stuff works for the RB1 using these binaries – right now it's only in the commit message

Sure, it will work through the standard fwupd and LVFS stuff. The fwupdtool usage here is just to play around with things until we have a firmware distribution strategy ready.

we need to address hardcoded ids in comments and assumptions/requirements somewhere

I hope I addressed those but I agree with you that those should be documented. I can create a google document if you like but I would rather prefer finally that documentation to go alongside the boot firmware "product".

@lool
Copy link
Contributor

lool commented May 9, 2025

I hope I addressed those but I agree with you that those should be documented. I can create a google document if you like but I would rather prefer finally that documentation to go alongside the boot firmware "product".

Yup, your comments and intentions I think would address this; I guess for this pull request:

  • could you replace the GUID with a call to guidgen?
  • could you document assumptions either comments in the build-u-boot shell script, in README.md, or some other place public that we can patch in the future? I think it's ok to say this is a WIP implementation

@b49020
Copy link
Author

b49020 commented May 9, 2025

could you replace the GUID with a call to guidgen?

Let me see if I can parse that output (the format is quite complex) from guidgen tool and give that as an input in the script. Otherwise, if you agree I can document it that the guid gets generated using this command.

could you document assumptions either comments in the build-u-boot shell script, in README.md, or some other place public that we can patch in the future? I think it's ok to say this is a WIP implementation

Sure I can add proper comments and update README too.

@lool
Copy link
Contributor

lool commented May 9, 2025

could you replace the GUID with a call to guidgen?

Let me see if I can parse that output (the format is quite complex) from guidgen tool and give that as an input in the script. Otherwise, if you agree I can document it that the guid gets generated using this command.

Sure, we could document this instead of running the command (it's already a dependency though, so I thought it was elegant to use it, but fine with me either way :))

@ricardosalveti
Copy link

I hope I addressed those but I agree with you that those should be documented. I can create a google document if you like but I would rather prefer finally that documentation to go alongside the boot firmware "product".

We should probably use https://github.com/qualcomm-linux/qualcomm-linux.github.io to documentation for this (repo just created, need to setup the infra).

@b49020 b49020 force-pushed the sumit/fwupd branch 2 times, most recently from 74bd467 to 202f095 Compare May 13, 2025 05:51
@b49020
Copy link
Author

b49020 commented May 13, 2025

Updated PR with documentation around firmware updates, let me know if there are any further comments.

@lool
Copy link
Contributor

lool commented May 14, 2025

@b49020 Merging this now, you addressed comments, and the implementation didn't change after your statement that you had manually validated this.

b49020 added 3 commits May 14, 2025 15:47
fwupd allows to perform over the air EFI firmware capsule updates.

Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
U-Boot qcom-mainline branch now got support for EFI firmware capsule
updates. So let's add support to build EFI firmware capsule updates
using tooling provided by U-Boot as well as fwupdtool to generate LVFS
cabinet archive.

Once that's done, the EFI firmware capsule updates can be installed and
triggered on RB1 using fwupdtool as follows:

$ sudo fwupdtool install u-boot.cab

Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Document firmware updates for Qualcomm Linux Debian images. The devices
are expected to support UEFI firmware capsule updates. On the OS side,
the standard mechanism for firmware updates known as LVFS or fwupd is
leverage to update firmware on devices.

Note here that currently firmware for devices supported by Qualcomm
Linux isn't yet available/pushed on LVFS (WIP). Hence, the fwupdtool is
used currently for testing purposes.

Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
@lool lool merged commit 321612d into qualcomm-linux:main May 14, 2025
4 checks passed
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.

3 participants