Unable to boot iMX 8M Nano EVK from SD card (Error reading cluster)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to boot iMX 8M Nano EVK from SD card (Error reading cluster)

Jump to solution
599 Views
stmatscaps
Contributor III

I'm new to Yocto development for the NXP i.MX boards, and I'm having a hard time to build a Yocto image and boot it for the first time from SD card. We have an i.MX 8M Nano DDR4 board, and apparently none of the prebuilt images from the NXP website can be used for that board.

I'm trying to build an image according to the instructions in the "i.MX Yocto Project User's Guide Rev. LF6.1.22_2.0.0 — 30 June 2023" and in https://github.com/nxp-imx/imx-manifest/tree/imx-linux-mickledore:

$ repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-mickledore -m imx-6.1.22-2.0.0.xml
$ repo sync
$ DISTRO=fsl-imx-wayland MACHINE=imx8mn-ddr4-evk source ./imx-setup-release.sh -b bld-wayland
$ bitbake core-image-base

I decompress the resulting image "core-image-base-imx8mn-ddr4-evk.wic.zst" and write the .wic file to an SD card with Win32DiskImager (at the moment I don't have the possibility to write the image from Linux directly). After that I can see the "Image" file and the "imx8mn-ddr4-evk.dtb" file on the FAT partition of the SD card from the Windows explorer.

When I try to boot the Nano board from this SD card, the following happens:

U-Boot SPL 2023.04-lf_v2023.04+gaf7d004eaf (Jun 06 2023 - 14:59:40 +0000)
DDRINFO: start DRAM init
DDRINFO: DRAM rate 2400MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
SEC0:  RNG instantiated
Normal Boot
Trying to boot from BOOTROM
Boot Stage: Primary boot
image offset 0x8000, pagesize 0x200, ivt offset 0x0
NOTICE:  Do not release JR0 to NS as it can be used by HAB
NOTICE:  BL31: v2.8(release):lf-6.1.22-2.0.0-0-g99195a23d
NOTICE:  BL31: Built : 06:14:17, Jun  2 2023


U-Boot 2023.04-lf_v2023.04+gaf7d004eaf (Jun 06 2023 - 14:59:40 +0000)

CPU:   i.MX8MNano Quad rev1.0 1500 MHz (running at 1200 MHz)
CPU:   Commercial temperature grade (0C to 95C) at 44C
Reset cause: POR
Model: NXP i.MX8MNano DDR4 EVK board
DRAM:  2 GiB
TCPC:  Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x52]
Power supply on USB2
TCPC:  Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x50]
Core:  192 devices, 31 uclasses, devicetree: separate
MMC:   FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... *** Warning - bad CRC, using default environment

[*]-Video Link 0adv7535_mipi2hdmi adv7535@3d: Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
mxs_video lcd-controller@32e00000: failed to get any video link display timings
probe video device failed, ret -22

        [0] lcd-controller@32e00000, video
        [1] dsi_controller@32e10000, video_bridge
        [2] adv7535@3d, panel
adv7535_mipi2hdmi adv7535@3d: Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
mxs_video lcd-controller@32e00000: failed to get any video link display timings
probe video device failed, ret -22
In:    serial
Out:   serial
Err:   serial
SEC0:  RNG instantiated
switch to partitions #0, OK
mmc1 is current device
flash target is MMC:1
Net:   eth0: ethernet@30be0000
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot:  0 
starting USB...
Bus usb@32e40000: Port not available.
USB is stopped. Please issue 'usb start' first.
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Error reading cluster
Failed to load '/imx8mn-ddr4-evk.dtb'
** No partition table - mmc 1 **
Couldn't find partition mmc 1:1
** No partition table - mmc 1 **
Couldn't find partition mmc 1:1
Working FDT set to 43000000
No EFI system partition
No EFI system partition
Failed to persist EFI variables
adv7535_mipi2hdmi adv7535@3d: Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
mxs_video lcd-controller@32e00000: failed to get any video link display timings
fdt_find_or_add_subnode: chosen: FDT_ERR_BADSTRUCTURE
ERROR: /chosen node create failed
 - must RESET the board to recover.

ERROR: failed to process device tree
** No partition table - mmc 1 **
Couldn't find partition mmc 1:1
switch to partitions #0, OK
mmc2(part 0) is current device
Running BSP bootcmd ...
switch to partitions #0, OK
mmc1 is current device
Failed to load 'boot.scr'
Error reading cluster
Failed to load 'Image'
Booting from net ...
BOOTP broadcast 1

After that it loops with the "BOOTP" message. What is worrying is the "Error reading cluster" message.

When I stop autoboot, I can examine the SD card from the u-boot prompt:

u-boot=> fatinfo mmc 1
Interface:  mmc
  Device 1: Vendor: Man 000003 Snr d3929d00 Rev: 0.15 Prod: SL32G�
            Type: Removable Hard Disk
            Capacity: 30436.5 MB = 29.7 GB (62333952 x 512)
Filesystem: FAT16 "boot       "
u-boot=> part list mmc 1

Partition Map for MMC device 1  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     16384           170392          076c4a2a-01     0c Boot
  2     196608          983430          076c4a2a-02     83
u-boot=> fatls mmc 1
 32121344   Image
    41423   imx8mn-ddr4-evk-ak5558.dtb
    42128   imx8mn-ddr4-evk-lk.dtb
    41879   imx8mn-ddr4-evk-rm67191-cmd-ram.dtb
    41879   imx8mn-ddr4-evk-rm67191.dtb
    41953   imx8mn-ddr4-evk-rm67199-cmd-ram.dtb
    41953   imx8mn-ddr4-evk-rm67199.dtb
    42604   imx8mn-ddr4-evk-rpmsg.dtb
    41458   imx8mn-ddr4-evk-usd-wifi.dtb
    41407   imx8mn-ddr4-evk.dtb
     6492   imx8mn_m7_TCM_hello_world.bin
    19176   imx8mn_m7_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin
    18480   imx8mn_m7_TCM_rpmsg_lite_str_echo_rtos.bin
    39528   imx8mn_m7_TCM_sai_low_power_audio.bin
   582480   tee.bin
            System Volume Information/

What is going wrong here? Any help would be appreciated, thanks!

0 Kudos
1 Solution
587 Views
stmatscaps
Contributor III

That is embarrassing... It turned out to be a defective SD card, so never mind, and sorry for the noise.

View solution in original post

0 Kudos
1 Reply
588 Views
stmatscaps
Contributor III

That is embarrassing... It turned out to be a defective SD card, so never mind, and sorry for the noise.

0 Kudos