[yocto] Read-only filesystems: Move directory to RW directory and symlink back

Lukasz Zemla Lukasz.Zemla at woodward.com
Thu Apr 11 12:55:41 PDT 2019


On Tuesday, March 26, 2019 9:54 PM, Timothy Froehlich wrote:
> Is there a recommended way of doing this? Right now I have a ROOTFS_POSTPROCESS_CMD 
> that moves the directories and symlinks them back, but I'm not sure if I'm doing it exactly right or if there's something built-in.

> The function just does a bunch of this:
>    install -d ${D}/${persist_dir}

>    mv ${D}/${ORIG} ${D}/${persist_dir}/${LINKNAME}
>    ln -sr ${D}/${persist_dir}/${LINKNAME} ${D}/${ORIG}

I am also working on read-only rootfs now. Unfortunately it looks like that Yocto does not provide ready solution for symlinking. I use similar approach to yours.
If you accept bind mounts or overlayfs, you may have a look at meta/recipes-core/volatile-binds/volatile-binds.bb

Best regards,
Lukasz Zemla

***
The information in this email is confidential and intended solely for the individual or entity to whom it is addressed.  If you have received this email in error please notify the sender by return e-mail, delete this email, and refrain from any disclosure or action based on the information.
***


More information about the yocto mailing list