summaryrefslogtreecommitdiffstats
path: root/documentation/ref-manual
diff options
context:
space:
mode:
authorVyacheslav Yurkov <uvv.mail@gmail.com>2021-11-02 14:56:14 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-07 10:44:52 +0000
commit683a7db46d8443d8a96081a20f80df176eef71f1 (patch)
treef19cecd6fdb22c57729ee64b87cfe0994421c829 /documentation/ref-manual
parentfdcbca09f8b458d91399c5ea5373ab210c8a195a (diff)
downloadpoky-683a7db46d8443d8a96081a20f80df176eef71f1.tar.gz
ref-manual: update overlayfs class
Describe how to use a generated helper service to set up a proper systemd dependency chain. (From yocto-docs rev: c8c1f7e852830dae4468da70e1ac732d7bbce06f) Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/ref-manual')
-rw-r--r--documentation/ref-manual/classes.rst16
1 files changed, 15 insertions, 1 deletions
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index 9b1ead66b3..5bc4472e34 100644
--- a/documentation/ref-manual/classes.rst
+++ b/documentation/ref-manual/classes.rst
@@ -1742,7 +1742,8 @@ Then you can specify writable directories on a recipe basis (e.g. in my-applicat
1742 1742
1743To support several mount points you can use a different variable flag. Assuming we 1743To support several mount points you can use a different variable flag. Assuming we
1744want to have a writable location on the file system, but do not need that the data 1744want to have a writable location on the file system, but do not need that the data
1745survives a reboot, then we could have a ``mnt-overlay.mount`` unit for a ``tmpfs`` file system. 1745survives a reboot, then we could have a ``mnt-overlay.mount`` unit for a ``tmpfs``
1746file system.
1746 1747
1747In your machine configuration:: 1748In your machine configuration::
1748 1749
@@ -1752,6 +1753,19 @@ and then in your recipe::
1752 1753
1753 OVERLAYFS_WRITABLE_PATHS[mnt-overlay] = "/usr/share/another-application" 1754 OVERLAYFS_WRITABLE_PATHS[mnt-overlay] = "/usr/share/another-application"
1754 1755
1756On a practical note, your application recipe might require multiple
1757overlays to be mounted before running to avoid writing to the underlying
1758file system (which can be forbidden in case of read-only file system)
1759To achieve that :ref:`overlayfs <ref-classes-overlayfs>` provides a ``systemd``
1760helper service for mounting overlays. This helper service is named
1761``${PN}-overlays.service`` and can be depended on in your application recipe
1762(named ``application`` in the following example) ``systemd`` unit by adding
1763to the unit the following::
1764
1765 [Unit]
1766 After=application-overlays.service
1767 Requires=application-overlays.service
1768
1755.. note:: 1769.. note::
1756 1770
1757 The class does not support the ``/etc`` directory itself, because ``systemd`` depends on it. 1771 The class does not support the ``/etc`` directory itself, because ``systemd`` depends on it.