-
Notifications
You must be signed in to change notification settings - Fork 164
efivar: Add patch to support runtime variable persistence with file-based storage #1311
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
base: master
Are you sure you want to change the base?
Conversation
This patch adds support for persisting EFI variable changes on embedded boards that store variables in a file on the ESP partition rather than in dedicated hardware storage. Many embedded boards lack secure hardware storage (like RPMB) for EFI variables and instead store them in a file on the ESP. When using systemd-boot with file-based variable storage, runtime variable changes are lost on reboot since they only exist in memory. The upstream patch (pr-282.patch) implements automatic persistence by: - Detecting RTStorageVolatile and VarToFile EFI variables - Automatically writing variable changes back to the ESP file - Ensuring EFI variable modifications survive reboots This enables proper support for: - systemd-boot operations that rely on SetVariable at runtime - Boot loader variables (LoaderEntryDefault, LoaderEntryOneShot, etc.) - UEFI capsule updates that modify variables - Any runtime EFI variable changes that need to persist The patch is currently pending upstream review. Upstream-Status: Pending Signed-off-by: Shravan Kumar <shrkum@qti.qualcomm.com>
14e53fd to
bc5b964
Compare
| Date: Wed, 18 Jun 2025 22:37:04 +0300 | ||
| Subject: [PATCH] efivarfs: Update a file variable store On SetVariable RT | ||
|
|
||
| Upstream-Status: Pending |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tags should be at the end of the message. Also please replace Pending with a proper one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case the upstream status is backport
Upstream-Status: Backport [https://github.com/rhboot/efivar/commit/68daa04654acbe1bbaa17ebfc23c371b39e69c6b]
| @@ -0,0 +1,2 @@ | |||
| FILESEXTRAPATHS:prepend:qcom := "${THISDIR}/${PN}:" | |||
| SRC_URI:append:qcom = " file://pr-282.patch " | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer if this goes to OE-Core, there is nothing Qualcomm-specific in it. If it is rejected there, we will take it into this layer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codeshravan the pr is merged in upstream efivars repo.
I have created an issue enquiring about v40 release for efivars.
Once maintainer responds we can decide either to bump oe-core efivars to v40 or otherwise backport.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sbanerjee-quic @lumag based upon reply on issue:rhboot/efivar#291 we will take it forward
|
Raised PR on oe-core:openembedded/openembedded-core#111 |
Why? Have you read the readme? I don't think so. See https://github.com/openembedded/openembedded-core/blob/master/README.OE-Core.md#contributing |
|
@lumag I realized it later, I have sent the patch through email, and close the pull request on email. |
This patch adds support for persisting EFI variable changes on embedded boards that store variables in a file on the ESP partition rather than in dedicated hardware storage.
Many embedded boards lack secure hardware storage (like RPMB) for EFI variables and instead store them in a file on the ESP. When using systemd-boot with file-based variable storage, runtime variable changes are lost on reboot since they only exist in memory.
The upstream patch (pr-282.patch) implements automatic persistence by:
This enables proper support for:
The patch is currently pending upstream review.
Upstream-Status: Pending