# How to manage your Qt based embedded Linux device with Mender (Apalis iMX8)

**URL:** <https://hub.mender.io/t/how-to-manage-your-qt-based-embedded-linux-device-with-mender-apalis-imx8/5921>\
**Category:** Board Integrations\
**Tags:** yocto, nxp\
**Created:** [June 15, 2023, 9:24am UTC](https://hub.mender.io/t/how-to-manage-your-qt-based-embedded-linux-device-with-mender-apalis-imx8/5921 "2023-06-15T09:24:04Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhiry2k](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@dhiry2k](https://hub.mender.io/u/dhiry2k)\
**Post date:** [June 15, 2023, 9:24am UTC](https://hub.mender.io/t/how-to-manage-your-qt-based-embedded-linux-device-with-mender-apalis-imx8/5921/1 "2023-06-15T09:24:05Z")

</div>

The official [Mender documentation](https://docs.mender.io/) explains how Mender works. This is a board-specific complement to the official documentation.

This is my experiance in adding Mender layer in iMX8 Apalis board and i thought to share this with you.

# Device description

The board is [Apalis iMX8 | Toradex Developer Center](https://developer.toradex.com/hardware/apalis-som-family/modules/apalis-imx8/) that is used for integration with boot2qt manifests

# Support level

We did the initial testing and things seems to be working fine.

# Getting started

- A supported Linux distribution and dependencies installed on your workstation/laptop as described in the [Yocto Mega Manual](https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#detailed-supported-distros)

- Google repo tool [installed](https://hub.mender.io/t/google-repo/58/2) and in your `PATH`

- A deployment environment using a desktop PC with Ubuntu 20.04 and Google Chrome as a web browser and at least 10 GB free disk space and 2 GB RAM available for Mender.

- You should have a running Mender demo server. Instructions on how to setup this up can be found [here](https://docs.mender.io/2.4/getting-started/on-premise-installation/create-a-test-environment)

- Apalis iMX8 carrier board

- Apalis iMX8 SOM

- Working U-boot on the Apalis iMX8

- Qt Creator IDE installed on your development PC . On a Debian based operating system you can run:

```auto
apt-get install qtcreator

```

Create workspace and change directory:

```auto
mkdir boot2qt && cd boot2qt

```

Clone `meta-boot2qt`:

```auto

repo init -u git://code.qt.io/yocto/boot2qt-manifest -m v6.4.3.xml
repo sync

```

Download mender meta directories using git clone, we used git clone and got to kirkstone branch

```auto
cd sources
git clone https://github.com/mendersoftware/meta-mender.git -b kirkstone
git clone https://github.com/mendersoftware/meta-mender-community.git -b kirkstone
cd ..

```

Initialize the environment:

```auto
MACHINE=apalis-imx8 source ./setup-environment.sh

```

Add Mender layers to environment:

```auto
cat <<- 'EOF' >> conf/bblayers.conf
BBLAYERS += "${BSPDIR}/sources/meta-mender/meta-mender-core"
BBLAYERS += "${BSPDIR}/sources/meta-mender/meta-mender-demo"
BBLAYERS += "${BSPDIR}/sources/meta-mender-community/meta-mender-toradex-nxp"
EOF

```

Also , i updated `local.conf` based on findings from this [post](https://hub.mender.io/t/toradex-apalis-imx8-yocto-with-mender/3759).

here are `local.conf` lines i added/updated.

```auto
MENDER_ARTIFACT_NAME = "release-1"
INHERIT += "mender-full"
 
INIT_MANAGER = "systemd"
 
INHERIT += "mender-toradex"
 
MENDER_FEATURES_ENABLE:append = " mender-uboot mender-image-sd"
MENDER_FEATURES_DISABLE:append = " mender-grub mender-image-uefi"

IMAGE_CLASSES += "image_type_mender_tezi"
IMAGE_FSTYPES:append = " mender_tezi"
IMAGE_FSTYPES:remove = " teziimg"
 
KERNEL_IMAGETYPE:aarch64_mender-grub = "Image"
IMAGE_BOOT_FILES:remove:mender-grub = "boot.scr-verdin-imx8mm;boot.scr"
 
IMAGE_BOOT_FILES:remove:mender-uboot = "zImage ${KERNEL_DEVICETREE} overlays.txt overlays/*;overlays/"

MENDER_IMAGE_BOOTLOADER_BOOTSECTOR_OFFSET:apalis-imx8 = "0"
MENDER_BOOT_PART_SIZE_MB:apalis-imx8 = "32"
OFFSET_SPL_PAYLOAD:apalis-imx8 = ""
MENDER_STORAGE_DEVICE:apalis-imx8 = "/dev/mmcblk0"
MENDER_STORAGE_TOTAL_SIZE_MB:apalis-imx8 = "12288" 
MENDER_UBOOT_POST_SETUP_COMMANDS:append = " ; setenv tdxargs ${tdxargs} ${bootargs}; "

MENDER_UBOOT_POST_SETUP_COMMANDS:append = " ; setenv overlays_file /boot/overlays.txt;setenv overlays_prefix boot/overlays/ "

```

Build an image:

```auto
bitbake b2qt-embedded-qt6-image

```

for the recommended demo image by Qt, or

```auto
bitbake core-image-minimal

```

There might be a warning or error while applying patches to `u-boot-toradex`. In that case refreshing the the patch `0001-Adapt-boot.cmd.in-to-Mender` might be necessary.

After the build completes , `.mender` and `.mender_tezi.tar` files are available

Follow the standard procedure to update the mender builds afterwards.

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [June 16, 2023, 9:01am UTC](https://hub.mender.io/t/how-to-manage-your-qt-based-embedded-linux-device-with-mender-apalis-imx8/5921/2 "2023-06-16T09:01:07Z")

</div>

Hi @dhiry2k,

Thanks a lot for the contribution. I am currently replicating and verifying the steps, and there are some places where typos need to be fixed or minor additions are required. I am taking the liberty of adding it to your original post. Hope this is okay for you.

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![dhiry2k](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@dhiry2k](https://hub.mender.io/u/dhiry2k)\
**Post date:** [June 16, 2023, 9:13am UTC](https://hub.mender.io/t/how-to-manage-your-qt-based-embedded-linux-device-with-mender-apalis-imx8/5921/3 "2023-06-16T09:13:13Z")

</div>

please feel free do edit the post as required. i am new here , hopefully able to contribute in much better manner after few posts 🙂

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [June 16, 2023, 9:35am UTC](https://hub.mender.io/t/how-to-manage-your-qt-based-embedded-linux-device-with-mender-apalis-imx8/5921/4 "2023-06-16T09:35:47Z")

</div>

@dhiry2k

It is already a great contribution!❤

One question: after cloning the Mender layers, you jump directly to invoking `b2qt-init-build-env`. As I understand it, here some essential piece of information is missing. The script is not located in the current, top level directory, and changing into `sources/meta-boot2qt` before the invocation also does not do the trick. Can you maybe point out how you got to this stage? Thanks!

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![dhiry2k](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@dhiry2k](https://hub.mender.io/u/dhiry2k)\
**Post date:** [June 16, 2023, 10:24am UTC](https://hub.mender.io/t/how-to-manage-your-qt-based-embedded-linux-device-with-mender-apalis-imx8/5921/5 "2023-06-16T10:24:20Z")

</div>

It does, but yes, you need to register before using qt manifests and need to have a licence i beleive. I have that licence so i am able to pass that stage. See attached picture.

 ![metaboot](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/0/050b9b68942b9f72709a70e6934c8212934a29c9.png)

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [June 16, 2023, 10:28am UTC](https://hub.mender.io/t/how-to-manage-your-qt-based-embedded-linux-device-with-mender-apalis-imx8/5921/6 "2023-06-16T10:28:46Z")

</div>

Hmm that does not match my resulting setup. If I follow the earlier parts of the text, then `meta-boot2qt` is located under `sources`, and not in the top level directory. So if I enter `sources/meta-boot2qt` and issue the command there, it fails with

```auto
jd@j-kaitain:~/builds/boot2qt/sources/meta-boot2qt$ ./b2qt-init-build-env init --device apalix-imx8

... A new version of repo (2.32) is available.
... New version is available at: /home/jd/builds/boot2qt/.repo/repo/repo
... The launcher is run from: /usr/bin/repo
!!! The launcher is not writable. Please talk to your sysadmin or distro
!!! to get an update installed.

repo: reusing existing repo client checkout in /home/jd/builds/boot2qt

manifests:
fatal: '/home/jd/builds/boot2qt/sources/meta-boot2qt/.repo/repo' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
manifests: sleeping 4.0 seconds before retrying

manifests:
fatal: '/home/jd/builds/boot2qt/sources/meta-boot2qt/.repo/repo' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: cannot obtain manifest /home/jd/builds/boot2qt/sources/meta-boot2qt/.repo/rep

```

so my understanding is that there is some inherent difference between the documented setup and its directory structure, and the one that you are using. It doesn’t seem to be license related.

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![dhiry2k](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@dhiry2k](https://hub.mender.io/u/dhiry2k)\
**Post date:** [June 16, 2023, 10:36am UTC](https://hub.mender.io/t/how-to-manage-your-qt-based-embedded-linux-device-with-mender-apalis-imx8/5921/7 "2023-06-16T10:36:39Z")

</div>

aah yes, i did followed [this](https://wiki.qt.io/Setting_up_Gerrit) as well to setup my Qt account.

[https://wiki.qt.io/Setting\_up\_Gerrit](https://wiki.qt.io/Setting_up_Gerrit)

This sets up your syetem with correct access rights.

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [June 23, 2023, 11:06am UTC](https://hub.mender.io/t/how-to-manage-your-qt-based-embedded-linux-device-with-mender-apalis-imx8/5921/8 "2023-06-23T11:06:10Z")

</div>

Hi @dhiry2k, I went through the instructions and it builds for me. Can you give it a short read and confirm that I did not break anything for you while editing?

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![dhiry2k](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@dhiry2k](https://hub.mender.io/u/dhiry2k)\
**Post date:** [July 11, 2023, 1:05pm UTC](https://hub.mender.io/t/how-to-manage-your-qt-based-embedded-linux-device-with-mender-apalis-imx8/5921/9 "2023-07-11T13:05:23Z")

</div>

sorry for the late reply. yes that is fine and worked great on my system .

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [April 15, 2025, 2:36pm UTC](https://hub.mender.io/t/how-to-manage-your-qt-based-embedded-linux-device-with-mender-apalis-imx8/5921/10 "2025-04-15T14:36:04Z")

</div>

A post was split to a new topic: [Yocto build fails, installed-but-not-shipped](https://hub.mender.io/t/yocto-build-fails-installed-but-not-shipped/7722)

---

<div class="post-metadata">

**Author:** ![AYJF](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ayjf/32/2639_2.png) [@AYJF](https://hub.mender.io/u/AYJF)\
**Post date:** [December 16, 2025, 6:00am UTC](https://hub.mender.io/t/how-to-manage-your-qt-based-embedded-linux-device-with-mender-apalis-imx8/5921/11 "2025-12-16T06:00:30Z")

</div>

Hi @dhiry2k

Thank you again for sharing your experience integrating **Mender with Boot2Qt on the Apalis iMX8**. The board-specific details you provided are extremely helpful and not easy to find elsewhere.

While reviewing your setup and trying to adapt it to newer Yocto releases, I noticed that on more recent branches (for example **Scarthgap** ), **`meta-mender-community` no longer contains the `meta-mender-toradex-nxp` layer**. This makes it less clear how Toradex-specific integration is expected to be handled going forward.

I wanted to ask if you are aware of:

- an updated or replacement layer for **`meta-mender-toradex-nxp`** on newer Yocto branches, or

- recommended changes needed to achieve a similar level of integration on **Scarthgap** (for example, changes that have moved into Toradex BSPs, Mender core layers, or custom overrides)

Any guidance or pointers you might have would be greatly appreciated, as this would help others trying to move from Kirkstone to newer Yocto versions while keeping Mender and Boot2Qt working together.

Thanks again for taking the time to document and share your experience.

Thanks again for sharing your experience — it’s much appreciated.

Best regards,

Alvaro

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [December 16, 2025, 11:33am UTC](https://hub.mender.io/t/how-to-manage-your-qt-based-embedded-linux-device-with-mender-apalis-imx8/5921/12 "2025-12-16T11:33:33Z")

</div>

HI @AYJF,

Thanks for reaching out! The `meta-mender-toradex-nxp` layer is not available on the `scarthgap` release (yet), as nobody took the effort to finalize and check the forward porting yet. There is a PR in flight [here](https://github.com/mendersoftware/meta-mender-community/pull/466), but it probably still has some rough edges and needs verification plus polish.

From my understanding, the forward porting of the boot2qt setup should be very similar, and I’m happy to help test-build it for upstreaming, but it is not something that I can drive by myself or test on hardware.

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![AYJF](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ayjf/32/2639_2.png) [@AYJF](https://hub.mender.io/u/AYJF)\
**Post date:** [December 20, 2025, 1:39am UTC](https://hub.mender.io/t/how-to-manage-your-qt-based-embedded-linux-device-with-mender-apalis-imx8/5921/13 "2025-12-20T01:39:00Z")

</div>

Hi Josef,

Thanks for the info! I followed the link to the PR you provided, and it worked perfectly. My setup is Boot2Qt 6.10, Verdin iMX8 Mini, Ivy carrier board. The only change I made was removing the extra freescale word in the environment command:

```auto
set_bootcmd_dtb 'env set bootcmd_dtb "echo Loading DeviceTree: \${fdtfile}; ${load_cmd} \${fdt_addr_r} \${load_prefix}\${fdtfile}"'

```

under `/meta-mender-community/meta-mender-toradex-nxp/recipes-bsp/u-boot-distro-boot/files/toradex-bsp-7.1.0`.

I hope the community continues supporting this setup — I tested it and was able to successfully deploy an app.

Thanks again for pointing me to the PR!

Best regards,  
Alvaro
