Skip to content

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

@wangkaijing-work

Description

@wangkaijing-work

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?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions