# CL-SOM-iMX8Plus NXP iMX8M-Plus Mender Setup Issues

**URL:** <https://hub.mender.io/t/cl-som-imx8plus-nxp-imx8m-plus-mender-setup-issues/7412>\
**Category:** General Discussions\
**Tags:** yocto, nxp, mender-server\
**Created:** [December 20, 2024, 12:37pm UTC](https://hub.mender.io/t/cl-som-imx8plus-nxp-imx8m-plus-mender-setup-issues/7412 "2024-12-20T12:37:46Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ianhgenesys](https://avatars.discourse-cdn.com/v4/letter/i/ac91a4/32.png) [@ianhgenesys](https://hub.mender.io/u/ianhgenesys)\
**Post date:** [December 20, 2024, 12:37pm UTC](https://hub.mender.io/t/cl-som-imx8plus-nxp-imx8m-plus-mender-setup-issues/7412/1 "2024-12-20T12:37:46Z")

</div>

Hi all,

I’m facing some issues running the demo mender setup command on the CL-SOM-iMX8Plus NXP iMX8M-Plus. So firstly, I am following this [guide](https://github.com/compulab-yokneam/meta-mender-compulab/tree/kirkstone-nxp) to install Mender on the CL-SOM-iMX8Plus NXP iMX8M-Plus. In summary, these are the steps:

```auto
wget --directory-prefix .repo/local_manifests https://raw.githubusercontent.com/compulab-yokneam/meta-mender-compulab/kirkstone-nxp/scripts/mender-compulab-kirkstone.xml
repo sync
export MACHINE=som-imx8m-plus
source mender-setup-environment build-mender-${MACHINE}
# Build for production (remove demo layer)
bitbake-layers remove-layer meta-mender-demo
bitbake-layers show-layers
bitbake -k fsl-image-network-full-cmdline

```

After putting the image onto an SD card and booting up the CL-SOM-iMX8Plus NXP iMX8M-Plus, it boots up normally. When running `mender setup` and configuring it for Hosted Mender, everything works fine. However, when configuring it for a demo server, the device does not show up on the localhost Mender UI. These are the steps I did:

> root@som-imx8m-plus:~# mender setup  
> Mender Client Setup  
> ===================  
> Setting up the Mender client: The client will regularly poll the server to check for updates and report its inventory data.  
> Get started by first configuring the device type and settings for communicating with the server.  
> The device type property is used to determine which Mender Artifact are compatible with this device.  
> Enter a name for the device type (e.g. raspberrypi3): [som-imx8m-plus]  
> Are you connecting this device to [hosted.mender.io](http://hosted.mender.io)? [Y/n] n  
> Demo server uses a self-signed certifcate for “[docker.mender.io](http://docker.mender.io)” and modifies device’s /etc/hosts with the server’s IP address (Required if using Mender demo server.)  
> Do you want to configure the client for a demo server? [Y/n] Y  
> Set the IP of the Mender Server: [127.0.0.1]  
> Demo intervals uses short poll and retry intervals (Recommended for testing.)  
> Do you want to run the client in demo mode? [Y/n] Y  
> WARN[0035] Unable to install Mender demo cert in local trust: Cannot open file “/usr/share/doc/mender-client/examples/demo.crt”: open /usr/share/doc/mender-client/examples/demo.crt: no such file or directory  
> Mender setup successfully.

Unlike the Hosted Mender, there seems to be some issues with the demo cert which I cannot seem to solve. I found some server.cert files somewhere and tried adding them but the device was insistent on looking for demo.cert.

These are the steps I did to get the demo server up and running, taken from this [guide](https://docs.mender.io/development/server-installation/evaluation-with-docker-compose):

```auto
git clone -b v4.0.0-rc.2 https://github.com/mendersoftware/mender-server.git mender-server-docker
cd mender-server-docker
docker compose up -d
export MENDER_USERNAME=admin@docker.mender.io
export MENDER_PASSWORD=Password1
docker compose run --name create-user useradm create-user --username "$MENDER_USERNAME" --password "$MENDER_PASSWORD"

```

Would anyone have any ideas about why the devices won’t show up on the localhost Mender UI? Your help is greatly appreciated!

---

<div class="post-metadata">

**Author:** ![leonardo-k](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/leonardo-k/32/1472_2.png) [@leonardo-k](https://hub.mender.io/u/leonardo-k)\
**Post date:** [January 7, 2025, 9:10am UTC](https://hub.mender.io/t/cl-som-imx8plus-nxp-imx8m-plus-mender-setup-issues/7412/2 "2025-01-07T09:10:12Z")

</div>

Hello, first : happy 2025 🙂  
Trying to understand better 🙂

- I never used mender client and server on the same machine so i don’t know if this can be an issue, imo it should work at least until you try to write an update, then IDK .

- You are trying to use the mender demo setup BUT you remove the meta-mender-demo layer with the command

```auto
bitbake-layers remove-layer meta-mender-demo

```

Have you checked [the official mender docs](https://docs.mender.io/operating-system-updates-yocto-project/build-for-demo#building-for-demo) ?

Maybe I’m wrong but seems to me that you mixed the mender demo installation procedure with a production procedure (the one on github).

---

<div class="post-metadata">

**Author:** ![ianhgenesys](https://avatars.discourse-cdn.com/v4/letter/i/ac91a4/32.png) [@ianhgenesys](https://hub.mender.io/u/ianhgenesys)\
**Post date:** [January 8, 2025, 2:01am UTC](https://hub.mender.io/t/cl-som-imx8plus-nxp-imx8m-plus-mender-setup-issues/7412/3 "2025-01-08T02:01:10Z")

</div>

Hi @leonardo-k, thank you for your response and happy new year to you too. I was slightly confused because I was trying to test the demo version first using the link that you gave. However, I wasn’t able to connect the Compulab device to the demo server I was running. I did try to remove the

```auto
bitbake-layers remove-layer meta-mender-demo

```

layer but it still did not connect to the server. I wonder if it is something wrong with the way I am running the servers? I am not that experienced in running servers so all I have to follow is the guide given by [this](https://docs.mender.io/3.7/server-installation/production-installation-with-kubernetes). This still did not allow a connection though…

---

<div class="post-metadata">

**Author:** ![leonardo-k](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/leonardo-k/32/1472_2.png) [@leonardo-k](https://hub.mender.io/u/leonardo-k)\
**Post date:** [January 8, 2025, 7:12am UTC](https://hub.mender.io/t/cl-som-imx8plus-nxp-imx8m-plus-mender-setup-issues/7412/4 "2025-01-08T07:12:06Z")

</div>

I think you can probably go here [GitHub - mendersoftware/mender-server](https://github.com/mendersoftware/mender-server) and use that procedure.  
But as i was saying idk about server and client on the same machine .

Can you share more details? like the local.conf layer.conf ecc?

---

<div class="post-metadata">

**Author:** ![ianhgenesys](https://avatars.discourse-cdn.com/v4/letter/i/ac91a4/32.png) [@ianhgenesys](https://hub.mender.io/u/ianhgenesys)\
**Post date:** [January 9, 2025, 5:01am UTC](https://hub.mender.io/t/cl-som-imx8plus-nxp-imx8m-plus-mender-setup-issues/7412/5 "2025-01-09T05:01:00Z")

</div>

This is my `local.conf`:

```auto
MACHINE ??= 'som-imx8m-plus'
DISTRO ?= 'fsl-imx-xwayland'
PACKAGE_CLASSES ?= 'package_rpm'
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"
LICENSE_FLAGS_ACCEPTED = "commercial"

CORE_IMAGE_EXTRA_INSTALL += " cl-uboot cl-deploy cl-stest cl-camera cl-audio cl-growfs-rootfs "
CORE_IMAGE_EXTRA_INSTALL += " libubootenv-bin u-boot-compulab-env "
CORE_IMAGE_EXTRA_INSTALL += " memtester htop iotop tmux iperf3 "
CORE_IMAGE_EXTRA_INSTALL += " libgpiod-tools bluez5 can-utils minicom eeprom-util usbutils i2c-tools "
CORE_IMAGE_EXTRA_INSTALL += " wireless-tools dhcpcd ifupdown wpa-supplicant ntp ntpdate "

BB_SRCREV_POLICY = "clear"

# Appended fragment from meta-mender-community/templates

# This really saves a lot of disk space!
INHERIT += "rm_work"

# The name of the disk image and Artifact that will be built.
# This is what the device will report that it is running, and different updates
# must have different names because Mender will skip installation of an Artifact
# if it is already installed.
MENDER_ARTIFACT_NAME = "production-release"

INHERIT += "mender-full"

DISTRO_FEATURES:append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""

# Build for Hosted Mender
#
# To get your tenant token:
# - log in to https://hosted.mender.io
# - click your email at the top right and then "My organization"
# - press the "COPY TO CLIPBOARD"
# - assign content of clipboard to MENDER_TENANT_TOKEN
#
MENDER_SERVER_URL = "https://hosted.mender.io"
MENDER_TENANT_TOKEN = "[my-tenant-token]"

# Build for Mender demo server
#
# https://docs.mender.io/getting-started/create-a-test-environment
#
# Uncomment below and update IP address to match the machine running the
# Mender demo server
MENDER_DEMO_HOST_IP_ADDRESS = "127.0.0.1"

# Build for Mender production setup (on-prem)
#
# https://docs.mender.io/artifacts/building-for-production
#
# Uncomment below and update the URL to match your configured domain
# name and provide the path to the generated server.crt file.
#
# NOTE! It is recommend that you provide below information in your custom
# Yocto layer and this is only for demo purposes. See linked documentation
# for additional information.
MENDER_SERVER_URL = "http://mender.example.com"
FILESEXTRAPATHS:prepend:pn-mender := "</usr/share/doc/mender-client/examples/>:"
SRC_URI:append:pn-mender = " file://server.crt"

# Mender storage configuration
#
# More details on these variables is available at
# https://docs.mender.io/devices/yocto-project/partition-configuration#configuring-storage
#
# Also, please be sure to check other config files as other
# layers, config fragments, etc may attempt to set values
# for specific platforms. Using "bitbake -e <image-name>"
# can help determine which files are setting these values
# in a given configuration.
#
# MENDER_STORAGE_TOTAL_SIZE_MB = "2048"
# MENDER_BOOT_PART_SIZE_MB = "16"
# MENDER_DATA_PART_SIZE_MB = "1024"
# MENDER_STORAGE_DEVICE = "/dev/mmcblk0"
# MENDER_BOOT_PART = "${MENDER_STORAGE_DEVICE_BASE}1"
# MENDER_DATA_PART = "${MENDER_STORAGE_DEVICE_BASE}4"
# MENDER_ROOTFS_PART_A = "${MENDER_STORAGE_DEVICE_BASE}2"
# MENDER_ROOTFS_PART_B = "${MENDER_STORAGE_DEVICE_BASE}3"
# Mender extra conf
CORE_IMAGE_EXTRA_INSTALL += " mr-deploy "
CORE_IMAGE_EXTRA_INSTALL += " mender-artifact "

PACKAGE_CLASSES = "package_deb"

BBMASK += "meta-mender-core/recipes-bsp/grub/grub_%.bbappend"

CORE_IMAGE_EXTRA_INSTALL:append:mx8mm-nxp-bsp = " u-boot-script u-boot-mender-script u-boot-update-script "
IMAGE_BOOT_FILES:append:mx8mm-nxp-bsp = " boot.scr boot.mender.scr boot.update.scr "
# CL_DEPLOY_AUTO = "1"
CORE_IMAGE_EXTRA_INSTALL:append:mx8mm-nxp-bsp = "${@bb.utils.contains('CL_DEPLOY_AUTO', '1', 'u-boot-ai-script' , '', d)}"
IMAGE_BOOT_FILES:append:mx8mm-nxp-bsp = "${@bb.utils.contains('CL_DEPLOY_AUTO', '1', 'boot.ai.scr' , '', d)}"

# Uncoment the next lane if the read-only file system is requiered
# IMAGE_FEATURES += "read-only-rootfs"

# Append fragment from meta-mender-compulab
# CompuLab imx8m[m,q,p] modules

MENDER_IMAGE_BOOTLOADER_FILE = "imx-boot"
MENDER_IMAGE_BOOTLOADER_BOOTSECTOR_OFFSET:mx8mq-nxp-bsp = "66"
MENDER_IMAGE_BOOTLOADER_BOOTSECTOR_OFFSET:mx8mm-nxp-bsp = "66"
MENDER_IMAGE_BOOTLOADER_BOOTSECTOR_OFFSET:mx8mp-nxp-bsp = "64"

MENDER_BOOT_PART_SIZE_MB = "64"
#
# Cleanup image types generated
IMAGE_FSTYPES:remove = "tar.gz ext4 wic.gz wic.bmap multiubi mender.bmap"

# Build sdimg file rather than uefiimg
MENDER_FEATURES_ENABLE:append = " mender-image-sd mender-partuuid "
MENDER_FEATURES_DISABLE:append = " mender-image-uefi "

# Make sure we don't include u-boot-fw-utils; we are using grub-mender-grubenv instead
MACHINE_EXTRA_RDEPENDS:remove = "u-boot-fw-utils"

MENDER_STORAGE_TOTAL_SIZE_MB = "4096"
MENDER_STORAGE_DEVICE = ""

MENDER_BOOT_PART = "09501fb1-01"
MENDER_DATA_PART = "09501fb1-04"
MENDER_ROOTFS_PART_A = "09501fb1-02"
MENDER_ROOTFS_PART_B = "09501fb1-03"
DRAM_CONF = "d2d4"

```

Some issues I can see is that I do not have a server.crt file. But since I am trying to run it on a local server using Traefik I dont think this should be a problem?

Also this is my `bblayers.conf`:

```auto
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-bsp"
BBLAYERS += "${BSPDIR}/sources/meta-imx/meta-sdk"
BBLAYERS += "${BSPDIR}/sources/meta-imx/meta-ml"
BBLAYERS += "${BSPDIR}/sources/meta-imx/meta-v2x"
BBLAYERS += "${BSPDIR}/sources/meta-nxp-demo-experience"

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-virtualization"
BBLAYERS += "${BSPDIR}/sources/meta-bsp-imx8mp"
BBLAYERS += " \
  ${BSPDIR}/sources/meta-compulab \
  ${BSPDIR}/sources/meta-compulab-bsp/meta-desktop \
  ${BSPDIR}/sources/meta-compulab-bsp/meta-multimedia \
  ${BSPDIR}/sources/meta-compulab-bsp/meta-graphics \
  ${BSPDIR}/sources/meta-compulab-bsp/meta-utils \
  ${BSPDIR}/sources/meta-compulab-bsp/meta-bsp \
  ${BSPDIR}/sources/meta-compulab-bsp/meta-devtool \
  "
BBLAYERS += "${BSPDIR}/sources/meta-mender-compulab"
BBLAYERS += " \
  ${BSPDIR}/sources/meta-mender/meta-mender-core \
  "

```

---

<div class="post-metadata">

**Author:** ![leonardo-k](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/leonardo-k/32/1472_2.png) [@leonardo-k](https://hub.mender.io/u/leonardo-k)\
**Post date:** [January 9, 2025, 7:38am UTC](https://hub.mender.io/t/cl-som-imx8plus-nxp-imx8m-plus-mender-setup-issues/7412/6 "2025-01-09T07:38:54Z")

</div>

> [@ianhgenesys](#):
>
> ```auto
> 
> ```

seems to me that you are trying to build both for hosted and self-hosted servers at the same time.From what i see you are pointing your mender client to hosted mender

```auto
MENDER_SERVER_URL = "https://hosted.mender.io"
MENDER_TENANT_TOKEN = "[my-tenant-token]"

```

but after that you also set the server address to localhost.  
Also as i said idk about having server and client on the same machine, i suggest you to restart with a simpler environment that you know should work correctly.  
For example, you can try the hosted version to see if the machine works correctly with mender.  
After change and create a mender server running on your pc (or just not the same machine as the client ) and a client that points to that server,(not the hosted one).

[https://docs.mender.io/3.1/server-installation/installation-with-docker-compose](https://docs.mender.io/3.1/server-installation/installation-with-docker-compose)

Also, if you follow the procedure to use the local server you have to generate the certificates and use it, like having to use the token for the hosted one.

---

<div class="post-metadata">

**Author:** ![leonardo-k](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/leonardo-k/32/1472_2.png) [@leonardo-k](https://hub.mender.io/u/leonardo-k)\
**Post date:** [January 23, 2025, 8:52am UTC](https://hub.mender.io/t/cl-som-imx8plus-nxp-imx8m-plus-mender-setup-issues/7412/7 "2025-01-23T08:52:03Z")

</div>

hi 🙂 did you managed to make it work?

---

<div class="post-metadata">

**Author:** ![ianhgenesys](https://avatars.discourse-cdn.com/v4/letter/i/ac91a4/32.png) [@ianhgenesys](https://hub.mender.io/u/ianhgenesys)\
**Post date:** [January 24, 2025, 12:05am UTC](https://hub.mender.io/t/cl-som-imx8plus-nxp-imx8m-plus-mender-setup-issues/7412/8 "2025-01-24T00:05:21Z")

</div>

Hi @leonardo-k, yes I managed to make it work (mostly). I just skipped the whole demo version with docker compose thing because none of that was working for me and went straight to running it on a production server. I managed to host a server on my local Linux PC without any certificates needed but I’m still having some issues with the Traefik, Ingress and DNS routing because there needs to be a manual modification to /etc/hosts on the device every time I perform an OS OTA update. If I continue having issues I will probably open a new topic.

Thank you so much for your help thus far!

---

<div class="post-metadata">

**Author:** ![leonardo-k](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/leonardo-k/32/1472_2.png) [@leonardo-k](https://hub.mender.io/u/leonardo-k)\
**Post date:** [January 24, 2025, 7:12am UTC](https://hub.mender.io/t/cl-som-imx8plus-nxp-imx8m-plus-mender-setup-issues/7412/9 "2025-01-24T07:12:25Z")

</div>

Happy to hear that ! 😃

---

<div class="post-metadata">

**Author:** ![leonardo-k](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/leonardo-k/32/1472_2.png) [@leonardo-k](https://hub.mender.io/u/leonardo-k)\
**Post date:** [February 3, 2025, 7:51am UTC](https://hub.mender.io/t/cl-som-imx8plus-nxp-imx8m-plus-mender-setup-issues/7412/10 "2025-02-03T07:51:24Z")

</div>

@ianhgenesys it just pop up in my mind ,you can use a bbappend to base-files recipe and add your custom /etc/hosts file
