Custom iMX8M board

I have a a iMX8M mine eval kit and I have the mender demo working. I then tried to take the next step and integrate mender with my iMX8M mini board. The board is almost exactly the same as the evk but it does have a different MACHINE name (imx8mmABC instead of imx8mmevk) I also have most of my local code in a local git repo. I can repo sync from my repo and I can see everything populated in the sources directory including the mender and mender community meta layers and local.conf in my buildABC directory along side my sources directory etc. I normally would just do a “. setup-environment buildABC” and then a bitbake … but this does not seem to work after mender integration as it seems to require some other initialization. If I go through the . fsl-setup-mender -b imx8mmABC it rewrite my local.conf and bblayers.conf file … which I do not want. If I resync just the local.conf and bblayers.conf back to my original AFTER doing the fsl-setup-mender everything builds as needed without error. Obviously fsl-setup-mender.sh is doing some more environment initialization beyond just updating the local.conf and bblayers.conf. so my question is how can I initialize the mender build environment WITHOUT having it overwrite my already correct local.conf and bblayers.conf file?

Hi @dvescovi probably you need to add some extra overrides to the meta-mender-imx layer. You can see that some things have _imx8mmevk in their name and that sets those variables only for that specific machine. You have two choices.

  1. Edit the meta-mender-imx files and change all _imx8mmevk to _imx8mmevkABC.
  2. Add an extra override for your platform. In local.conf, add something like.:

OVERRIDES =. “imx8mmevk:”

I think #2 is the simplest answer.

Drew

I did not want to change anything locally in the meta-mender or meta-mender-community directories so I just add a few mods in my bsp specific meta-bsp-idpi directory like:

sources

meta-bsp-idpi

recipes-bsp

u-boot-imx_%.bbappend

u-boot-imx

imx8mmidpi

001 patch etc.

The u-boot-imx_%.bbappend file just has:

FILESEXTRAPATHS_prepend := “{THISDIR}/{BPN}:”

Set machine-specific variables per the definitions found in include/configs/MACHINE.h

| VARIABLE | DEFINITION |

| MENDER_UBOOT_ENV_STORAGE_DEVICE_OFFSET_1 | CONFIG_ENV_OFFSET |

| BOOTENV_SIZE | CONFIG_ENV_SIZE |

| MENDER_UBOOT_STORAGE_DEVICE |

MENDER_UBOOT_ENV_STORAGE_DEVICE_OFFSET_1_imx8mmidpi = “0x400000”

BOOTENV_SIZE_imx8mmidpi = “0x1000”

MENDER_UBOOT_STORAGE_DEVICE_imx8mmidpi ?= “0”

everything is working as long as I go through the fsl-setup-mender.sh and then fix up my original bblayers and local.conf file post set up.
If I don’t go through the mender set up and just use the NXP setup-environment the build fails with:
david@HOME5-PC:~/yocto/sumo/idpi/s/buildidpi$ bitbake core-image-base
WARNING: Host distribution “ubuntu-18.04” has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Parsing recipes: 100% |##################################################################################| Time: 0:00:58
Parsing of 2732 .bb files complete (0 cached, 2732 parsed). 3679 targets, 287 skipped, 8 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES ‘alsa-utils-alsactl’ (but /home/david/yocto/sumo/idpi/s/sources/poky/meta/recipes-core/packagegroups/packagegroup-base.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target ‘alsa-utils-alsactl’ is unbuildable, removing…
Missing or unbuildable dependency chain was: [‘alsa-utils-alsactl’]
NOTE: Runtime target ‘packagegroup-base-extended’ is unbuildable, removing…
Missing or unbuildable dependency chain was: [‘packagegroup-base-extended’, ‘alsa-utils-alsactl’]
ERROR: Required build target ‘core-image-base’ has no buildable providers.
Missing or unbuildable dependency chain was: [‘core-image-base’, ‘packagegroup-base-extended’, ‘alsa-utils-alsactl’]

Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
d

the:
ERROR: Required build target ‘core-image-base’ has no buildable providers.
Missing or unbuildable dependency chain was: [‘core-image-base’, ‘packagegroup-base-extended’, ‘alsa-utils-alsactl’]

seems to hint that there is something else going on with the mender setup as opposed to just using the NXP set-environment to re-enter a previously setup project.

tried adding OVERRIDES =. “imx8mmevk:” and got

ERROR: Unable to start bitbake server
ERROR: Server log for this session (/home/david/yocto/sumo/idpi/s/buildidpi/bitbake-cookerdaemon.log):
— Starting bitbake server pid 12599 at 2020-10-12 18:19:40.560704 —
ERROR: ParseError at /home/david/yocto/sumo/idpi/s/buildidpi/conf/local.conf:120: unparsed line: ‘OVERRIDES =. “imx8mmevk:”’

Is it possible you did copy/paste to add the OVERRIDES command? Sometimes forum posts use graphical quote characters rather than standard quotes and copying/pasting will use the wrong character.

As for the build error, what happens if you just run “bitbake alsa-utils-alsactl”? That may tell the root cause.