Building Yocto image for BeagleBoneBlack

1. Incorrect use of getVar inxserver-xf86-config_0.1.bbappend

chris@chris-virtual-machine:~/workspace/BeagleBoneYocto/poky-dunfell/build$ bitbake core-image-minimal
WARNING: Layer meta-beagleboard-common should set LAYERSERIES_COMPAT_meta-beagleboard-common in its conf/layer.conf file to list the core layer names it is compatible with.
WARNING: Layer meta-beagleboard-common should set LAYERSERIES_COMPAT_meta-beagleboard-common in its conf/layer.conf file to list the core layer names it is compatible with.
Loading cache: 100% |#############################################################################################################################################| Time: 0:00:00
Loaded 2313 entries from dependency cache.
ERROR: ExpansionError during parsing /home/chris/workspace/BeagleBoneYocto/poky-dunfell/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb            | ETA:  --:--:--
Traceback (most recent call last):
  File "Var ", line 1, in 
bb.data_smart.ExpansionError: Failure expanding variable THISDIR[:=], expression was ${@os.path.dirname(bb.data.getVar('FILE', d, True))} which triggered exception AttributeError: module 'bb.data' has no attribute 'getVar'  

Incorrect use of getVar inmeta-beagleboard/common-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend

THISDIR := "{@os.path.dirname(bb.data.getVar('FILE', d, True))}"
FILESPATH =. "{@base_set_filespath(["{THISDIR}/{PN}"], d)}:"

Change first line to

THISDIR := "${@os.path.dirname(d.getVar('FILE', d, True))}"

See Yocto manual: Functions for Accessing Datastore Variables

Leave a Reply

Your email address will not be published. Required fields are marked *