Is there a support for meta-mender-imx on zeus?

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

Hi @bhstalel not yet but it is something I am actively working on this week. I only have the imx8m NANO so once I have something functioning, it would be great if you can help validate on the Mini.

Drew

Great news,

You have a custom imx8m nano ? or an EVK ?

For the moment our custom IMX8M Mini uses custom RAM also, and NXP still does not support RAM calibration for Uboot 2020, so the meta-mender-imx confirmation cannot be ready with our custom board.

But, I have an IMX8M Mini EVK and I can use it to test the new meta-mender-imx. And after that I will try to adapt that to our custom board, just like I did with the sumo meta-mender-imx.

Thanks, Talel

I have the EVK. I was able to get it to work with the 5.4.3_2.1.0 BSP
Drew

Great,

So, let me know if the layer is ready so I can test on the Mini.

Thanks, Talel

@bhstalel the PR with this change is here: https://github.com/mendersoftware/meta-mender-community/pull/179

I verified that imx8mmevk builds but I don’t have hardware to do a runtime test. Can you check on your end?

1 Like

Hi,

I have an IMX8M MINI evalboard, I did clone your wip-zeus-imx branch with the meta-mender-core:zeus, and I’m building now for MACHINE=imx8mmevk

@drewmoseley what NXP release version are you using ?

5.4.3-2.2.0

I’ve submitted the repo change to NXP but you can use my fork in the meantime.
Drew

1 Like

I’m using the latest release “5.4.47 , 30 september 2020” from here.

And I got an error patching u-boot-imx, your patch is not compatible with the three files:

  • imx8mm_ddr4_evk_defconfig
  • imx8mm_evk_defconfig
  • imx8mm_evk.h

Here is the Yocto patching error log:

Applying patch 0001-Switch-to-CONFIG_DISTRO_DEFAULTS-for-bootcmd.patch

patching file configs/imx8mm_ddr4_evk_defconfig
Hunk #1 FAILED at 80.
1 out of 1 hunk FAILED -- rejects in file configs/imx8mm_ddr4_evk_defconfig

patching file configs/imx8mm_evk_defconfig
Hunk #1 FAILED at 88.
1 out of 1 hunk FAILED -- rejects in file configs/imx8mm_evk_defconfig

patching file include/configs/imx8mm_evk.h
Hunk #1 succeeded at 49 (offset -23 lines).
Hunk #2 succeeded at 80 (offset -42 lines).
Hunk #3 FAILED at 141.
Hunk #4 FAILED at 150.
Hunk #5 FAILED at 246.
Hunk #6 succeeded at 270 (offset -71 lines).
3 out of 6 hunks FAILED -- rejects in file include/configs/imx8mm_evk.h

I did download the release in a clean directoy, and started everything from scratch, even creating a new clean sstate-cache and downloads folders.

I did actuallty try to separate your patch and adapt it to the newest release, because your patch will not be correct for the latest release, for example:

  • CONFIG_IMX_SEC_MIPI_DSI=y do not exist in imx8mm_evk_defconfig of the latest release and that flag is used in your patch to add a line next to it.

  • CONFIG_ENV_SIZE do not exist in imx8m_evk.h

And I’m now waiting for it to complete compiling.

Here are the three patches:
imx8mm_ddr4_evk_defconfig

From d626ff5a993477c2d75685ededfc201403b786e4 Mon Sep 17 00:00:00 2001
From: TALEL BelHadj Salem <talel.hajsalem@sofia-technologies.com>
Date: Tue, 20 Oct 2020 14:06:30 +0100
Subject: [PATCH] Switch to CONFIG_DISTRO_DEFAULTS for bootcmd (imx8mm_ddr4_evk_defconfig)
---
configs/imx8mm_ddr4_evk_defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configs/imx8mm_ddr4_evk_defconfig b/configs/imx8mm_ddr4_evk_defconfig
index bef944f..d57d874 100644
--- a/configs/imx8mm_ddr4_evk_defconfig
+++ b/configs/imx8mm_ddr4_evk_defconfig
@@ -123,6 +123,8 @@ CONFIG_NAND=y
CONFIG_NAND_MXS=y
CONFIG_NAND_MXS_DT=y
+CONFIG_EFI_LOADER=y
+CONFIG_DISTRO_DEFAULTS=y
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_REGMAP=y
--
2.7.4

