[yocto] Recipe that creates empty /var/log directory is auto-mounted to /var/volatile/log

Randle, William C william.c.randle at intel.com
Mon May 9 08:17:26 PDT 2016


It happens in meta/recipes-core/initscripts. I don't know the history behind it, but the OE convention is to use /var/volatile, I believe mainly so that /var/volatile could be a RAMFS.

    -Bill

On Mon, 2016-05-09 at 10:02 -0400, Paul Knopf wrote:
I have a simple recipe that places files on the system.

-------------
do_install() {
  # create this directory, because our "normal" fstab file will mount a log partition to it.
  install -d ${D}/var/log
  install -d ${D}${sysconfdir}
  install -m 0644 ${WORKDIR}/fstab-normal ${D}${sysconfdir}/fstab
}
-------------

The fstab-normal file has an entry that mounts a partition to this created /var/log directory.

-------------
/dev/mmcblk0p3       /var/log             auto       defaults  0  0
-------------

However, when the package get's created, /var/log gets pointed to /var/volatile/log. Where is this happening, and why?

-------------
pknopf at ubuntu:~/Git/recipes/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/base-files-fstab-normal/1.0-r0/package$ tree
.
├── etc
│   └── fstab
└── var
    ├── log -> volatile/log
    └── volatile
        └── log

-------------

Thanks,
Paul Knopf
Software Engineer
Med X Change, Inc
pknopf at medxchange.com<mailto:pknopf at medxchange.com>

--
_______________________________________________
yocto mailing list
yocto at yoctoproject.org<mailto:yocto at yoctoproject.org>
https://lists.yoctoproject.org/listinfo/yocto

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160509/e5ce9f47/attachment.html>


More information about the yocto mailing list