4 Commits
Author SHA1 Message Date
Felix Fietkau 04d0bbcdc2 provision: add a backend for a GPT partition named provisioning
A device without UBI, such as an x86 VM or a device on eMMC, can keep its
provisioning data on a block partition named `provisioning`. The data
uses the same header as the UBI volume.

open() and create() prefer the UBI volume and then look for the partition
through the PARTNAME of each block device in sysfs. A commit checks the
flush, because close() reports no error. A partition cannot be removed
from here, so destroy erases the header and the data.

The provision command now exits with an error when a commit or a
destroy fails, for both backends.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-10-08 09:50:37 +02:00
Felix Fietkau 83e7914958 provision: name the create command in the not-found message
The message told the user to run "provision enable", but no such command
exists. The command that makes the partition is "provision create".

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-09-29 17:29:25 +02:00
Christian Marangi 6a88ab5685 provision: drop usage of AUTORELEASE
AUTORELEASE has been deprecated from a long time. Drop it and hardcode
the release following the current one present in the downloads
repository.

Link: https://github.com/openwrt/openwrt/pull/20586
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-10-29 21:09:55 +01:00
Felix Fietkau 5d40123818 provision: add script for managing device provisioning data
This is useful for keeping specific data on a device across factory reset.
It uses a separate partition (only UBI supported at the moment) to store
the data. The primary use case is storing sensitive data like cryptographic
keys for maintaining a device as part of a network.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-17 13:17:52 +01:00