imx8mm_evk_defconfig

From 42975c89f6528a298cc22b609bd9385b8d85c201 Mon Sep 17 00:00:00 2001
From: TALEL BelHadj Salem <talel.hajsalem@sofia-technologies.com>
Date: Tue, 20 Oct 2020 14:12:48 +0100
Subject: [PATCH] Switch to CONFIG_DISTRO_DEFAULTS for bootcmd. (imx8mm_evk_defconfig)
---
configs/imx8mm_evk_defconfig | 3 +++
1 file changed, 3 insertions(+)
diff --git a/configs/imx8mm_evk_defconfig b/configs/imx8mm_evk_defconfig
index 25044aa..5b74d63 100644
--- a/configs/imx8mm_evk_defconfig
+++ b/configs/imx8mm_evk_defconfig
@@ -139,3 +139,6 @@ CONFIG_DM_VIDEO=y
CONFIG_VIDEO_LCD_RAYDIUM_RM67191=y
CONFIG_VIDEO_ADV7535=y
CONFIG_SYS_WHITE_ON_BLACK=y
+
+CONFIG_EFI_LOADER=y
+CONFIG_DISTRO_DEFAULTS=y
\ No newline at end of file
--
2.7.4

imx8mm_evk.h

From 38a52f8382623f514e49c7b599ceabc5a6259dfa Mon Sep 17 00:00:00 2001
From: TALEL BelHadj Salem <talel.hajsalem@sofia-technologies.com>
Date: Tue, 20 Oct 2020 14:26:18 +0100
Subject: [PATCH] Switch to CONFIG_DISTRO_DEFAULTS for bootcmd. (imx8mm_evk.h)
---
 include/configs/imx8mm_evk.h | 80 ++++++++++----------------------------------
 1 file changed, 17 insertions(+), 63 deletions(-)
diff --git a/include/configs/imx8mm_evk.h b/include/configs/imx8mm_evk.h
index 0f0c1b2..a4a9f0a 100644
--- a/include/configs/imx8mm_evk.h
+++ b/include/configs/imx8mm_evk.h
@@ -48,7 +48,7 @@
 #define CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND \
 	(CONFIG_SYS_NAND_U_BOOT_OFFS + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512 - 0x8400)
 #endif
-
+#define BOOTENV
 #endif
 
 #define CONFIG_CMD_READ
@@ -79,12 +79,12 @@
  */
 #define JAILHOUSE_ENV \
 	"jh_clk= \0 " \
-	"jh_mmcboot=mw 0x303d0518 0xff; setenv fdt_file imx8mm-evk-root.dtb;" \
+	"jh_mmcboot=mw 0x303d0518 0xff; setenv fdtfile imx8mm-evk-root.dtb;" \
 		"setenv jh_clk clk_ignore_unused; " \
 			   "if run loadimage; then " \
 				   "run mmcboot; " \
 			   "else run jh_netboot; fi; \0" \
-	"jh_netboot=mw 0x303d0518 0xff; setenv fdt_file imx8mm-evk-root.dtb; setenv jh_clk clk_ignore_unused; run netboot; \0 "
+	"jh_netboot=mw 0x303d0518 0xff; setenv fdtfile imx8mm-evk-root.dtb; setenv jh_clk clk_ignore_unused; run netboot; \0 "
 
 #define CONFIG_MFG_ENV_SETTINGS \
@@ -99,7 +99,7 @@
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	CONFIG_MFG_ENV_SETTINGS \
 	"splashimage=0x50000000\0" \
-	"fdt_addr=0x43000000\0"			\
+	"fdt_addr_r=0x43000000\0"	\
 	"fdt_high=0xffffffffffffffff\0" \
 	"mtdparts=" MFG_NAND_PARTITION "\0" \
 	"console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200\0" \
@@ -108,76 +108,27 @@
 		MFG_NAND_PARTITION \
 		"\0" \
 	"bootcmd=nand read ${loadaddr} 0x5000000 0x2000000;"\
