# i.MX 8MM mender integration error

**URL:** <https://hub.mender.io/t/i-mx-8mm-mender-integration-error/2701>\
**Category:** General Discussions\
**Tags:** nxp, u-boot, zeus, imx8mm\
**Created:** [October 21, 2020, 6:50am UTC](https://hub.mender.io/t/i-mx-8mm-mender-integration-error/2701 "2020-10-21T06:50:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![danie](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/danie/32/620_2.png) [@danie](https://hub.mender.io/u/danie)\
**Post date:** [October 21, 2020, 6:50am UTC](https://hub.mender.io/t/i-mx-8mm-mender-integration-error/2701/1 "2020-10-21T06:50:05Z")

</div>

Hi,

I’m integrating mender with Yocto zeus for i.MX 8mm EVK. The build completed sucessfully without any errors but when I try to boot the device I get the following error.

```auto
Hit any key to stop autoboot: 0 
Run CMD11 1.8V switch
switch to partitions #0, OK
mmc1 is current device
Run CMD11 1.8V switch
**Unrecognized filesystem type**
## Error: "mender_setup" not defined
**Bad device specification 0x40480000 boot/Image**
## Error: "mender_try_to_recover" not defined
Booting from net ...

```

I follow the meta-mender-community integration for i.MX 8mm and modded it to support zeus. Full u-boot environmental variables are attached below for your reference.

```auto
u-boot=> printenv 
baudrate=115200
boot_fdt=try
bootcmd=mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else run mender_setup; if run loadimage; then run mmcboot; run mender_try_to_recover; else run mender_try_to_recover; ru
n netboot; fi; fi; else booti ${loadaddr} - ${fdt_addr}; fi
bootcmd_mfg=run mfgtool_args;if iminfo ${initrd_addr}; then if test ${tee} = yes; then bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; else booti ${loadaddr} ${initrd_addr} ${fdt_addr}; fi; else echo "Run fastboot
 ..."; fastboot 0; fi;
bootcount=1
bootdelay=2
bootscript=echo Running bootscript from mmc ...; source
console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200
emmc_dev=2
ethaddr=00:04:9f:06:b0:2c
ethprime=FEC
fastboot_dev=mmc1
fdt_addr=0x43000000
fdt_file=boot/imx8mm-evk.dtb
fdt_high=0xffffffffffffffff
fdtcontroladdr=bc910748
image=boot/Image
initrd_addr=0x43800000
initrd_high=0xffffffffffffffff
jh_clk= 
jh_mmcboot=mw 0x303d0518 0xff; setenv fdt_file imx8mm-evk-root.dtb;setenv jh_clk clk_ignore_unused; if run loadimage; then run mmcboot; else run jh_netboot; fi; 
jh_netboot=mw 0x303d0518 0xff; setenv fdt_file imx8mm-evk-root.dtb; setenv jh_clk clk_ignore_unused; run netboot; 
kboot=booti 
loadaddr=0x40480000
loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
loadfdt=ext4load ${mender_uboot_root} ${fdt_addr} ${fdt_file}
loadimage=ext4load ${mender_uboot_root} ${loadaddr} ${image}
mfgtool_args=setenv bootargs console=${console},${baudrate} rdinit=/linuxrc clk_ignore_unused 
mmcargs=setenv bootargs ${jh_clk} console=${console} root=${mender_kernel_root}
mmcautodetect=yes
mmcboot=echo Booting from mmc ...; run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then booti ${loadaddr} - ${fdt_addr}; else echo WARN: Cannot load the DT; fi; else echo w
ait for boot; fi;
mmcdev=1
mmcpart=1
mmcroot=/dev/mmcblk1p2 rootwait rw
nandfit_part=yes
netargs=setenv bootargs ${jh_clk} console=${console} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${loadaddr} ${image}; if test ${boot_fdt} = yes || test ${boot_fdt} = 
try; then if ${get_cmd} ${fdt_addr} ${fdt_file}; then booti ${loadaddr} - ${fdt_addr}; else echo WARN: Cannot load the DT; fi; else booti; fi;
script=boot.scr
sd_dev=1
serial#=1e1d1a09dab45cbf
soc_type=imx8mm

Environment size: 2453/4092 bytes

```

I’m lost at this point and any help would be much appreciated. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![bhstalel](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/bhstalel/32/855_2.png) [@bhstalel](https://hub.mender.io/u/bhstalel)\
**Post date:** [October 21, 2020, 7:44am UTC](https://hub.mender.io/t/i-mx-8mm-mender-integration-error/2701/2 "2020-10-21T07:44:29Z")

</div>

Hi danie,

I’m currently working on MENDER zeus with IMX8M MINI EVK,  
I already asked this question, and there is a wip branch holding support for IMX8M MINI on zeus,  
Please check my post for details :

> [@Is there a support for meta-mender-imx on zeus?](https://hub.mender.io/t/is-there-a-support-for-meta-mender-imx-on-zeus/2669):
>
> Hello All, I’m working on a custom board based on IMX8M Mini, before NXP released the zeus branch, I was working on sumo branch and using meta-mender-core and meta-mender-imx for IMX8 support, and all of that based on Uboot2018. But now, I’m trying to work on zeus branch, but I cannot find support for meta-mender-imx in meta-mender-community zeus branch. Is it gonna be supported ? Thanks, Talel

Best Regards, Talel

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [October 21, 2020, 9:27pm UTC](https://hub.mender.io/t/i-mx-8mm-mender-integration-error/2701/3 "2020-10-21T21:27:05Z")

</div>

Hi @danie does running the following help?

```
u-boot=> env default -a -f
u-boot=> saveenv
u-boot=> reset

```

I have a port to that platform in my fork here: [https://github.com/drewmoseley/meta-mender-community/tree/wip-zeus-imx-next](https://github.com/drewmoseley/meta-mender-community/tree/wip-zeus-imx-next)  
It’s untested since I don’t have the hardware but it is virtually identical to the imx8mnevk which I do have.

That port uses UEFI-GRUB as it’s bootloader integration point rather than U-Boot. If you want to give it a try please let me know how it goes.

Drew

---

<div class="post-metadata">

**Author:** ![danie](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/danie/32/620_2.png) [@danie](https://hub.mender.io/u/danie)\
**Post date:** [October 22, 2020, 5:26am UTC](https://hub.mender.io/t/i-mx-8mm-mender-integration-error/2701/4 "2020-10-22T05:26:30Z")

</div>

Hi,

Thanks for the message, I’m not comfortable in using GRUB bootloader as I’m interested in HAB (High Assurance Boot) from NXP.

---

<div class="post-metadata">

**Author:** ![danie](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/danie/32/620_2.png) [@danie](https://hub.mender.io/u/danie)\
**Post date:** [October 22, 2020, 7:23am UTC](https://hub.mender.io/t/i-mx-8mm-mender-integration-error/2701/5 "2020-10-22T07:23:45Z")

</div>

I tried your commands in u-boot console, yet no change. Same error is occuring:

```auto
Normal Boot
Hit any key to stop autoboot: 0 
Run CMD11 1.8V switch
switch to partitions #0, OK
mmc1 is current device
Run CMD11 1.8V switch
**Unrecognized filesystem type**
## Error: "mender_setup" not defined
**Bad device specification 0x40480000 boot/Image**
## Error: "mender_try_to_recover" not defined

```

and here’s my entire environmental variables:

```auto
u-boot=> printenv 
baudrate=115200
boot_fdt=try
bootcmd=mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else run mender_setup; if run loadimage; then run mmcboot; run mender_try_to_recover; else run mender_try_to_recover; run netboot; fi; fi; else booti ${loadaddr} - ${fdt_addr}; fi
bootcmd_mfg=run mfgtool_args;if iminfo ${initrd_addr}; then if test ${tee} = yes; then bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; else booti ${loadaddr} ${initrd_addr} ${fdt_addr}; fi; else echo "Run fastboot ..."; fastboot 0; fi;
bootcount=1
bootdelay=2
bootscript=echo Running bootscript from mmc ...; source
console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200
emmc_dev=2
ethaddr=00:04:9f:06:b0:2c
ethprime=FEC
fastboot_dev=mmc1
fdt_addr=0x43000000
fdt_file=boot/imx8mm-evk.dtb
fdt_high=0xffffffffffffffff
fdtcontroladdr=bc910748
image=boot/Image
initrd_addr=0x43800000
initrd_high=0xffffffffffffffff
jh_clk= 
jh_mmcboot=mw 0x303d0518 0xff; setenv fdt_file imx8mm-evk-root.dtb;setenv jh_clk clk_ignore_unused; if run loadimage; then run mmcboot; else run jh_netboot; fi; 
jh_netboot=mw 0x303d0518 0xff; setenv fdt_file imx8mm-evk-root.dtb; setenv jh_clk clk_ignore_unused; run netboot; 
kboot=booti 
loadaddr=0x40480000
loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
loadfdt=ext4load ${mender_uboot_root} ${fdt_addr} ${fdt_file}
loadimage=ext4load ${mender_uboot_root} ${loadaddr} ${image}
mfgtool_args=setenv bootargs console=${console},${baudrate} rdinit=/linuxrc clk_ignore_unused 
mmcargs=setenv bootargs ${jh_clk} console=${console} root=${mender_kernel_root}
mmcautodetect=yes
mmcboot=echo Booting from mmc ...; run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then booti ${loadaddr} - ${fdt_addr}; else echo WARN: Cannot load the DT; fi; else echo wait for boot; fi;
mmcdev=1
mmcpart=1
mmcroot=/dev/mmcblk1p2 rootwait rw
nandfit_part=yes
netargs=setenv bootargs ${jh_clk} console=${console} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${loadaddr} ${image}; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if ${get_cmd} ${fdt_addr} ${fdt_file}; then booti ${loadaddr} - ${fdt_addr}; else echo WARN: Cannot load the DT; fi; else booti; fi;
script=boot.scr
sd_dev=1
serial#=1e1d1a09dab45cbf
soc_type=imx8mm

Environment size: 2453/4092 bytes

```

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [October 22, 2020, 4:30pm UTC](https://hub.mender.io/t/i-mx-8mm-mender-integration-error/2701/6 "2020-10-22T16:30:13Z")

</div>

In that case you will need to do a custom integration that uses [U-Boot rather than Grub](https://docs.mender.io/system-updates-yocto-project/board-integration/bootloader-support/u-boot).

You don’t have all of the Mender boot code integrated into your U-Boot environment.

Drew
