I believe that PACKAGE_ARCH will control the recipe going into one of the folders under build/tmp/work/. For example, most imx Linux recipes includes kernel.class, where PACKAGE_ARCH is assigned as ${MACHINE_ARCH}, which will make Linux build go to ${MACHINE}-poky-linux-gnueabi directory.
It is easy to understand that some recipes have an explicit assignment for PACKAGE_ARCH. But such as an explicit assignment can't be found in some recipes. For example, alsa-lib, alsa-tools, alsa-state recipes reside in cortexa9hf-neon-mx6qdl-poky-linux-gnueabi, cortexa9hf-neon-poky-linux-gnueabi, and ${MACHINE}-poky-linux-gnueabi directories respectively, but I can't find the explicit assignments in these recipes. They must be assigned implicitly somewhere in class, include, and configuration files.
In the example above, does someone know how trace the PACKAGE_ARCH assignment to control a recipes going into different folders under build/tmp/work? Maybe my believe is wrong?
Thanks,
Yang Liu
Here is researching result using -e option:
alsa-tools:
========
# $PACKAGE_ARCH [2 operations]
# set /home/yangliu/data/var-imx-krogoth/sources/poky/meta/conf/bitbake.conf:144
# [_defaultval] "${TUNE_PKGARCH}"
# set /home/yangliu/data/var-imx-krogoth/sources/poky/meta/conf/documentation.conf:307
# [doc] "The architecture of the resulting package or packages."
# pre-expansion value:
# "${TUNE_PKGARCH}"
PACKAGE_ARCH="cortexa9hf-neon"
alsa-lib:
========
# $PACKAGE_ARCH_mx6
# set /home/yangliu/data/var-imx-krogoth/sources/meta-fsl-arm/recipes-multimedia/alsa/alsa-lib_%.bbappend:7
# "${MACHINE_SOCARCH}"
PACKAGE_ARCH_mx6="cortexa9hf-neon-mx6qdl"
# $PACKAGE_ARCH [6 operations]
# set /home/yangliu/data/var-imx-krogoth/sources/poky/meta/conf/bitbake.conf:144
# [_defaultval] "${TUNE_PKGARCH}"
# set /home/yangliu/data/var-imx-krogoth/sources/poky/meta/conf/documentation.conf:307
# [doc] "The architecture of the resulting package or packages."
# override[mx6]:set /home/yangliu/data/var-imx-krogoth/sources/meta-fsl-arm/recipes-multimedia/alsa/alsa-lib_%.bbappend:7
# "${MACHINE_SOCARCH}"
# override[mx6ul]:set /home/yangliu/data/var-imx-krogoth/sources/meta-fsl-arm/recipes-multimedia/alsa/alsa-lib_%.bbappend:8
# "${MACHINE_SOCARCH}"
# override[mx7]:set /home/yangliu/data/var-imx-krogoth/sources/meta-fsl-arm/recipes-multimedia/alsa/alsa-lib_%.bbappend:9
# "${MACHINE_SOCARCH}"
# override[mx8]:set /home/yangliu/data/var-imx-krogoth/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-multimedia/alsa/alsa-lib_%.bbappend:12
# "${MACHINE_SOCARCH}"
# pre-expansion value:
# "${MACHINE_SOCARCH}"
PACKAGE_ARCH="cortexa9hf-neon-mx6qdl"
alsa-state:
========
# $PACKAGE_ARCH_mx6
# set /home/yangliu/data/var-imx-krogoth/sources/meta-fsl-arm/recipes-bsp/alsa-state/alsa-state.bbappend:6
# "${MACHINE_ARCH}"
PACKAGE_ARCH_mx6="var_som_mx6"
# $PACKAGE_ARCH [6 operations]
# set /home/yangliu/data/var-imx-krogoth/sources/poky/meta/conf/bitbake.conf:144
# [_defaultval] "${TUNE_PKGARCH}"
# set /home/yangliu/data/var-imx-krogoth/sources/poky/meta/conf/documentation.conf:307
# [doc] "The architecture of the resulting package or packages."
# override[mx6]:set /home/yangliu/data/var-imx-krogoth/sources/meta-fsl-arm/recipes-bsp/alsa-state/alsa-state.bbappend:6
# "${MACHINE_ARCH}"
# override[mx6ul]:set /home/yangliu/data/var-imx-krogoth/sources/meta-fsl-arm/recipes-bsp/alsa-state/alsa-state.bbappend:7
# "${MACHINE_ARCH}"
# override[mx7]:set /home/yangliu/data/var-imx-krogoth/sources/meta-fsl-arm/recipes-bsp/alsa-state/alsa-state.bbappend:8
# "${MACHINE_ARCH}"
# override[mx8]:set /home/yangliu/data/var-imx-krogoth/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-bsp/alsa-state/alsa-state.bbappend:3
# "${MACHINE_ARCH}"
# pre-expansion value:
# "${MACHINE_ARCH}"
PACKAGE_ARCH="var_som_mx6"
That is why these three recipes going to different folders. Cheers!
bitbake.conf?
try bitbake alsa-lib -e | grep PACKAGE_ARCH
Adding below line in my custom .bb has solved the issue.
PACKAGE_ARCH = "${MACHINE_ARCH}"
Thanks!
Thanks for quick response, Daiane.
Using the environment option is good choice.