NXP IMX8ULP-LPDDR4-EVK Build w/ Mender Issue

Hello! I wanted to reach out as I’m having some trouble incorporating the Meta-Mender-Core & Meta-Mender-Demo layers into my scarthgap yocto image for the IMX8ULP-LPDDR4-EVK.

The issue I have is that when building an image with this configuration, during bitbake, I get a “u-boot.env” file or directory is missing from the sdimg creation step in the build (doesn’t show up in the deployment folder) — is there anything I’m missing from a layer configuration standpoint? At this point, it’s just a standard scarthgap distro build for the IMX8ULP-LPDDR4-EVK with the meta-mender-core and meta-mender-demo scarthgap branches brought in.

When building without the mender layer, I am able to get a .wic file with the name “rootfs” in it that, when flashed with the imx-boot-imx8ulp-lpddr4-evk-sd.bin-flash_singleboot_m33 file using uuu, I am able to successfully bring up a generated yocto image on the evk. When incorporating mender, there are some key differences I’ve noticed in that it removes the rootfs from the generated output files, and from my understanding, I have to specify:

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

in order to make a .sdimg to use for flashing instead of using the .wic that I was using before incorporating mender. There might be some changes in the way I flash this as well from the previous method I used before incorporating mender.

Here is the local.conf configuration I’m using:

MACHINE ??= 'imx8ulp-lpddr4-evk'

DISTRO ?= 'fsl-imx-xwayland'

EXTRA_IMAGE_FEATURES ?= "debug-tweaks"

USER_CLASSES ?= "buildstats"

PATCHRESOLVE = "noop"

BB_DISKMON_DIRS ??= "\

STOPTASKS,${TMPDIR},1G,100K \

STOPTASKS,${DL_DIR},1G,100K \

STOPTASKS,${SSTATE_DIR},1G,100K \

STOPTASKS,/tmp,100M,100K \

HALT,${TMPDIR},100M,1K \

HALT,${DL_DIR},100M,1K \

HALT,${SSTATE_DIR},100M,1K \

HALT,/tmp,10M,1K"

PACKAGECONFIG:append:pn-qemu-system-native = " sdl"

CONF_VERSION = "2"

DL_DIR ?= "${BSPDIR}/downloads/"

ACCEPT_FSL_EULA = "1"

# Switch to Debian packaging and include package-management in the image

PACKAGE_CLASSES = "package_deb"

EXTRA_IMAGE_FEATURES += "package-management"

BB_NUMBER_THREADS ?= "8"

PARALLEL_MAKE ?= "-j 8"

INHERIT += "rm_work"

# Enable and disable specific Mender features

INHERIT += "mender-full"

MENDER_FEATURES_ENABLE:append = " mender-uboot mender-image-sd"

MENDER_FEATURES_DISABLE:append = " mender-grub mender-image-uefi"

# Bootloader and SD card setup

MENDER_IMAGE_BOOTLOADER_FILE = "imx-boot"

SDIMG_ROOTFS_TYPE = "ext4"

UBOOT_CONFIG = "sd"

MENDER_BOOTLOADER = "u-boot"

# Storage configuration

MENDER_STORAGE_DEVICE = "/dev/mmcblk0"

MENDER_UBOOT_STORAGE_DEVICE = "0"

MENDER_STORAGE_TOTAL_SIZE_MB = "29820"

MENDER_BOOT_PART_SIZE_MB = "64"

MENDER_DATA_PART_SIZE_MB = "512"

# Server configuration

MENDER_SERVER_URL = "https://hosted.mender.io"

MENDER_TENANT_TOKEN = "v6uX4yAw5f7qXB-nLbvsJNzdTmoO50XRpy1My6hMXAE"

MENDER_ARTIFACT_NAME = "IMX8ULP-LPDDR4-EVK-Release-1"

# Systemd configuration

DISTRO_FEATURES:append = " systemd"

VIRTUAL-RUNTIME_init_manager = "systemd"

DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"

VIRTUAL-RUNTIME_initscripts = ""

And here is the bblayers.conf for specifying layer configuration:

LCONF_VERSION = "7"

