Variscite VAR_DART_IMX8MM Problem

Hello.

I’m tring to add mender support to VAR-DART-IMX8MM with u-boot.
I already used the mender-community recipe and already tried to integrate myself without success.

U-BOOT boots up but then fails:
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 0
Saving Environment to MMC… Writing to redundant MMC(1)… OK
Bad Linux ARM64 Image magic!

I’m using core-image-minimal and it works without mender.

What does your u-boot environment look like?

Thank you for your reply.

I also share the local.conf and u-boot-variscite.bbappend present in meta-mender-community/meta-mender-variscite/recipes-bsp/u-boot.

local.conf:

MACHINE ??= 'imx8mm-var-dart'
DISTRO ?= 'fsl-imx-xwayland'
PACKAGE_CLASSES ?= 'package_rpm'
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    STOPTASKS,/tmp,100M,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100M,1K \
    ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-system-native = " sdl"
CONF_VERSION = "1"

DL_DIR = "/opt/yocto_downloads/"
ACCEPT_FSL_EULA = "1"

#check connectivity using google
CONNECTIVITY_CHECK_URIS = "https://www.google.com/"



# 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 = "release-1"

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 = ""

# 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 = "192.168.0.100"

# 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 = "https://docker.mender.io"
#FILESEXTRAPATHS_prepend_pn-mender := "<DIRECTORY-CONTAINING-server.crt>:"
#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"

# Appended fragment from meta-mender-community/meta-mender-variscite/templates

# This will make sure that our SPL + u-boot.img is embedded in the sdimg at
# a 1kb offset.
MENDER_IMAGE_BOOTLOADER_FILE_imx6ul-var-dart = "u-boot-spl.img"
MENDER_IMAGE_BOOTLOADER_BOOTSECTOR_OFFSET_imx6ul-var-dart = "2"

MENDER_IMAGE_BOOTLOADER_FILE_imx8mm-var-dart = "imx-boot"
MENDER_IMAGE_BOOTLOADER_BOOTSECTOR_OFFSET_imx8mm-var-dart = "66"

MENDER_IMAGE_BOOTLOADER_FILE_imx8mn-var-som = "imx-boot"
MENDER_IMAGE_BOOTLOADER_BOOTSECTOR_OFFSET_imx8mn-var-som = "64"
do_image_sdimg[depends] += "${@bb.utils.contains('MACHINE', 'imx8mn-var-som', 'imx-boot:do_deploy', '', d)}"

# Configure the boot partition files
MENDER_BOOT_PART_SIZE_MB_imx6ul-var-dart = "16"
IMAGE_BOOT_FILES_remove_imx6ul-var-dart = "${KERNEL_IMAGETYPE} ${KERNEL_DEVICETREE}"

MENDER_BOOT_PART_SIZE_MB_imx8mm-var-dart = "16"
IMAGE_BOOT_FILES_remove_imx8mm-var-dart = "${KERNEL_IMAGETYPE} ${@make_dtb_boot_files(d)}"

MENDER_BOOT_PART_SIZE_MB_imx8mn-var-som = "16"
IMAGE_BOOT_FILES_remove_imx8mn-var-som = "${KERNEL_IMAGETYPE} ${@make_dtb_boot_files(d)}"

# 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-uboot mender-image-sd "
MENDER_FEATURES_DISABLE_append = " mender-grub 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"

# Do not use the bbappend provided by meta-imx. It does not not use
# the right ${B} and ${S} settings and causes build failures with Mender
BBMASK += "meta-imx/meta-bsp/recipes-bsp/u-boot/u-boot-tools_%.bbappend"

# Appended fragment from meta-mender-community/meta-mender-variscite/templates
# SDCard Settings
VARISCITE_UBOOT_ENV_IN_EMMC = "0"

MENDER_STORAGE_DEVICE_imx6ul-var-dart = "/dev/mmcblk0"
MENDER_UBOOT_STORAGE_DEVICE_imx6ul-var-dart = "0"
UBOOT_CONFIG_imx6ul-var-dart = "sd"

MENDER_STORAGE_DEVICE_imx8mm-var-dart = "/dev/mmcblk1"
MENDER_UBOOT_STORAGE_DEVICE_imx8mm-var-dart = "0"
UBOOT_CONFIG_imx8mm-var-dart = "sd"