-		"nand read ${fdt_addr} 0x7000000 0x100000;"\
-		"booti ${loadaddr} - ${fdt_addr}"
+		"nand read ${fdt_addr_r} 0x7000000 0x100000;"\
+		"booti ${loadaddr} - ${fdt_addr_r}"
 #else
 #define CONFIG_EXTRA_ENV_SETTINGS		\
 	CONFIG_MFG_ENV_SETTINGS \
 	JAILHOUSE_ENV \
-	"script=boot.scr\0" \
-	"image=Image\0" \
+	BOOTENV \
 	"splashimage=0x50000000\0" \
 	"console=ttymxc1,115200\0" \
-	"fdt_addr=0x43000000\0"			\
+	"fdt_addr_r=0x43000000\0"			\
 	"fdt_high=0xffffffffffffffff\0"		\
 	"boot_fit=no\0" \
-	"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
+	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	"initrd_addr=0x43800000\0"		\
-	"initrd_high=0xffffffffffffffff\0" \
-	"mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
-	"mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
-	"mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
-	"mmcautodetect=yes\0" \
-	"mmcargs=setenv bootargs ${jh_clk} console=${console} root=${mmcroot}\0 " \
-	"loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
-	"bootscript=echo Running bootscript from mmc ...; " \
-		"source\0" \
-	"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
-	"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
-	"mmcboot=echo Booting from mmc ...; " \
-		"run mmcargs; " \
-		"if test ${boot_fit} = yes || test ${boot_fit} = try; then " \
-			"bootm ${loadaddr}; " \
-		"else " \
-			"if run loadfdt; then " \
-				"booti ${loadaddr} - ${fdt_addr}; " \
-			"else " \
-				"echo WARN: Cannot load the DT; " \
-			"fi; " \
-		"fi;\0" \
-	"netargs=setenv bootargs ${jh_clk} console=${console} " \
-		"root=/dev/nfs " \
-		"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
-	"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_fit} = yes || test ${boot_fit} = try; then " \
-			"bootm ${loadaddr}; " \
-		"else " \
-			"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
-				"booti ${loadaddr} - ${fdt_addr}; " \
-			"else " \
-				"echo WARN: Cannot load the DT; " \
-			"fi; " \
-		"fi;\0"
+	"initrd_high=0xffffffffffffffff\0"
 #define CONFIG_BOOTCOMMAND \
-	   "mmc dev ${mmcdev}; if mmc rescan; then " \
-		   "if run loadbootscript; then " \
-			   "run bootscript; " \
-		   "else " \
-			   "if run loadimage; then " \
-				   "run mmcboot; " \
-			   "else run netboot; " \
-			   "fi; " \
-		   "fi; " \
-	   "fi;"
+	   "setenv bootargs ${jh_clk} console=${console}; " \
+	   "setenv kernel_addr_r ${loadaddr}; " \
+	   "run distro_bootcmd;"
 #endif
 /* Link Definitions */
@@ -268,7 +219,10 @@
 #define CONFIG_CMD_USB_MASS_STORAGE
 #define CONFIG_USB_GADGET_MASS_STORAGE
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
-
+#define BOOT_TARGET_DEVICES(func) \
+        func(MMC, mmc, 2) \
+        func(MMC, mmc, 1)
+#include <config_distro_bootcmd.h>
 #endif
 #define CONFIG_USB_GADGET_VBUS_DRAW 2
-- 
2.7.4

Yeah, not terribly surprising since I had to use an older version of the BSP to support the imx8mnevk board that I have.

Drew

Hi,

I got an error in meta-mender-core/recipes-kernel/linux/boot-partition-devicetree.bb:do_install

> install: cannot stat '/media/talel/data/nxp_latest/mender/tmp/deploy/images/imx8mmevk/freescale/imx8mm-evk.dtb': No such file or directory

I noticied that it is looking into “tmp/deploy/images/imx8mmevk/freescale/imx8mm-evk.dtb”

but the imx8mmevk-evk.dtb is located directly into tmp/deploy/images/imx8mmevk

why it is looking into freescale ??

That’s just how the Freescale kernel is configured. You seem to be missing this patch. It was recently merged into Dunfell and Zeus.
Drew