BBPATH = "${TOPDIR}"

BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}"

BBFILES ?= ""

BBLAYERS = " \

${BSPDIR}/sources/poky/meta \

${BSPDIR}/sources/poky/meta-poky \

\

${BSPDIR}/sources/meta-openembedded/meta-oe \

${BSPDIR}/sources/meta-openembedded/meta-multimedia \

${BSPDIR}/sources/meta-openembedded/meta-python \

\

${BSPDIR}/sources/meta-freescale \

${BSPDIR}/sources/meta-freescale-3rdparty \

${BSPDIR}/sources/meta-freescale-distro \

"

# i.MX Yocto Project Release layers

BBLAYERS += "${BSPDIR}/sources/meta-imx/meta-imx-bsp"

BBLAYERS += "${BSPDIR}/sources/meta-imx/meta-imx-sdk"

BBLAYERS += "${BSPDIR}/sources/meta-imx/meta-imx-ml"

BBLAYERS += "${BSPDIR}/sources/meta-imx/meta-imx-v2x"

BBLAYERS += "${BSPDIR}/sources/meta-nxp-demo-experience"

BBLAYERS += "${BSPDIR}/sources/meta-matter/meta-nxp-matter-baseline"

BBLAYERS += "${BSPDIR}/sources/meta-matter/meta-nxp-openthread"

BBLAYERS += "${BSPDIR}/sources/meta-arm/meta-arm"

BBLAYERS += "${BSPDIR}/sources/meta-arm/meta-arm-toolchain"

BBLAYERS += "${BSPDIR}/sources/meta-browser/meta-chromium"

BBLAYERS += "${BSPDIR}/sources/meta-clang"

BBLAYERS += "${BSPDIR}/sources/meta-openembedded/meta-gnome"

BBLAYERS += "${BSPDIR}/sources/meta-openembedded/meta-networking"

BBLAYERS += "${BSPDIR}/sources/meta-openembedded/meta-filesystems"

BBLAYERS += "${BSPDIR}/sources/meta-qt6"

BBLAYERS += "${BSPDIR}/sources/meta-security/meta-parsec"

BBLAYERS += "${BSPDIR}/sources/meta-security/meta-tpm"

BBLAYERS += "${BSPDIR}/sources/meta-virtualization"

# Mender Layers

BBLAYERS += "${BSPDIR}/sources/meta-mender/meta-mender-core"

BBLAYERS += "${BSPDIR}/sources/meta-mender/meta-mender-demo"

Any support would be greatly appreciated!

Hi @BrendanCook, thanks for reaching out!

Usually this indicates a custom u-boot fork respectively vendor version being in the mix, so can you check if the following applies U-Boot | Mender documentation to you, and eventually follow the manual integration steps? You might look at meta-mender-community/meta-mender-nxp at scarthgap · mendersoftware/meta-mender-community · GitHub for some inspiration.

As a side note, this distro looks quite huge, so trimming it down will probably give you much faster development loops.

Greetz,
Josef


Thank you for that suggestion, looks like you are correct in that it’s using a custom u-boot fork.
Would you recommend cloning that nxp community scarthgap github repository and including it within the layer configuration?

I think this might mean that I need to change this line of the local.conf file:

MENDER_BOOTLOADER = "u-boot"

to

MENDER_BOOTLOADER = "u-boot-imx"

Hi @BrendanCook,

I’d start out by setting that MENDER_BOOTLOADER config and see what happens. Currently I lack bandwidth to check the layer configuration myself, but if the build passes up the point where it complains about u-boot.env missing, my understanding is that all the required pieces are already there, including the NXP layers.

Greetz,
Josef

No worries, I appreciate any help you can provide. If you know someone with more experience on the i.MX8 and who might have more availability, I’d appreciate it if you could point them to this ticket. If not, no problem! It seems like a local configuration issue, so I’ll continue adjusting values. I already changed the MENDER_BOOTLOADER value to u-boot-imx, but I’m still seeing the “missing u-boot.env” prompt. I’ll keep investigating other u-boot-related configuration parameters to see if anything else needs to be adjusted. Thanks!

-Brendan