Yocto has a lot of variables. In the following post I’ll outline some of the variables that are commonly used in recipies.
However, one could also loopup variables in the yocto reference guide:
| Variable | Origin | Description | Default-Value | Example usage | 
|---|---|---|---|---|
| ${S} | yocto | Location in build directory where unpacked resources reside | ${WORKDIR}/${BPN}-${PV} | - | 
| ${B} | yocto | Location of the build directory | ${WORKDIR}/${BP} | - | 
| ${D} | yocto | Image destination directory | ${WORKDIR}/image | |
| ${PV} | bitbake | Recipes version | - | python3_3.9.bb -> PV = 3.9 | 
| ${PN} | bitbake | Recipes name | - | python3_3.9.bb -> PN = python3 | 
| ${BPN} | yocto | Recipes name without prefix/suffix | - | python3-native_3.9.bb -> BPN = python | 
| ${BP} | yocto | Recipes name without prefix/suffix plux version | ${BPN}-${PV} | python3-native_3.9.bb -> BP = python-3.9 | 
| ${SRC_URI} | bitbake | List of source files | - | SRC_URI = “https://golang.org/dl/go${PV}.src.tar.gz;name=main” | 
| ${SRCREV} | bitbake | Source revision | - | SRCREV = “095f59ca464220eae285de6b5f2ee31185a6a84c” |