mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
fdcbca09f8
commit
683a7db46d
@@ -1742,7 +1742,8 @@ Then you can specify writable directories on a recipe basis (e.g. in my-applicat
|
||||
|
||||
To support several mount points you can use a different variable flag. Assuming we
|
||||
want to have a writable location on the file system, but do not need that the data
|
||||
survives a reboot, then we could have a ``mnt-overlay.mount`` unit for a ``tmpfs`` file system.
|
||||
survives a reboot, then we could have a ``mnt-overlay.mount`` unit for a ``tmpfs``
|
||||
file system.
|
||||
|
||||
In your machine configuration::
|
||||
|
||||
@@ -1752,6 +1753,19 @@ and then in your recipe::
|
||||
|
||||
OVERLAYFS_WRITABLE_PATHS[mnt-overlay] = "/usr/share/another-application"
|
||||
|
||||
On a practical note, your application recipe might require multiple
|
||||
overlays to be mounted before running to avoid writing to the underlying
|
||||
file system (which can be forbidden in case of read-only file system)
|
||||
To achieve that :ref:`overlayfs <ref-classes-overlayfs>` provides a ``systemd``
|
||||
helper service for mounting overlays. This helper service is named
|
||||
``${PN}-overlays.service`` and can be depended on in your application recipe
|
||||
(named ``application`` in the following example) ``systemd`` unit by adding
|
||||
to the unit the following::
|
||||
|
||||
[Unit]
|
||||
After=application-overlays.service
|
||||
Requires=application-overlays.service
|
||||
|
||||
.. note::
|
||||
|
||||
The class does not support the ``/etc`` directory itself, because ``systemd`` depends on it.
|
||||
|
||||
Reference in New Issue
Block a user