nerves_runtime v0.6.4 Nerves.Runtime.KV
Key Value Storage for firmware vairables provided by fwup
KV provides access to metadata variables set by fwup. It can be used to obtain information such as the active firmware slot, where the application data partition is located, etc.
Values are stored in two ways.
Values that do not pertain to a specific firmware slot For example:
"nerves_fw_active" => "a"
Values that pertain to a specific firmware slot For Example:
"a.nerves_fw_author" => "The Nerves Team"
You can find values for just the active firmware slot by
using get_active and get_all_active. The result of these
functions will trim the firmware slot ("a."
or "b."
)
from the leading characters of the keys returned.
Technical Information
Nerves.Runtime.KV uses a non-replicated U-Boot environment block for storing firmware and provisioning information. It has the following format:
- CRC32 of bytes 4 through to the end
"<key>=<value>