Yocto build upgrade to 2.8, custom machine

Hi,
I am trying to upgrade from 2.7 to 2.8. Because of problems I started from scratch with 2.8. First I want to create my own machine configuration. After copying the machine configuration meta-freescale-3rdparty/conf/machine/apalis-imx6.conf to my own layer conf/machine/apalis-imx6-myown.conf and setting MACHINE in local.conf to apalis-imx6-myown, bitbake fails with

xf86-video-imxfb-vivante was skipped: incompatible with machine apalis-imx6-myown(not in COMPATIBLE_MACHINE)

local.conf also includes:

include conf/machine/include/${MACHINE}.inc

A corresponding file exists in my own layer in conf/machine/include

it is named exactly like the machine-name + .inc

clearing sstate cache and tmp-glibc didn’t help either…

Greetings @mkock,

By naming the machine configuration file in your layer apalis-imx6-myown.conf you changed the machine name to apalis-imx6-myown. What this does is that it breaks compatibility with recipes such as xf86-video-imxfb-vivante. This is due to compatibility being verified via the machine name being present in the relevant COMPATIBLE_MACHINE variable for each recipe.

So you have a couple of options for fixing this.

  • You could simply just change the machine/file name to apalis-imx6.conf in your layer to restore compatibility. If your layer is of a higher priority (set in layer.conf) than other layers with a apalis-imx6.conf then your machine conf should be used over others.
  • If you must have a completely different machine name, then you’d have to add your machine name to the COMPATIBLE_MACHINE variable of every recipe where compatibility was broken.

Due to the nature of yocto there are probably other ways to fix this as well these are just the obvious ones that came to mind first.

Best Regards,
Jeremias

Hi @jeremias.tx,
thanks for the quick reply!
I will probably go back to the default machine name apalis-imx6.conf
I was just surprised, because in some older tutorials from toradex, the first thing they do is to setup a custom machine configuration. It still worked in 2.7 but not any more.

In meta-toradex-nxp/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_5.0.11.p8.6.bbappend
it says:

As per meta-freescale commit 927b31771dab ("xf86-video-imx-vivante: Remove fb
# from name") this recipe got renamed and should no longer be used!

COMPATIBLE_MACHINE  = "(-)"

I guess it is not the correct way to set it to mx6 now?

In many other recipes that then fail to build, compatible_machine is set to mx6q or mx6dl.

Do you know what exactly broke the compatibility of using custom machine names when going from 2.7. to 2.8, as obviously the compatible_machine variables in many recipes did not change.

@mkock,

Actually I think you are right, a custom machine name should still work as COMPATIBLE_MACHINE also checks against machine overrides which if you copied the machine conf should have mx6:mx6q.

What actually seems to be happening is that your build is attempting to use the xf86-video-imxfb-vivante_5.0.11.p8.6 recipe which you have shown is no longer used. The apalis-imx6.inc in meta-toradex-nxp sets the xserver driver to the correct recipe of xf86-video-imx-vivante.

File for reference: http://git.toradex.com/cgit/meta-toradex-nxp.git/tree/conf/machine/include/apalis-imx6.inc?h=rocko#n19

In your new custom layer what did you name this include file? As it seems like it’s not being picked up which is causing your custom machine to use the outdated xf86-video-imxfb-vivante_5.0.11.p8.6 recipe. This then causes the compatibility issue as COMPATIBLE_MACHINE is set to nothing in that recipe as you have shown above.

Best Regards,
Jeremias

Hi

While the issue described is related to the changed Vivante X11 driver here’s a remark on a changed machine name.

To keep all overrides done for the original ‘apalis-imx6’ machine in a custom machine with different name you can add to the new machine configuration something like this:

MACHINEOVERRIDES .= ":apalis-imx6"

Max

thank you max.
unfortunately there are still errors when setting
MACHINEOVERRIDES =. “apalis-imx6:”

ERROR: Nothing PROVIDES 'virtual/bootloader' (but /data/oe-core/build/../layers/meta-dotec/recipes-images/images/myownmc-image.bb DEPENDS on or otherwise requires it)
u-boot-toradex PROVIDES virtual/bootloader but was skipped: incompatible with machine apalis-imx6-myown (not in COMPATIBLE_MACHINE)
u-boot-congatec PROVIDES virtual/bootloader but was skipped: incompatible with machine apalis-imx6-myown (not in COMPATIBLE_MACHINE)
u-boot-timesys PROVIDES virtual/bootloader but was skipped: incompatible with machine apalis-imx6-myown (not in COMPATIBLE_MACHINE)
u-boot-qoriq PROVIDES virtual/bootloader but was skipped: incompatible with machine apalis-imx6-myown (not in COMPATIBLE_MACHINE)
u-boot-variscite PROVIDES virtual/bootloader but was skipped: incompatible with machine apalis-imx6-myown (not in COMPATIBLE_MACHINE)
barebox PROVIDES virtual/bootloader but was skipped: incompatible with machine apalis-imx6-myown (not in COMPATIBLE_MACHINE)
u-boot-fslc PROVIDES virtual/bootloader but was skipped: incompatible with machine apalis-imx6-myown (not in COMPATIBLE_MACHINE)
u-boot-toradex PROVIDES virtual/bootloader but was skipped: incompatible with machine apalis-imx6-myown (not in COMPATIBLE_MACHINE)
u-boot-imx PROVIDES virtual/bootloader but was skipped: incompatible with machine apalis-imx6-myown (not in COMPATIBLE_MACHINE)
u-boot PROVIDES virtual/bootloader but was skipped: PREFERRED_PROVIDER_virtual/bootloader set to u-boot-toradex, not u-boot
u-boot-gateworks-imx PROVIDES virtual/bootloader but was skipped: incompatible with machine apalis-imx6-myown (not in COMPATIBLE_MACHINE)
u-boot-compulab PROVIDES virtual/bootloader but was skipped: incompatible with machine apalis-imx6-myown (not in COMPATIBLE_MACHINE)
u-boot-boundary PROVIDES virtual/bootloader but was skipped: incompatible with machine apalis-imx6-myown (not in COMPATIBLE_MACHINE)
ERROR: Required build target 'myownmc-image' has no buildable providers.
Missing or unbuildable dependency chain was: ['myownmc-image', 'virtual/bootloader']

or when setting
MACHINEOVERRIDES =. “mx6:mx6q:apalis-imx6”

ERROR: Nothing PROVIDES 'virtual/libgal-x11' (but /data/oe-core/build/../layers/meta-freescale/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_5.0.11.p8.6.bb DEPENDS on or otherwise requires it)
imx-gpu-viv PROVIDES virtual/libgal-x11 but was skipped: PREFERRED_PROVIDER_virtual/libg2d set to imx-gpu-g2d, not imx-gpu-viv

Hi,
yes obviously the .inc file in my own layer is not being picked up. The file is own_layer/conf/machine/include/apalis-imx6-myown.inc and is by now a copy of the apalis-imx6.inc that you mentioned.

I would expect it to be included by my local.conf, which contains:

MACHINE ?= "apalis-imx6-myown"
[...]
# This file does not need to exist, if it does it can be used to influence machine specific
# configurations without copying the machine file.
include conf/machine/include/${MACHINE}.inc

But obviously it is not.

my own_layer has priority set to 99.

Hi @mkock,

While I agree that the include statement in the local.conf should work. Just as a sanity check could you try adding the include statement directly in your machine configuration file itself?

If the include is still not picked up after that, then there might be some deeper issue.

Best Regards,
Jeremias