I have two machine conf files, where I am adding the required conf file from meta layer. As follows:
# mymachine32.conf
require conf/machine/include/tune-cortexa7.inc
and
# mymachine64.conf
require conf/machine/include/arm/arch-armv8.inc
The above works fine, but I am attempting to consolidate into a single conf file as follows:
Approach #1
# mymachine.conf
DEFAULTTUNE ?= "${@base_contains('MYTUNE', 'arm', 'armv7a-neon', 'aarch64', d)}"
require conf/machine/include/arm/arch-armv8.inc
With Approach #1 in my conf file, I see following error:
ExpansionError: Failure expanding variable DEFAULTTUNE, expression was ${@base_contains('MYTUNE', 'arm', 'armv7a-neon', 'aarch64', d)} which triggered exception NameError: name 'base_contains' is not defined
Approach #2
# mymachine.conf
DEFAULTTUNE ?= "${@bb.utils.contains('MYTUNE', 'arm', 'armv7a-neon', 'aarch64', d)}"
require conf/machine/include/arm/arch-armv8.inc
Whereas with Approach #2 I always get the 'falsevalue' (i.e., aarch64) set to DEFAULTTUNE
Please note that in both cases I am exporting the MYTUNE in my shell
export MYTUNE=arm
Can you please point out what I am doing wrong? Thanks in advance for the help.