Hi,

I’m stuck with this error;
I tried to remove mender layers and bitbake the image, all was done with no errors.
But when I tried to add mender layer, got the same error again with do_install of boot-partition-devicetree.bb :

DEBUG: Executing python function extend_recipe_sysroot
NOTE: Direct dependencies are ['/media/talel/data/nxp_latest/sources/poky/meta/recipes-devtools/binutils/binutils-cross_2.32.bb:do_populate_sysroot', '/media/talel/data/nxp_latest/sources/poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb:do_populate_sysroot', 'virtual:native:/media/talel/data/nxp_latest/sources/poky/meta/recipes-support/lzop/lzop_1.04.bb:do_populate_sysroot', '/media/talel/data/nxp_latest/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_9.2.bb:do_populate_sysroot', '/media/talel/data/nxp_latest/sources/poky/meta/recipes-devtools/quilt/quilt-native_0.66.bb:do_populate_sysroot', 'virtual:native:/media/talel/data/nxp_latest/sources/poky/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot', '/media/talel/data/nxp_latest/sources/poky/meta/recipes-kernel/kmod/kmod-native_git.bb:do_populate_sysroot', '/media/talel/data/nxp_latest/sources/poky/meta/recipes-devtools/gcc/gcc-cross_9.2.bb:do_populate_sysroot', '/media/talel/data/nxp_latest/sources/poky/meta/recipes-core/glibc/glibc_2.30.bb:do_populate_sysroot', 'virtual:native:/media/talel/data/nxp_latest/sources/poky/meta/recipes-extended/bc/bc_1.07.1.bb:do_populate_sysroot', 'virtual:native:/media/talel/data/nxp_latest/sources/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot', 'virtual:native:/media/talel/data/nxp_latest/sources/poky/meta/recipes-devtools/bison/bison_3.4.1.bb:do_populate_sysroot', '/media/talel/data/nxp_latest/sources/meta-imx/meta-bsp/recipes-kernel/linux/linux-imx_5.4.bb:do_populate_sysroot']
NOTE: Installed into sysroot: ['depmodwrapper-cross', 'lzop-native', 'kmod-native', 'bc-native', 'bison-native', 'lzo-native', 'readline-native', 'python3-native', 'gtk-doc-native', 'pkgconfig-native', 'ncurses-native', 'util-linux-native', 'libnsl2-native', 'sqlite3-native', 'bzip2-native', 'gdbm-native', 'openssl-native', 'libtirpc-native', 'libffi-native', 'systemd-systemctl-native', 'libcap-ng-native']
NOTE: Skipping as already exists in sysroot: ['binutils-cross-aarch64', 'gcc-runtime', 'quilt-native', 'patch-native', 'gcc-cross-aarch64', 'glibc', 'pseudo-native', 'linux-imx', 'gnu-config-native', 'zlib-native', 'flex-native', 'texinfo-dummy-native', 'autoconf-native', 'automake-native', 'libtool-native', 'linux-libc-headers', 'libgcc', 'attr-native', 'gmp-native', 'xz-native', 'libmpc-native', 'mpfr-native', 'gettext-minimal-native', 'm4-native']
DEBUG: sed -e 's:^[^/]*/:/media/talel/data/nxp_latest/mender/tmp/work/imx8mmevk-poky-linux/boot-partition-devicetree/1.0-r0/recipe-sysroot/:g' /media/talel/data/nxp_latest/mender/tmp/sysroots-components/imx8mmevk/depmodwrapper-cross/fixmepath | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:/media/talel/data/nxp_latest/mender/tmp/work/imx8mmevk-poky-linux/boot-partition-devicetree/1.0-r0/recipe-sysroot:g; s:FIXMESTAGINGDIRHOST:/media/talel/data/nxp_latest/mender/tmp/work/imx8mmevk-poky-linux/boot-partition-devicetree/1.0-r0/recipe-sysroot-native:g' -e 's:FIXME_PSEUDO_SYSROOT:/media/talel/data/nxp_latest/mender/tmp/sysroots-components/x86_64/pseudo-native:g' -e 's:FIXME_HOSTTOOLS_DIR:/media/talel/data/nxp_latest/mender/tmp/hosttools:g' -e 's:FIXME_PKGDATA_DIR:/media/talel/data/nxp_latest/mender/tmp/pkgdata/imx8mmevk:g' -e 's:FIXME_PSEUDO_LOCALSTATEDIR:/media/talel/data/nxp_latest/mender/tmp/work/imx8mmevk-poky-linux/boot-partition-devicetree/1.0-r0/pseudo/:g' -e 's:FIXME_LOGFIFO:/media/talel/data/nxp_latest/mender/tmp/work/imx8mmevk-poky-linux/boot-partition-devicetree/1.0-r0/temp/fifo.3025:g'
DEBUG: sed -e 's:^[^/]*/:/media/talel/data/nxp_latest/mender/tmp/work/imx8mmevk-poky-linux/boot-partition-devicetree/1.0-r0/recipe-sysroot-native/:g' /media/talel/data/nxp_latest/mender/tmp/sysroots-components/x86_64/bison-native/fixmepath /media/talel/data/nxp_latest/mender/tmp/sysroots-components/x86_64/python3-native/fixmepath /media/talel/data/nxp_latest/mender/tmp/sysroots-components/x86_64/gtk-doc-native/fixmepath /media/talel/data/nxp_latest/mender/tmp/sysroots-components/x86_64/pkgconfig-native/fixmepath /media/talel/data/nxp_latest/mender/tmp/sysroots-components/x86_64/ncurses-native/fixmepath /media/talel/data/nxp_latest/mender/tmp/sysroots-components/x86_64/openssl-native/fixmepath | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:/media/talel/data/nxp_latest/mender/tmp/work/imx8mmevk-poky-linux/boot-partition-devicetree/1.0-r0/recipe-sysroot:g; s:FIXMESTAGINGDIRHOST:/media/talel/data/nxp_latest/mender/tmp/work/imx8mmevk-poky-linux/boot-partition-devicetree/1.0-r0/recipe-sysroot-native:g' -e 's:FIXME_PSEUDO_SYSROOT:/media/talel/data/nxp_latest/mender/tmp/sysroots-components/x86_64/pseudo-native:g' -e 's:FIXME_HOSTTOOLS_DIR:/media/talel/data/nxp_latest/mender/tmp/hosttools:g' -e 's:FIXME_PKGDATA_DIR:/media/talel/data/nxp_latest/mender/tmp/pkgdata/imx8mmevk:g' -e 's:FIXME_PSEUDO_LOCALSTATEDIR:/media/talel/data/nxp_latest/mender/tmp/work/imx8mmevk-poky-linux/boot-partition-devicetree/1.0-r0/pseudo/:g' -e 's:FIXME_LOGFIFO:/media/talel/data/nxp_latest/mender/tmp/work/imx8mmevk-poky-linux/boot-partition-devicetree/1.0-r0/temp/fifo.3025:g'
DEBUG: Python function extend_recipe_sysroot finished
DEBUG: Executing shell function do_install
install: cannot stat '/media/talel/data/nxp_latest/mender/tmp/deploy/images/imx8mmevk/freescale/imx8mm-evk.dtb': No such file or directory
WARNING: exit code 1 from a shell command.
ERROR: Execution of '/media/talel/data/nxp_latest/mender/tmp/work/imx8mmevk-poky-linux/boot-partition-devicetree/1.0-r0/temp/run.do_install.3025' failed with exit code 1:
install: cannot stat '/media/talel/data/nxp_latest/mender/tmp/deploy/images/imx8mmevk/freescale/imx8mm-evk.dtb': No such file or directory
WARNING: exit code 1 from a shell command. 

