NVIDIA / NVIDIA/edk2-nvidia

How to read/write UEFI environment variables in application startup scripts for OTA dual-partition management?

Open
#129 2 comments 2 reactions 1 assignee View on GitHub

@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:

  1. Use UEFI environment variables to track active partition (similar to Android's update_engine)
  2. Access these variables from userspace during:
    Boot process (initramfs/early-boot scripts)
    Application runtime (update management service)

Specific questions:

  1. 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
  2. How to ensure persistence of modified variables across reboots?
  3. What permissions/privileges are required (sudo vs. udev rules)?
  4. Any Orin-specific limitations for UEFI variable storage?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.