yoctobitbakeopenembeddedimx7

bitbake failed with ExpansionError


Context:

I'm following the NXP i.MX7 Reference to build a Linux image for the i.MX 7 SABRE board. This process went smoothly, and I was successful in building and loading the krogoth image on the board. The problem arise when I tried to add the openembedded-core layer to my image. I immediately get the error below. I included my bblayers.conf for reference. Any help would be appreciated. I don't even need sqlite, so if there's a way to bypass it, then that would be fine.

Error:

ERROR: ExpansionError during parsing /fsl-community-bsp-platform/sources/openembedded-core/meta/recipes-support/sqlite/sqlite3_3.16.2.bb: Failure expanding variable SQLITE_PV, expression was ${@sqlite_download_version(d)} which triggered exception TypeError: getVar() takes at least 3 arguments (2 given)

bblayers.conf

POKY_BBLAYERS_CONF_VERSION = "2"

BBPATH = "${TOPDIR}"
BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}"

BBFILES ?= ""
BBLAYERS = " \
  ${BSPDIR}/sources/poky/meta \
  ${BSPDIR}/sources/poky/meta-poky \
  \
  ${BSPDIR}/sources/openembedded-core/meta \
  \
  ${BSPDIR}/sources/meta-openembedded/meta-oe \
  ${BSPDIR}/sources/meta-openembedded/meta-multimedia \
  \
  ${BSPDIR}/sources/meta-fsl-arm \
  ${BSPDIR}/sources/meta-fsl-arm-extra \
  ${BSPDIR}/sources/meta-fsl-demos \
"

The only difference between a successful build, and a failling build is the line: ${BSPDIR}/sources/openembedded-core/meta.


Solution

  • Don't add openembedded-core/meta to your bblayers.conf!

    In your list, BBLAYERS =, the two entries

    ${BSPDIR}/sources/poky/meta \
    ${BSPDIR}/sources/openembedded-core/meta \
    

    are both the same layer. meta in Poky, is taken directly from OpenEmbedded. The Poky repository is combined from multiple upstream repositoris using a script, combo-layer. (Which in my opinion is unfortunate, though I can see why it's being done).

    If you wan't e.g. a newer version of meta, you need to update poky, or remove poky completely, and download openembedded-core and bitbake separately.