Can you help me on this ?

Thanks, Talel

I’ve followed the steps in your repo and built the u-boot with mender integration, but now whenever I try to boot it hangs in Starting kernel stage. Do you have any idea of this issue?

 BuildInfo:
  - ATF f1a195b
  - U-Boot 2019.04-5.4.3-2.0.0+g47c1922978

flash target is MMC:1
Run CMD11 1.8V switch
Net:   eth0: ethernet@30be0000
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot:  0 
24879136 bytes read in 316 ms (75.1 MiB/s)

Authenticate image from DDR location 0x40480000...

Secure boot enabled

HAB Configuration: 0xcc, HAB State: 0x99
No HAB Events Found!


Starting kernel ..

You should be seeing a GRUB prompt if you followed my build setup. It will boot into U-Boot which then uses distro_bootcmd to launch GRUB as an EFI app.

What do your U-Boot environment variables look like?

Also, I have not tested with secure boot so it’s likely that is not properly supported in my integration.
Drew

u-boot=> printenv 
altbootcmd=run mender_altbootcmd; run bootcmd
arch=arm
baudrate=115200
board=imx8mm_evk
board_name=imx8mm_evk
bootcmd=run mender_setup; setenv bootargs root=${mender_kernel_root} ${bootargs}; if test "${fdt_addr_r}" != ""; then load ${mender_uboot_root} ${fdt_addr_r} /boot/${mender_dtb_name}; fi; load ${mender_uboot_roo
t} ${kernel_addr_r} /boot/${mender_kernel_name}; ${mender_boot_kernel_type} ${kernel_addr_r} - ${fdt_addr_r}; run mender_try_to_recover
bootcount=1
bootdelay=2
bootlimit=1
cpu=armv8
ethaddr=00:04:9f:06:b0:2c
ethprime=FEC
fastboot_dev=mmc1
fdtcontroladdr=b4d0b748
kernel_addr_r=0x40480000
loadaddr=0x40480000
mender_altbootcmd=if test ${mender_boot_part} = 1; then setenv mender_boot_part 2; setenv mender_boot_part_hex 2; else setenv mender_boot_part 1; setenv mender_boot_part_hex 1; fi; setenv upgrade_available 0; sa
veenv; run mender_setup
mender_boot_kernel_type=booti
mender_boot_part=1
mender_boot_part_hex=1
mender_check_saveenv_canary=1
mender_dtb_name=imx8mm-ddr4-evk-revb-rm67191.dtb
mender_kernel_name=Image
mender_pre_setup_commands=setenv kernel_addr_r ${loadaddr}
mender_saveenv_canary=1
mender_setup=if test "${mender_saveenv_canary}" != "1"; then setenv mender_saveenv_canary 1; saveenv; fi; if test "${mender_pre_setup_commands}" != ""; then run mender_pre_setup_commands; fi; if test "${mender_s
ystemd_machine_id}" != ""; then setenv bootargs "systemd.machine_id=${mender_systemd_machine_id} ${bootargs}"; fi; setenv mender_kernel_root /dev/mmcblk1p${mender_boot_part}; if test ${mender_boot_part} = 1; the
n setenv mender_boot_part_name /dev/mmcblk1p1; else setenv mender_boot_part_name /dev/mmcblk1p2; fi; setenv mender_kernel_root_name ${mender_boot_part_name}; setenv mender_uboot_root mmc 1:${mender_boot_part_hex
}; setenv mender_uboot_root_name ${mender_boot_part_name}; setenv expand_bootargs "setenv bootargs \\"${bootargs}\\""; run expand_bootargs; setenv expand_bootargs; if test "${mender_post_setup_commands}" != ""; 
then run mender_post_setup_commands; fi
mender_try_to_recover=if test ${upgrade_available} = 1; then reset; fi
mender_uboot_boot=mmc 1:1
mender_uboot_dev=1
mender_uboot_if=mmc
serial#=1e1d1a09dab45cbf
soc=imx8m
soc_type=imx8mm
upgrade_available=0
vendor=freescale

Environment size: 2232/131067 bytes

I had to add the following line (setting kernel_addr_r) in the local.conf:

MENDER_UBOOT_PRE_SETUP_COMMANDS = "setenv kernel_addr_r \${loadaddr}"

I’m still getting ## Error: "fdt_addr_r" not defined. Is this the problem?

The missing fdt_addr_r is a problem but this does not appear to be the UBoot built from the recent PR. There should be a variable called distro_bootcmd.

Can you post the entire boot log including the UBoot headers, version info and such?

Where is UBoot stored in your custom board? The existing BSP assumes that it is on the same media as your root filesystem.