How to read/write UEFI environment variables in application startup scripts for OTA dual-partition management?
Open
@bobm21 is already working on this.
Since May 15, 2025.
- Dominant language
- C
- Stars
- 145
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Description
We're implementing an OTA update system with A/B partition scheme on Jetson Orin NX (NVIDIA BSP). Need to:
- Use UEFI environment variables to track active partition (similar to Android's update_engine)
- Access these variables from userspace during:
Boot process (initramfs/early-boot scripts)
Application runtime (update management service)
Specific questions:
- What tools/APIs are recommended for UEFI variable access in Ubuntu userspace?
efivar CLI tool usage examples
Direct access via /sys/firmware/efi/efivars
Programmatic access using libefivar - How to ensure persistence of modified variables across reboots?
- What permissions/privileges are required (sudo vs. udev rules)?
- Any Orin-specific limitations for UEFI variable storage?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.