NXP 8MPLUS-BB evk Yocto Mender.io integration problem

Hi all,
I’m trying without success to integrate Mender on this evaluation from NXP.
After uncountable tests and bitbakes, I have always the same result: microSD prepared using sdimg file doesn’t boot at all and nothing printed on debug console.
On the microSD I have correctly 4 partitions and everything seems to be in place.
I try to explain the steps I follow, starting from documentation and other info found here:
This is the Build Configuration:

BB_VERSION           = "2.0.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "imx8mp-lpddr4-evk"
DISTRO               = "fsl-imx-wayland"
DISTRO_VERSION       = "5.15-kirkstone"
TUNE_FEATURES        = "aarch64 armv8a crc crypto"
  • I modified bblayer.conf adding:
BBLAYERS += "${BSPDIR}/sources/meta-mender/meta-mender-core"
BBLAYERS += "${BSPDIR}/sources/meta-mender/meta-mender-demo"
BBLAYERS += "${BSPDIR}/sources/meta-mender-community/meta-mender-nxp"
  • I modified local.conf adding (this is the current situation… I modified every bitbake):
INHERIT += "mender-full"
MENDER_ARTIFACT_NAME = "release-1"
ARTIFACTIMG_FSTYPE = "ext4"
MENDER_DEMO_HOST_IP_ADDRESS = "192.168.1.10"

MENDER_FEATURES_ENABLE:append = " mender-uboot mender-image-sd"
MENDER_FEATURES_DISABLE:append = " mender-grub mender-image-uefi"

MENDER_STORAGE_DEVICE:imx8mp-lpddr4-evk = "/dev/mmcblk1"
MENDER_UBOOT_STORAGE_INTERFACE:imx8mp-lpddr4-evk = "mmc"
MENDER_UBOOT_STORAGE_DEVICE:imx8mp-lpddr4-evk="1"

MENDER_STORAGE_TOTAL_SIZE_MB:imx8mp-lpddr4-evk = "15000"
MENDER_BOOT_PART_SIZE_MB:imx8mp-lpddr4-evk = "64"
OFFSET_SPL_PAYLOAD:imx8mp-lpddr4-evk = ""
MENDER_DATA_PART_SIZE_MB = "4096"
MENDER_DTB_NAME_FORCE = "freescale/imx8mp-evk-rm67199-flexcan2.dtb"
KERNEL_DEVICETREE:imx8mp-lpddr4-evk = "freescale/imx8mp-evk-rm67199-flexcan2.dtb"
  • I modified u-boot-imx_2022.04-bb adding:
require recipes-bsp/u-boot/u-boot-mender.inc

When I do u-boot bitbake, this warning appear:

WARNING: u-boot-imx-2022.04-r0 do_patch: Fuzz detected:

Applying patch 0003-Integration-of-Mender-boot-code-into-U-Boot.patch
patching file include/env_default.h
Hunk #1 succeeded at 14 with fuzz 2 (offset 4 lines).
Hunk #2 succeeded at 30 (offset 4 lines).
patching file scripts/Makefile.autoconf
Hunk #1 succeeded at 109 (offset 1 line).

Applying patch 0004-Disable-CONFIG_BOOTCOMMAND-and-enable-CONFIG_MENDER_.patch
patching file include/env_default.h
Hunk #1 succeeded at 41 with fuzz 2 (offset 4 lines).

The context lines in the patches can be updated with devtool:

devtool modify u-boot-imx
devtool finish --force-patch-refresh u-boot-imx <layer_path>

Don’t forget to review changes done by devtool!

WARNING: u-boot-imx-2022.04-r0 do_patch: QA Issue: Patch log indicates that patches do not apply cleanly. [patch-fuzz]

I think this is all I did in the past 2 weeks to try integration… what I’m missing of?

Thanks a lot for the help!!

Hi @dario.costa,

From a first skim theres nothing obviously wrong. When you say “nothing at all” on the debug console, then that means you do not even see some u-boot messages after powering up? You are connected through a serial cable, right?

Looking at the existing integrations for i.MX8 based platforms here, it seems that most need a configuration tweak to set CONFIG_ENV_OFFSET. Maybe this is worth looking into.

If you’re nailing down things in the boot process, it is also possible to just build 'u-bootand theSPLbybitbake virtual/bootloaderand drop it on the sd card directly, to cut the roundtrip short, as well as reducingMENDER_STORAGE_TOTAL_SIZE_MBandMENDER_DATA_PART_SIZE`, as those make the flashing process really time consuming due to big image sizes.

Hope this helps,
Josef