# IMX8DXL Mender integration of yocto4.0

**URL:** https://hub.mender.io/t/imx8dxl-mender-integration-of-yocto4-0/6117
**Category:** Board Integrations
**Tags:** yocto, nxp
**Created:** [August 17, 2023, 5:03am UTC](https://hub.mender.io/t/imx8dxl-mender-integration-of-yocto4-0/6117 "2023-08-17T05:03:35Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![tanushree.chandrashe](https://avatars.discourse-cdn.com/v4/letter/t/a88e57/32.png) [@tanushree.chandrashe](https://hub.mender.io/u/tanushree.chandrashe)
#### Post date: [August 17, 2023, 5:03am UTC](https://hub.mender.io/t/imx8dxl-mender-integration-of-yocto4-0/6117/1 "2023-08-17T05:03:35Z")

</div>

I am using IMX8DXL platform , succesfully build the yocto but unable to boot in the board and also below is the log attached we are getting .

 ![Screenshot from 2023-08-17 10-32-37](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/c/ccf9867f7bfc759c670eafe6677d0ab98fae9ce3.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: [August 17, 2023, 9:20am UTC](https://hub.mender.io/t/imx8dxl-mender-integration-of-yocto4-0/6117/2 "2023-08-17T09:20:22Z")

</div>

Hi @tanushree.chandrashe,

Without knowing the board in question or how the integration looks like, its hard to give advice. Guessing, I would say that the Mender integration needs to be aligned with the specific boot scripts in `u-boot`.

Greetz,  
Josef

---

<div class="post-metadata">

### Author: ![tanushree.chandrashe](https://avatars.discourse-cdn.com/v4/letter/t/a88e57/32.png) [@tanushree.chandrashe](https://hub.mender.io/u/tanushree.chandrashe)
#### Post date: [August 21, 2023, 9:55am UTC](https://hub.mender.io/t/imx8dxl-mender-integration-of-yocto4-0/6117/3 "2023-08-21T09:55:16Z")

</div>

Hi  
I am trying to integrate mender on IMX8DXL.I have correctly 4 partitions and everything seems to be in place. but result was once it flashed booting is correctly when i powerd off and on then its not booting untill the next flash.  
This is the build configuration  
BB\_VERSION = “2.0.0”  
BUILD\_SYS = “x86\_64-linux”  
NATIVELSBSTRING = “universal”  
TARGET\_SYS = “aarch64-poky-linux”  
MACHINE = “imx8dxl-iwg46s”  
DISTRO = “fsl-imx-xwayland”  
DISTRO\_VERSION = “5.15-kirkstone”  
TUNE\_FEATURES = “aarch64 armv8a crc crypto”

below is the machine configuration file  
MENDER\_STORAGE\_DEVICE\_DEFAULT = “/dev/mmcblk0”  
MENDER\_STORAGE\_DEVICE\_DEFAULT = “/dev/mmcblk0”  
MENDER\_STORAGE\_DEVICE\_BASE = “/dev/mmcblk0p”  
MENDER\_STORAGE\_TOTAL\_SIZE\_MB = “8192”  
MENDER\_BOOT\_PART\_SIZE\_MB = “0”  
MENDER\_DATA\_PART\_SIZE\_MB = “128”  
MENDER\_ROOTFS\_PART\_A = “${MENDER\_STORAGE\_DEVICE\_BASE}1”  
MENDER\_ROOTFS\_PART\_B = “${MENDER\_STORAGE\_DEVICE\_BASE}2”  
MENDER\_DATA\_PART = “${MENDER\_STORAGE\_DEVICE\_BASE}3”  
MENDER\_PERSISTENT\_CONFIGURATION\_VARS = “RootfsPartA RootfsPartB”  
MENDER\_UBOOT\_ENV\_STORAGE\_DEVICE\_OFFSET\_1 = “0x2000”

# Redundant environment

MENDER\_UBOOT\_ENV\_STORAGE\_DEVICE\_OFFSET\_2 = “0x4000”  
BOOTENV\_SIZE = “0xE0000”  
MENDER\_UBOOT\_PRE\_SETUP\_COMMANDS = “setenv kernel\_addr\_r ${loadaddr}; setenv bootargsconsole=ttyLP0,115200; setenv fdt\_addr\_r 0x83000000”  
MENDER\_SERVER\_URL = “[https://hosted.mender.io](https://hosted.mender.io)”

This is the log when i bitbake the u-boot  
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]  
WARNING: core-image-minimal-1.0-r0 do\_image\_sdimg: MENDER\_BOOT\_PART\_SIZE\_MB is set to zero, but IMAGE\_BOOT\_FILES is not empty. The files are being omitted from the image.

---

<div class="post-metadata">

### Author: ![tanushree.chandrashe](https://avatars.discourse-cdn.com/v4/letter/t/a88e57/32.png) [@tanushree.chandrashe](https://hub.mender.io/u/tanushree.chandrashe)
#### Post date: [October 5, 2023, 9:03am UTC](https://hub.mender.io/t/imx8dxl-mender-integration-of-yocto4-0/6117/5 "2023-10-05T09:03:42Z")

</div>

Hi i am trying to integrate mender on IMX8DXL with 5.15.52 BSP.  
I am facing issue with values causing some of the functionalities to fail during testing.  
MENDER\_UBOOT\_ENV\_STORAGE\_DEVICE\_OFFSET\_1 = “0x2000”

# Redundant environment

MENDER\_UBOOT\_ENV\_STORAGE\_DEVICE\_OFFSET\_2 = “0x4000”  
BOOTENV\_SIZE = “0xE0000”

I have tried different values, still no luck.

Do u have any suggestions to fix this.  
is there any relation between OFFSET and suspend-to-RAM (put device to sleep)?  
our issue was device is not going to sleep it gives write error.

---

<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: [October 5, 2023, 1:08pm UTC](https://hub.mender.io/t/imx8dxl-mender-integration-of-yocto4-0/6117/6 "2023-10-05T13:08:10Z")

</div>

Hi @tanushree.chandrashe,

Trying random values won’t do the trick here. The rationale here is making sure that the `u-boot` environment is properly set up and accessible. So these values need to reflect the `u-boot` config. You should have set `CONFIG_ENV_IS_IN_MMC` there, along with values for `CONFIG_ENV_OFFSET` and `CONFIG_ENV_OFFSET_REDUND`. Those are the values you need pass into `MENDER_UBOOT_ENV_STORAGE_DEVICE_OFFSET_1` and `MENDER_UBOOT_ENV_STORAGE_OFFSET_2". For an example on how the `u-boot` config patch might look like, see the Raspberry Pi version of the patch [here](https://github.com/mendersoftware/meta-mender/blob/master/meta-mender-raspberrypi/recipes-bsp/u-boot/patches/0001-configs-rpi-enable-mender-requirements.patch).

Summary: First you need to configure `u-boot` such that it fulfills the Mender requirements, then you need to tell Mender the specifics.

Greetz,  
Josef

---

<div class="post-metadata">

### Author: ![tanushree.chandrashe](https://avatars.discourse-cdn.com/v4/letter/t/a88e57/32.png) [@tanushree.chandrashe](https://hub.mender.io/u/tanushree.chandrashe)
#### Post date: [October 5, 2023, 2:09pm UTC](https://hub.mender.io/t/imx8dxl-mender-integration-of-yocto4-0/6117/7 "2023-10-05T14:09:59Z")

</div>

Hi,  
In U-boot CONFIG\_ENV\_IS\_IN\_MMC was set and  
MENDER\_UBOOT\_ENV\_STORAGE\_DEVICE\_OFFSET\_1 is set to 400000  
MENDER\_UBOOT\_ENV\_STORAGE\_OFFSET\_2 is set to 600000 .  
In normal standard yocto with same software CPU suspend mode it going to sleep works fine but when we integrate to mender writing to suspend mode it give write error all other mender integration related its worked fine.  
Is there any specific configuration for writing to suspend mode in mender?

---

<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: [October 6, 2023, 7:19am UTC](https://hub.mender.io/t/imx8dxl-mender-integration-of-yocto4-0/6117/8 "2023-10-06T07:19:24Z")

</div>

Hi @tanushree.chandrashe,

We do not have any reports on conflicts between standby mode and the Mender integration. I can imagine that there are cross effects during resume, depending on the flow `u-boot` follows here, but nobody has stepped up to evaluate and polish it so far. If your use case requires it, we are happy to review and help with upstreaming patches.

Greetz,  
Josef

---

<div class="post-metadata">

### Author: ![tanushree.chandrashe](https://avatars.discourse-cdn.com/v4/letter/t/a88e57/32.png) [@tanushree.chandrashe](https://hub.mender.io/u/tanushree.chandrashe)
#### Post date: [October 6, 2023, 7:45am UTC](https://hub.mender.io/t/imx8dxl-mender-integration-of-yocto4-0/6117/9 "2023-10-06T07:45:34Z")

</div>

hi @TheYoctoJester  
Yes it requires once again i will share machine configuration file with worked mender.

MENDER\_STORAGE\_DEVICE\_imx8dxlevk = “/dev/mmcblk0”  
MENDER\_STORAGE\_DEVICE = “/dev/mmcblk0”

INHERIT += “mender-full”  
IMAGE\_FSTYPES:remove = “sdcard.bz2”  
IMAGE\_FSTYPES:append = " dataimg"  
MENDER\_ARTIFACT\_NAME = “release-2.1”  
MENDER\_FEATURES\_ENABLE:append = " mender-uboot mender-image-sd"  
MENDER\_FEATURES\_DISABLE:append = " mender-grub mender-image-uefi"  
#MENDER\_STORAGE\_DEVICE\_DEFAULT = “/dev/mmcblk0”  
#MENDER\_STORAGE\_DEVICE\_DEFAULT = “/dev/mmcblk0”  
MENDER\_STORAGE\_DEVICE\_BASE = “/dev/mmcblk0p”  
MENDER\_UBOOT\_STORAGE\_DEVICE\_imx8dxl-iwg46s = “0”  
MENDER\_STORAGE\_TOTAL\_SIZE\_MB = “8192”  
MENDER\_BOOT\_PART\_SIZE\_MB = “0”  
MENDER\_DATA\_PART\_SIZE\_MB = “128”  
MENDER\_ROOTFS\_PART\_A = “${MENDER\_STORAGE\_DEVICE\_BASE}1”  
MENDER\_ROOTFS\_PART\_B = “${MENDER\_STORAGE\_DEVICE\_BASE}2”  
MENDER\_DATA\_PART = “${MENDER\_STORAGE\_DEVICE\_BASE}3”  
MENDER\_PERSISTENT\_CONFIGURATION\_VARS = “RootfsPartA RootfsPartB”  
#OPTEE\_BIN\_EXT = “”  
MENDER\_IMAGE\_BOOTLOADER\_BOOTSECTOR\_OFFSET = “10”

# For rootfs size

IMAGE\_ROOTFS\_SIZE=“1887437”  
ARTIFACTIMG\_FSTYPE = “ext4”  
EXTRA\_IMAGECMD\_ext4 = " -b 1024"

# Environment

MENDER\_UBOOT\_ENV\_STORAGE\_DEVICE\_OFFSET\_1 = “0x400000”

# Redundant environment

MENDER\_UBOOT\_ENV\_STORAGE\_DEVICE\_OFFSET\_2 = “0x600000”  
BOOTENV\_SIZE = “0x2000”  
MENDER\_UBOOT\_PRE\_SETUP\_COMMANDS = “setenv kernel\_addr\_r ${loadaddr}; setenv bootargsconsole=ttyLP0,115200; setenv fdt\_addr\_r 0x83000000”

OPTLEVEL:remove = “-O2”

# For enabling Mender 2.6.0

PREFERRED\_VERSION\_pn-mender = “3.1.%”  
PREFERRED\_VERSION\_pn-mender-artifact = “3.6.%”  
PREFERRED\_VERSION\_pn-mender-artifact-native = “3.6.%”

# Build for hosted Mender

MENDER\_SERVER\_URL = “[https://hosted.mender.io](https://hosted.mender.io)”

MENDER\_TENANT\_TOKEN = “”

and also whatever mention in the previous reply that configs are already set and this all about suspend to RAM sleep wakeup.  
can give a suggestion to fix this?

---

<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: [October 6, 2023, 7:58am UTC](https://hub.mender.io/t/imx8dxl-mender-integration-of-yocto4-0/6117/10 "2023-10-06T07:58:25Z")

</div>

Hi @tanushree.chandrashe,

As already pointed out: if the integration works without using standby, then the common parts are okay. I assume that the boot flow in `u-boot` is different for the wakeup than for a cold boot, so you’d have to dig there and find out where the difference is, and eventually change/fix it.

We do not have any reports on standby related issues.

Greetz,  
Josef
