eMMC failure when trying to boot Yocto Dunfell image on apalis-imx8

I built an image using the instructions for how to build a Toradex image with Yocto, branch dunfell-5.x.y . This worked without problems. However, I cannot boot the board with that image.

First, in order to boot from the SD card, I had to set the following values in u-boot:

setenv fdtfile 'imx8qm-apalis-v1.1-eval.dtb'
setenv image 'Image.gz'
setenv kernel_image 'Image.gz'
setenv devnum 1
setenv mmcroot '/dev/mmcblk1p2 rootwait rw'

I set devnum to 1 to use mmc1, and set the mmcroot to /dev/mmcblk1p2 since otherwise it would have pointed to the eMMC’s partition (from what I understand). Also, by default, fdtfile is set to fsl-imx8qm-apalis-v1.1-eval.dtb, while Yocto produces DTBs that don’t have the “fsl-” prefix.

Then I executed run mmc_boot to boot from mmc1. The kernel starts to boot, but gets stuck. Here is the kernel log: link text

I know that similar errors occurred on Apalis-imx6 machines, but so far, I found no solution. Any ideas?

Hi @crg8000

Can you clarify how you are deploying the image to the SDCard? I extracted the Apalis-iMX8_Reference-Minimal-Image-Tezi_5.4.0-devel-20210720190800+build.0.tar to a USB key and then launched the Easy Installer and was able to install and boot the image properly. But that is setup for eMMC based boot.


I simply flash the .wic.gz image directly to the SD card like this:

gunzip -c Reference-Multimedia-Image-apalis-imx8.wic.gz | sudo dd of=/dev/sdX bs=32M

Where sdX is the device node of the entire SD card.

EDIT: I add this to the local.conf file:

EXTRA_IMAGE_FEATURES += "ssh-server-dropbear package-management ptest-pkgs"
PACKAGE_CLASSES = "package_ipk"
INHERIT += "rm_work"
TOOLCHAIN_HOST_TASK_append = " nativesdk-meson "
SDK_XZ_COMPRESSION_LEVEL = "-1 --threads=3"

Nevermind - it turned out to be a U-Boot issue. I updated the eMMC contents, which also upgraded U-Boot to 2020.04-5.3.0+git.7f3416a28c34 , and now the image boots.

Thanks for reporting back. We were just coming to the same conclusion. These boards will always boot U-Boot from emmc so any changes you made in Yocto will need to be flashed to eMMC. From U-Boot you can load a kernel and rootfs from SDCard without issue. Let us know if you have further issues.