|
Veethree D7 SDK
|
As described in A/B update scheme, the D7 uses an A/B update scheme. To achieve that, the internal storage is paritioned such that applying an unstable software update cannot break a stable image.
The device uses:
For development purposes, the relevant partitions are just the application and persistent data partitions.
| A | B |
|---|---|
| /app | /app |
| /appdata | |
This is the partition where software updates will put your applications and service files. An application can create files in /app, but it is not recommended to try to persist data here.
Note: Only root can write to the /app partition. Applications that start via system services are run as root. This is, as well as the ownership of /app are subject to change in future releases.
The files will not be available when the next software update is applied because it will be using the partition from the next step in the A/B update scheme. Also, the current partition will be reformatted the next time a software update writes to the current step in the A/B update scheme.
It should also not be used for temporary files either. The /tmp directory is available and writable by applications and, on the release image, by the non-root user as well.
From this partition, /app/sys/etc is overlaid on top of /etc.
This partition is where applications should keep their persistent data. The partition is not formatted by software updates.
Note: Only root can write to the /appdata partition. Applications that start via system services are run as root. This is, as well as the ownership of /appdata are subject to change in future releases.
From this partition, /appdata/sys/etc is overlaid on top of /etc, which is why /etc is writable.
The /etc folder is part of a 3 way overlay.
In priority order:
The root file system is readonly on release images, so any path other than /etc, /app, /appdata and /tmp is readonly.
On development images, the rootfs is writable, but applications must not depend on that, as they will not function on release images.
On both the development and the release image there is a utility for checking which partition is currently active.
The utility needs root privileges, so on release images it should be run with sudo.
It can also reboot the device into a specific partition.
This will reboot the board immediately and boot using partition A.
This may be useful during debugging to make sure the board did not automatically change partitions due to a bug in a software update, or to boot into a specific partition to allow debugging a process.