TIL - Yocto bitbake-getvar
TIL, Today I Learned, is more of a "I just figured this out: here are my notes, you may find them useful too" rather than a full blog post
Writing recipes for Yocto has recently become something I do several times a week. All tools that help you with debugging is allways appreciated, and one such tool I found recently is bitbake-getvar that came with the Honister release of Yocto.
It is part of the bitbake suite and will give you variable values for a certain recipe, both unexpanded and expanded.
For example
builder@b4a399a9615f:/build$ bitbake-getvar -r imx-atf EXTRA_OEMAKE
#
# $EXTRA_OEMAKE [6 operations]
# set /work/layers/poky/meta/conf/bitbake.conf:553
# ""
# :prepend[task-compile] /work/layers/poky/meta/conf/bitbake.conf:606
# "${PARALLEL_MAKE} "
# :prepend[task-install] /work/layers/poky/meta/conf/bitbake.conf:610
# "${PARALLEL_MAKEINST} "
# set /work/layers/poky/meta/conf/documentation.conf:167
# [doc] "Additional GNU make options."
# append /work/layers/meta-freescale/recipes-bsp/imx-atf/imx-atf_2.4.bb:26
# " CROSS_COMPILE="${TARGET_PREFIX}" PLAT=${ATF_PLATFORM} "
# :append[sm2s-imx8mm] /work/layers/meta-msc/recipes-bsp/imx-atf/imx-atf_2.4.bbappend:9
# " IMX_BOOT_UART_BASE="${IMX_BOOT_UART_BASE}" "
# pre-expansion value:
# " CROSS_COMPILE="${TARGET_PREFIX}" PLAT=${ATF_PLATFORM} IMX_BOOT_UART_BASE="${IMX_BOOT_UART_BASE}" "
EXTRA_OEMAKE=" CROSS_COMPILE=\"aarch64-imx8evk-linux-\" PLAT=imx8mm IMX_BOOT_UART_BASE=\"0x30860000\" "
Handy and useful.