Skip to main content

U-Boot environment setter and getter from the C library libubootenv

Project description

UBootEnv package

This package offers a Python implementation of the well-known fw_setenv and fw_getenv commands, based on the C library libubootenv.

Features

  • Read and modify variables in the U-Boot environment
  • Erase variable values
  • Shadow writing to minimize write cycles

Usage

from ubootenv import UBootEnv

uenv = UBootEnv()
# Or specify a custom config path
uenv = UBootEnv("/etc/fw_env.config")

uenv.open()
var = uenv.get("foo")
print(var) # => None

uenv.set("foo", "bar")
var = uenv.get("foo")
print(var) # => b'bar'

# Use shadow writing, get method returns the shadow value
uenv.shadow("foo", "foo")
var = uenv.get("foo")
print(var) # => b'foo'

# Commit shadow values to disk
uenv.store()
uenv.close()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ubootenv-0.1.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ubootenv-0.1.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file ubootenv-0.1.1.tar.gz.

File metadata

  • Download URL: ubootenv-0.1.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for ubootenv-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3430069d09e5937e7b853edc0201011952ac301a41264b680fcd84744fcc9eb7
MD5 b9b4e3c1b7a3a5ee28997907bd317aa0
BLAKE2b-256 1b300dafd4ecf0e5ca5a3a81d02d3c8d8e90f9cad3ab5b7d666a51b0d3c02c17

See more details on using hashes here.

File details

Details for the file ubootenv-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ubootenv-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for ubootenv-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 55738962c25786f6a82ebe6699c97d0b170d86af1d29f9a6eaf10ec39ce1941c
MD5 af1e28d30b584a975711842930a540f6
BLAKE2b-256 14721e62f9c68839d50f0d250703131be5c643d79a607ef6f207fe0c18c70d8e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page