MENDER_STORAGE_DEVICE_imx8mn-var-som = "/dev/mmcblk1"
MENDER_UBOOT_STORAGE_DEVICE_imx8mn-var-som = "0"
UBOOT_CONFIG_imx8mm-var-dart = "sd"

#add to add this, an error was being thrown when building sdimg
IMAGE_BOOT_FILES = "u-boot.bin"

################################################################################

u-boot env:

u-boot=> printenv
altbootcmd=run mender_altbootcmd; run bootcmd
arch=arm
baudrate=115200
board=imx8mm_var_dart
board_name=DART-MX8M-MINI
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr ${fdtcontroladdr};fi;load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/b                                ootaa64.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=mmc2 mmc1
bootargs=root=/dev/mmcblk1p2
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_root} ${kernel_addr_r} /boot/${mender_kernel_name}; ${mender_boot_kernel_type} ${kernel_addr_r} - ${fdt_addr_r}; run mender_try_to_recover
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;
bootcmd_mmc1=devnum=1; run mmc_boot
bootcmd_mmc2=devnum=2; run mmc_boot
bootcount=1
bootdelay=1
bootdir=/boot
bootlimit=1
console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200
cpu=armv8
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
emmc_dev=1
ethaddr=f8:dc:7a:2e:54:87
ethprime=FEC
fastboot_dev=mmc1
fdt_addr_r=0x43000000
fdt_high=0xffffffffffffffff
fdtcontroladdr=b6d2d940
fdtfile=undefined
findfdt=if test $fdtfile = undefined; then if test $board_name = VAR-SOM-MX8M-MINI; then if test $som_rev = som_rev10; then setenv fdtfile imx8mm-var-som-rev10.dtb; else setenv fdtfile imx8mm-                                var-som.dtb; fi;else setenv fdtfile imx8mm-var-dart.dtb;fi; fi;
image=Image.gz
img_addr=0x42000000
initrd_addr=0x43800000
initrd_high=0xffffffffffffffff
kboot=booti
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
loadaddr=0x40480000
loadm4bin=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootdir}/${m4_bin}; cp.b ${loadaddr} ${m4_addr} ${filesize}
m4_addr=0x7e0000
m4_bin=hello_world.bin
mender_altbootcmd=if test ${mender_boot_part} = 2; then setenv mender_boot_part 3; setenv mender_boot_part_hex 3; else setenv mender_boot_part 2; setenv mender_boot_part_hex 2; fi; setenv upgr                                ade_available 0; saveenv; run mender_setup
mender_boot_kernel_type=booti
mender_boot_part=2
mender_boot_part_hex=2
mender_boot_part_name=/dev/mmcblk1p2
mender_check_saveenv_canary=1
mender_dtb_name=imx8mm-var-dart.dtb
mender_kernel_name=Image.gz
mender_kernel_root=/dev/mmcblk1p2
mender_kernel_root_name=/dev/mmcblk1p2
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_systemd_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} = 2; then setenv mender_boot_part_name /dev/mmcblk1p2; else setenv mender_boot_part_name /dev/mmcblk1p3; fi; setenv mender_kernel_root_name ${mender_boot_part_nam                                e}; setenv mender_uboot_root mmc 0:${mender_boot_part_hex}; setenv mender_uboot_root_name ${mender_boot_part_name}; setenv expand_bootargs "setenv bootargs \\"${bootargs}\\""; run expand_boota                                rgs; 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 0:1
mender_uboot_dev=0
mender_uboot_if=mmc
mender_uboot_root=mmc 0:2
mender_uboot_root_name=/dev/mmcblk1p2
mfgtool_args=setenv bootargs console=${console},${baudrate} rdinit=/linuxrc clk_ignore_unused
mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi
mmcdev=0
mmcpart=1
ramsize_check=if test $sdram_size -le 512; then setenv cma_size cma=320M; else setenv cma_size cma=640M@1376M; fi;
runm4bin=if test ${m4_addr} = 0x7e0000; then echo Booting M4 from TCM; else echo Booting M4 from DRAM; dcache flush; fi; bootaux ${m4_addr};
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${dist                                ro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done; setenv devplist
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done                                ;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootaa64.efi; then echo Found EFI removable media binary efi/boot/bootaa64.efi; run boot_efi_binary; echo EFI LOAD FAILED: continui                                ng...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED:                                 continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_scrip                                t; echo SCRIPT FAILED: continuing...; fi; done
script=boot.scr
sd_dev=0
sdram_size=2048
serial#=031f5a09dab43d19
soc=imx8m
soc_type=imx8mm
stderr=serial
stdin=serial
stdout=serial
upgrade_available=0
usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi
use_m4=no
vendor=variscite

Environment size: 6228/131067 bytes

################################################################################

u-boot-variscite.bbappend

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

SRC_URI_append_imx6ul-var-dart = " file://0001-Switch-to-CONFIG_DISTRO_DEFAULTS-for-bootcmd.patch "
SRC_URI_append_imx8mm-var-dart = " file://0001-Switch-to-CONFIG_DISTRO_DEFAULTS-for-bootcmd.patch "
SRC_URI_append_imx8mm-var-dart = " ${@'file://0002-Store-Env-in-eMMC.patch' if d.getVar('VARISCITE_UBOOT_ENV_IN_EMMC', True) == '1' else ''}"
SRC_URI_append_imx8mn-var-som = " file://0001-Switch-to-CONFIG_DISTRO_DEFAULTS-for-bootcmd.patch "
SRC_URI_append_imx8mn-var-som = " ${@'file://0002-Store-Env-in-eMMC.patch' if d.getVar('VARISCITE_UBOOT_ENV_IN_EMMC', True) == '1' else ''}"

PROVIDES += "u-boot"
RPROVIDES_${PN} += "u-boot"

make_u_boot_spl_image() {
    install -m 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/u-boot-spl-${PV}-${PR}.img
    rm -f ${DEPLOYDIR}/u-boot-spl.img
    ln -sf u-boot-spl-${PV}-${PR}.img ${DEPLOYDIR}/u-boot-spl.img
    dd if=${DEPLOYDIR}/u-boot.img of=${DEPLOYDIR}/u-boot-spl-${PV}-${PR}.img bs=1K seek=68 conv=notrunc
}

do_deploy_append_imx6ul-var-dart() {
    make_u_boot_spl_image
}


require recipes-bsp/u-boot/u-boot-mender.inc
KERNEL_DEVICETREE = "freescale/imx8mm-var-dart.dtb"

edited by @drewmoseley for formating

This strikes me as possibly not correct

#add to add this, an error was being thrown when building sdimg
IMAGE_BOOT_FILES = "u-boot.bin"

Given that the original error is:

Bad Linux ARM64 Image magic!

Can you provide the directory listing of the boot partition as well as the /boot directory from your root filesystem?

Given that the original error is:

ERROR: core-image-minimal-1.0-r0 do_image_sdimg: Execution of '/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/temp/run.do_image_sdimg.29597' failed with exit code 1:
+ mkdir -p /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0
+ true
+ install -m 0644 /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/deploy/images/imx8mm-var-dart/uboot.env /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/
+ basename /dev/mmcblk1
+ ondisk_dev=mmcblk1
+ wks=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/mender-sdimg.wks
+ rm -f /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/mender-sdimg.wks
+ [ -n imx-boot ]
+ install -m 0644 /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/deploy/images/imx8mm-var-dart/imx-boot /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/
+ expr 66 % 2
+ [ 0 -ne 0 ]
+ bootloader_sector=66
+ bootloader_file=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/imx-boot
+ expr 66 * 512
+ expr 33792 / 1024
+ bootloader_align_kb=33
+ stat -c %s /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/imx-boot
+ bootloader_size=1135468
+ expr 33 * 1024 + 1135468
+ bootloader_end=1169260
+ [ 1169260 -gt 8388608 ]
+ cat
+ true
+ [ -n 8388608 ]
+ expr 8388608 / 1024
+ boot_env_align_kb=8192
+ cat
+ expr 8388608 % 1024
+ true
+ [ 0 -ne 0 ]
+ expr 8388608 / 1024
+ alignment_kb=8192
+ [ msdos = gpt ]
+ part_type_params=
+ echo                            
+ sed -r s/(^\s*)|(\s*$)//g
+ IMAGE_BOOT_FILES_STRIPPED=
+ [ 16 -ne 0 ]
+ mender_merge_bootfs_and_image_boot_files
+ W=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/bootfs.image_sdimg
+ rm -rf /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/bootfs.image_sdimg
+ cp -al /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/rootfs//uboot /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/bootfs.image_sdimg
+ image_boot_files=                           
+ cat
+ cat
+ [ 0 -ne 0 ]
+ cat
+ cat
+ cat
+ echo ### Contents of wks file ###
### Contents of wks file ###
+ cat /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/mender-sdimg.wks
# embed bootloader
part --source rawcopy --sourceparams="file=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/imx-boot" --ondisk "mmcblk1" --align 33 --no-table
part --source rawcopy --sourceparams="file=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/uboot.env" --ondisk "mmcblk1" --align 8192 --no-table
part --source rootfs --rootfs-dir /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/bootfs.image_sdimg --ondisk "mmcblk1" --fstype=vfat --label boot --align 8192 --fixed-size 16 --active 
part --source rawcopy --sourceparams="file=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8mm-var-dart.ext4" --ondisk "mmcblk1" --align 8192 --fixed-size 221184k 
part --source rawcopy --sourceparams="file=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8mm-var-dart.ext4" --ondisk "mmcblk1" --align 8192 --fixed-size 221184k 
part --source rawcopy --sourceparams="file=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8mm-var-dart.dataimg" --ondisk "mmcblk1" --align 8192 --fixed-size 128 

bootloader --ptable msdos
+ echo ### End of contents of wks file ###
### End of contents of wks file ###
+ outimgname=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8mm-var-dart-20201111162607.sdimg
+ wicout=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8mm-var-dart-20201111162607-sdimg
+ BUILDDIR=/home/ucn-yocto/var-fsl-yocto/build_xwayland wic create /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/mender-sdimg.wks --vars /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/sysroots/imx8mm-var-dart/imgdata/ -e core-image-minimal -o /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8mm-var-dart-20201111162607-sdimg/ --no-fstab-update
INFO: Creating image(s)...

ERROR: _exec_cmd: export PATH=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/sbin:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/sbin:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/bin:$PATH;mcopy -i /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8mm-var-dart-20201111162607-sdimg/tmp.wic.ztvgvjd7/rootfs_boot.3.vfat -s /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/bootfs.image_sdimg/* ::/ returned '1' instead of 0
output: /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/bootfs.image_sdimg/*: No such file or directory

+ bb_exit_handler
+ ret=1
+ echo WARNING: exit code 1 from a shell command.
WARNING: exit code 1 from a shell command.
+ exit 1

ERROR: Logfile of failure stored in: /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/temp/log.do_image_sdimg.29597
Log data follows:
| DEBUG: Executing python function prepare_excluded_directories
| DEBUG: 'IMAGE_ROOTFS_EXCLUDE_PATH' is set but 'respect_exclude_path' variable flag is 0 for this image type, so ignoring it
| DEBUG: Python function prepare_excluded_directories finished
| DEBUG: Executing python function set_image_size
| DEBUG: 63928.000000 = 63928 * 1.000000
| DEBUG: 221184.000000 = max(63928.000000, 217088)[217088.000000] + 4096
| DEBUG: 221184.000000 = int(221184.000000)
| DEBUG: 221184 = aligned(221184)
| DEBUG: returning 221184
| DEBUG: Python function set_image_size finished
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-devtools/dosfstools/dosfstools_4.1.bb:do_populate_sysroot', 'virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-devtools/swig/swig_3.0.12.bb:do_populate_sysroot', 'virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-devtools/dnf/dnf_4.2.2.bb:do_populate_sysroot', 'virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-devtools/bison/bison_3.4.1.bb:do_populate_sysroot', '/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-devtools/python/python-native_2.7.16.bb:do_populate_sysroot', 'virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb:do_populate_sysroot', 'virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-kernel/dtc/dtc_1.5.1.bb:do_populate_sysroot', '/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-core/meta/wic-tools.bb:do_populate_sysroot', 'virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-core/update-rc.d/update-rc.d_0.8.bb:do_populate_sysroot', 'virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-devtools/prelink/prelink_git.bb:do_populate_sysroot', 'virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-support/bmap-tools/bmap-tools_3.5.bb:do_populate_sysroot', 'virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb:do_populate_sysroot', 'virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-devtools/opkg/opkg_0.4.1.bb:do_populate_sysroot', '/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb:do_populate_sysroot', 'virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot', 'virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-core/coreutils/coreutils_8.31.bb:do_populate_sysroot', 'virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.45.3.bb:do_populate_sysroot', 'virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-extended/pigz/pigz_2.4.bb:do_populate_sysroot', '/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-devtools/quilt/quilt-native_0.66.bb:do_populate_sysroot', '/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-devtools/gcc/gcc-cross_9.2.bb:do_populate_sysroot', 'virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-devtools/mtools/mtools_4.0.23.bb:do_populate_sysroot', '/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-devtools/python/python_2.7.16.bb:do_populate_sysroot', 'virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb:do_populate_sysroot', '/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-core/glibc/cross-localedef-native_2.30.bb:do_populate_sysroot', '/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb:do_populate_sysroot', 'virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-extended/parted/parted_3.2.bb:do_populate_sysroot', '/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb:do_populate_sysroot', '/home/ucn-yocto/var-fsl-yocto/sources/meta-imx/meta-bsp/recipes-bsp/imx-mkimage/imx-boot_0.2.bb:do_populate_sysroot', '/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-core/glibc/glibc_2.30.bb:do_populate_sysroot', 'virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.4.bb:do_populate_sysroot', '/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb:do_populate_sysroot', 'virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.15.0.bb:do_populate_sysroot', 'virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb:do_populate_sysroot', '/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb:do_populate_sysroot', 'virtual:native:/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb:do_populate_sysroot', '/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_9.2.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: ['dosfstools-native', 'bison-native', 'python-native', 'dtc-native', 'wic-tools', 'coreutils-native', 'gcc-cross-aarch64', 'mtools-native', 'python', 'kern-tools-native', 'parted-native', 'imx-boot', 'glibc', 'gptfdisk-native', 'gcc-runtime', 'mpfr-native', 'gmp-native', 'binutils-cross-aarch64', 'linux-libc-headers', 'libmpc-native', 'ncurses', 'libxcrypt', 'openssl', 'db', 'gdbm', 'zlib', 'readline', 'libffi', 'sqlite3', 'bzip2', 'imx-atf', 'firmware-imx-8m', 'u-boot-variscite', 'libgcc', 'opkg-utils', 'cryptodev-linux']
| NOTE: Skipping as already exists in sysroot: ['swig-native', 'dnf-native', 'opkg-utils-native', 'update-rc.d-native', 'prelink-native', 'bmap-tools-native', 'rpm-native', 'opkg-native', 'depmodwrapper-cross', 'pseudo-native', 'e2fsprogs-native', 'pigz-native', 'quilt-native', 'makedevs-native', 'cross-localedef-native', 'mklibs-native', 'qemuwrapper-cross', 'createrepo-c-native', 'openssl-native', 'ldconfig-native', 'pbzip2-native', 'autoconf-native', 'libtool-native', 'gnu-config-native', 'xz-native', 'automake-native', 'pkgconfig-native', 'systemd-systemctl-native', 'libpcre-native', 'python3-native', 'librepo-native', 'ninja-native', 'python3-iniparse-native', 'libdnf-native', 'gettext-minimal-native', 'libcomps-native', 'cmake-native', 'flex-native', 'texinfo-dummy-native', 'bzip2-native', 'gdbm-native', 'sqlite3-native', 'db-native', 'zlib-native', 'readline-native', 'expat-native', 'shadow-native', 'elfutils-native', 'binutils-native', 'debianutils-native', 'python3-setuptools-native', 'python3-six-native', 'nss-native', 'file-native', 'popt-native', 'dbus-native', 'libarchive-native', 'perl-native', 'libsolv-native', 'kmod-native', 'attr-native', 'util-linux-native', 'ncurses-native', 'qemu-native', 'libxml2-native', 'curl-native', 'libmodulemd-native', 'glib-2.0-native', 'm4-native', 'libtirpc-native', 'libnsl2-native', 'libffi-native', 'gpgme-native', 're2c-native', 'libcheck-native', 'gobject-introspection-native', 'json-c-native', 'gtk-doc-native', 'unzip-native', 'nspr-native', 'lzo-native', 'libcap-ng-native', 'libyaml-native', 'meson-native', 'gettext-native', 'libgpg-error-native', 'libassuan-native']
| DEBUG: sed -e 's:^[^/]*/:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/:g' /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/sysroots-components/x86_64/bison-native/fixmepath /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/sysroots-components/x86_64/python-native/fixmepath /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/sysroots-components/x86_64/gcc-cross-aarch64/fixmepath /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/sysroots-components/x86_64/gmp-native/fixmepath | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot:g; s:FIXMESTAGINGDIRHOST:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native:g' -e 's:FIXME_PSEUDO_SYSROOT:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/sysroots-components/x86_64/pseudo-native:g' -e 's:FIXME_HOSTTOOLS_DIR:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/hosttools:g' -e 's:FIXME_PKGDATA_DIR:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/pkgdata/imx8mm-var-dart:g' -e 's:FIXME_PSEUDO_LOCALSTATEDIR:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/pseudo/:g' -e 's:FIXME_LOGFIFO:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/temp/fifo.29597:g'
| DEBUG: sed -e 's:^[^/]*/:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot/:g' /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/sysroots-components/aarch64/python/fixmepath | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot:g; s:FIXMESTAGINGDIRHOST:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native:g' -e 's:FIXME_PSEUDO_SYSROOT:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/sysroots-components/x86_64/pseudo-native:g' -e 's:FIXME_HOSTTOOLS_DIR:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/hosttools:g' -e 's:FIXME_PKGDATA_DIR:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/pkgdata/imx8mm-var-dart:g' -e 's:FIXME_PSEUDO_LOCALSTATEDIR:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/pseudo/:g' -e 's:FIXME_LOGFIFO:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/temp/fifo.29597:g'
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_image_sdimg
| + mkdir -p /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0
| + true
| + install -m 0644 /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/deploy/images/imx8mm-var-dart/uboot.env /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/
| + basename /dev/mmcblk1
| + ondisk_dev=mmcblk1
| + wks=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/mender-sdimg.wks
| + rm -f /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/mender-sdimg.wks
| + [ -n imx-boot ]
| + install -m 0644 /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/deploy/images/imx8mm-var-dart/imx-boot /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/
| + expr 66 % 2
| + [ 0 -ne 0 ]
| + bootloader_sector=66
| + bootloader_file=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/imx-boot
| + expr 66 * 512
| + expr 33792 / 1024
| + bootloader_align_kb=33
| + stat -c %s /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/imx-boot
| + bootloader_size=1135468
| + expr 33 * 1024 + 1135468
| + bootloader_end=1169260
| + [ 1169260 -gt 8388608 ]
| + cat
| + true
| + [ -n 8388608 ]
| + expr 8388608 / 1024
| + boot_env_align_kb=8192
| + cat
| + expr 8388608 % 1024
| + true
| + [ 0 -ne 0 ]
| + expr 8388608 / 1024
| + alignment_kb=8192
| + [ msdos = gpt ]
| + part_type_params=
| + echo
| + sed -r s/(^\s*)|(\s*$)//g
| + IMAGE_BOOT_FILES_STRIPPED=
| + [ 16 -ne 0 ]
| + mender_merge_bootfs_and_image_boot_files
| + W=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/bootfs.image_sdimg
| + rm -rf /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/bootfs.image_sdimg
| + cp -al /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/rootfs//uboot /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/bootfs.image_sdimg
| + image_boot_files=
| + cat
| + cat
| + [ 0 -ne 0 ]
| + cat
| + cat
| + cat
| + echo ### Contents of wks file ###
| ### Contents of wks file ###
| + cat /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/mender-sdimg.wks
| # embed bootloader
| part --source rawcopy --sourceparams="file=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/imx-boot" --ondisk "mmcblk1" --align 33 --no-table
| part --source rawcopy --sourceparams="file=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/uboot.env" --ondisk "mmcblk1" --align 8192 --no-table
| part --source rootfs --rootfs-dir /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/bootfs.image_sdimg --ondisk "mmcblk1" --fstype=vfat --label boot --align 8192 --fixed-size 16 --active
| part --source rawcopy --sourceparams="file=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8mm-var-dart.ext4" --ondisk "mmcblk1" --align 8192 --fixed-size 221184k
| part --source rawcopy --sourceparams="file=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8mm-var-dart.ext4" --ondisk "mmcblk1" --align 8192 --fixed-size 221184k
| part --source rawcopy --sourceparams="file=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8mm-var-dart.dataimg" --ondisk "mmcblk1" --align 8192 --fixed-size 128
| 
| bootloader --ptable msdos
| + echo ### End of contents of wks file ###
| ### End of contents of wks file ###
| + outimgname=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8mm-var-dart-20201111162607.sdimg
| + wicout=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8mm-var-dart-20201111162607-sdimg
| + BUILDDIR=/home/ucn-yocto/var-fsl-yocto/build_xwayland wic create /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/mender-sdimg.wks --vars /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/sysroots/imx8mm-var-dart/imgdata/ -e core-image-minimal -o /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8mm-var-dart-20201111162607-sdimg/ --no-fstab-update
| INFO: Creating image(s)...
| 
| ERROR: _exec_cmd: export PATH=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/sbin:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/sbin:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/bin:$PATH;mcopy -i /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8mm-var-dart-20201111162607-sdimg/tmp.wic.ztvgvjd7/rootfs_boot.3.vfat -s /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/bootfs.image_sdimg/* ::/ returned '1' instead of 0
| output: /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/bootfs.image_sdimg/*: No such file or directory
| 
| + bb_exit_handler
| + ret=1
| + echo WARNING: exit code 1 from a shell command.
| WARNING: exit code 1 from a shell command.
| + exit 1
| ERROR: Execution of '/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/temp/run.do_image_sdimg.29597' failed with exit code 1:
| + mkdir -p /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0
| + true
| + install -m 0644 /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/deploy/images/imx8mm-var-dart/uboot.env /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/
| + basename /dev/mmcblk1
| + ondisk_dev=mmcblk1
| + wks=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/mender-sdimg.wks
| + rm -f /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/mender-sdimg.wks
| + [ -n imx-boot ]
| + install -m 0644 /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/deploy/images/imx8mm-var-dart/imx-boot /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/
| + expr 66 % 2
| + [ 0 -ne 0 ]
| + bootloader_sector=66
| + bootloader_file=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/imx-boot
| + expr 66 * 512
| + expr 33792 / 1024
| + bootloader_align_kb=33
| + stat -c %s /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/imx-boot
| + bootloader_size=1135468
| + expr 33 * 1024 + 1135468
| + bootloader_end=1169260
| + [ 1169260 -gt 8388608 ]
| + cat
| + true
| + [ -n 8388608 ]
| + expr 8388608 / 1024
| + boot_env_align_kb=8192
| + cat
| + expr 8388608 % 1024
| + true
| + [ 0 -ne 0 ]
| + expr 8388608 / 1024
| + alignment_kb=8192
| + [ msdos = gpt ]
| + part_type_params=
| + echo
| + sed -r s/(^\s*)|(\s*$)//g
| + IMAGE_BOOT_FILES_STRIPPED=
| + [ 16 -ne 0 ]
| + mender_merge_bootfs_and_image_boot_files
| + W=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/bootfs.image_sdimg
| + rm -rf /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/bootfs.image_sdimg
| + cp -al /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/rootfs//uboot /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/bootfs.image_sdimg
| + image_boot_files=
| + cat
| + cat
| + [ 0 -ne 0 ]
| + cat
| + cat
| + cat
| + echo ### Contents of wks file ###
| ### Contents of wks file ###
| + cat /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/mender-sdimg.wks
| # embed bootloader
| part --source rawcopy --sourceparams="file=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/imx-boot" --ondisk "mmcblk1" --align 33 --no-table
| part --source rawcopy --sourceparams="file=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/uboot.env" --ondisk "mmcblk1" --align 8192 --no-table
| part --source rootfs --rootfs-dir /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/bootfs.image_sdimg --ondisk "mmcblk1" --fstype=vfat --label boot --align 8192 --fixed-size 16 --active
| part --source rawcopy --sourceparams="file=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8mm-var-dart.ext4" --ondisk "mmcblk1" --align 8192 --fixed-size 221184k
| part --source rawcopy --sourceparams="file=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8mm-var-dart.ext4" --ondisk "mmcblk1" --align 8192 --fixed-size 221184k
| part --source rawcopy --sourceparams="file=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8mm-var-dart.dataimg" --ondisk "mmcblk1" --align 8192 --fixed-size 128
| 
| bootloader --ptable msdos
| + echo ### End of contents of wks file ###
| ### End of contents of wks file ###
| + outimgname=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8mm-var-dart-20201111162607.sdimg
| + wicout=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8mm-var-dart-20201111162607-sdimg
| + BUILDDIR=/home/ucn-yocto/var-fsl-yocto/build_xwayland wic create /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/mender-sdimg.wks --vars /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/sysroots/imx8mm-var-dart/imgdata/ -e core-image-minimal -o /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8mm-var-dart-20201111162607-sdimg/ --no-fstab-update
| INFO: Creating image(s)...
| 
| ERROR: _exec_cmd: export PATH=/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/sbin:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/sbin:/home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/bin:$PATH;mcopy -i /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8mm-var-dart-20201111162607-sdimg/tmp.wic.ztvgvjd7/rootfs_boot.3.vfat -s /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/bootfs.image_sdimg/* ::/ returned '1' instead of 0
| output: /home/ucn-yocto/var-fsl-yocto/build_xwayland/tmp/work/imx8mm_var_dart-poky-linux/core-image-minimal/1.0-r0/bootfs.image_sdimg/*: No such file or directory
| 
| + bb_exit_handler
| + ret=1
| + echo WARNING: exit code 1 from a shell command.
| WARNING: exit code 1 from a shell command.
| + exit 1
| 
ERROR: Task (/home/ucn-yocto/var-fsl-yocto/sources/poky/meta/recipes-core/images/core-image-minimal.bb:do_image_sdimg) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3615 tasks of which 3354 didn't need to be rerun and 1 failed.

Can you provide the directory listing of the boot partition as well as the /boot directory from your root filesystem?

Well, maybe we can try to figure out what is the other problem first? Since I can only create an image if I add that line.

@drewmoseley - edit - formatting

I tried again without touching any files. The device booted successfully.

Uboot -> Grub -> Kernel.

But I would like that Uboot started kernel and remove the Grub part. That was what I was trying to achieve.

Does adding the following to local.conf get around the error building images?

MENDER_BOOT_PART_SIZE_MB="0"

Yes, but then in UBOOT “Bad Linux ARM64 Image magic!” shows again.

Notice that this error only occurs when I’m removing GRUB:

MENDER_FEATURES_ENABLE_append = " mender-uboot mender-image-sd "
MENDER_FEATURES_DISABLE_append = " mender-grub mender-image-uefi "

My best guess is that U-Boot is missing some configs that enable support for Image.gz type kernels. I think either you need to enable them or change KERNEL_IMAGETYPE to zImage.

Well, I tried it but no success…

I guess that I have to continue testing with uboot->grub->kernel then.

Thanks for your help @drewmoseley

Hi again.

After working around with core-image-minimal, I was trying to test mender server but in this image the ethernet interface is not active or detected.
After changing to core-image-base I get the same problems that the user in this post reports.

https://hub.mender.io/t/variscite-var-som-mx8m-nano-nxp-i-mx-8m-nano/1928/4?u=jafotes

I tried with other images (fsl-image-gui, fsl-image-qt5) but the problem remains the same.

Setting KERNEL_IMAGETYPE to “Image” as I have done here does get past this issue.

That PR also enabled mender-uboot integration although you will need to enable it in your local.conf as mender-grub is the default.

MENDER_FEATURES_ENABLE_append = " mender-uboot"
MENDER_FEATURES_DISABLE_append = " mender-grub mender-image-uefi"

Hi @drewmoseley.

After test some images today I finally got an image with just U-BOOT running in var-dart-imx8mm with BSP 5.4.3 from Variscite (they do not support yet the new BSP for this board).

I just had to add this line to u-boot-variscite.bbappend to the board boot up succesfully to kernel.

KERNEL_DEVICETREE = “freescale/imx8mm-var-dart.dtb”