meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
sw:yocto:bitbake:vars [2022/10/25 13:35] niziaksw:yocto:bitbake:vars [2026/03/05 19:45] (current) niziak
Line 37: Line 37:
 palmqtdir ${palmtopdir}         /usr/lib/opie palmqtdir ${palmtopdir}         /usr/lib/opie
 </code> </code>
 +
 +
 +====== get current layer dir ======
 +
 +For ''layer.conf'' scope there is [[https://docs.yoctoproject.org/ref-manual/variables.html#term-LAYERDIR|LAYERDIR}]] variable. But this variable is not exported outside.
 +
 +Trick is to define own new variable in ''layer.conf'' which is available in recipes:
 +
 +<code>
 +MY_DISTRO_LAYER_BASE = '${@os.path.normpath("${LAYERDIR}")}'
 +</code>
 +
 +and use in recipe or distro.conf:
 +<code>
 +OVERLAYFS_ETC_INIT_TEMPLATE = "${MY_DISTRO_LAYER_BASE}/files/myboard-overlayfs-preinit.sh.in"
 +</code>
 +