We are having problems booting our i.MX8M Mini with some micro SD cards.
u-boot manages to load from the micro SD, but when it come to loading the kernel, the MMC device disapears and we get 'Bad Linux ARM64 Image magic!'.
We noticed that the cards that have higher transfer speed from an ubuntu host all fail.
In our application, we need to use large micro SD cards with the i.MX8M Mini to store data to it. We'll be booting from eMMC, uSD. We're just trying to boot from uSD as a quick test as we have not got the eMMC working yet.
We don't need the card to necessarily run at its max speed, if that is a problem with the i.MX8M Mini. Is there a way we can control the speed negociated between the two devices? Maybe from the device tree?
Below boot log when it fails:
[11:52:03:994] U-Boot SPL 2019.04-4.19.35-1.1.0+g0f7bdf87bb (Dec 18 2020 - 15:11:59 +0000)␍␊
[11:52:04:018] power_bd71837_init␍␊
[11:52:04:018] DDRINFO: start DRAM init␍␊
[11:52:04:273] DDRINFO:ddrphy calibration done␍␊
[11:52:04:289] DDRINFO: ddrmix config done␍␊
[11:52:04:321] Normal Boot␍␊
[11:52:04:321] Trying to boot from MMC1␍␊
[11:52:04:705] ␍␊
[11:52:04:705] ␍␊
[11:52:04:737] U-Boot 2019.04-4.19.35-1.1.0+g0f7bdf87bb (Dec 18 2020 - 15:11:59 +0000)␍␊
[11:52:04:737] ␍␊
[11:52:04:737] CPU: Freescale i.MX8MMD rev1.0 1800 MHz (running at 1200 MHz)␍␊
[11:52:04:737] CPU: Commercial temperature grade (0C to 95C) at 34C␍␊
[11:52:04:862] Reset cause: POR␍␊
[11:52:04:862] Model: Active Silicon Harrier IP based on i.MX8MM - rev 10␍␊
[11:52:04:862] Board: Active Silicon iMX8MM Harrier - rev 10␍␊
[11:52:04:862] DRAM: 992 MiB␍␊
[11:52:04:942] Setup FECMMC: FSL_SDHC: 1, FSL_SDHC: 2␍␊
[11:52:04:974] Loading Environment from MMC... Run CMD11 1.8V switch␍␊
[11:52:05:102] *** Warning - No block device, using default environment␍␊
[11:52:05:102] ␍␊
[11:52:05:129] In: serial␍␊
[11:52:05:129] Out: serial␍␊
[11:52:05:129] Err: serial␍␊
[11:52:05:129] ␍␊
[11:52:05:129] BuildInfo:␍␊
[11:52:05:129] - ATF 70fa7bc␍␊
[11:52:05:129] - U-Boot 2019.04-4.19.35-1.1.0+g0f7bdf87bb␍␊
[11:52:05:129] ␍␊
[11:52:05:225] Run CMD11 1.8V switch␍␊
[11:52:05:257] flash target is MMC:1␍␊
[11:52:05:369] Run CMD11 1.8V switch␍␊
[11:52:05:385] MMC card init failed!␍␊
[11:52:05:497] Run CMD11 1.8V switch␍␊
[11:52:05:552] ** Block device MMC 1 not supported␍␊
[11:52:05:552] Net: No MAC address set in fuse ROM. Fix␍␊
[11:52:05:552] ␍␊
[11:52:05:552] Warning: ethernet@30be0000 using MAC address from ROM␍␊
[11:52:05:552] eth0: ethernet@30be0000␍␊
[11:52:05:552] Fastboot: Normal␍␊
[11:52:05:552] Normal Boot␍␊
[11:52:05:552] Hit any key to stop autoboot: 2 <0x08><0x08><0x08> 1 <0x08><0x08><0x08> 0 ␍␊
[11:52:07:662] Run CMD11 1.8V switch␍␊
[11:52:07:678] MMC Device 0 not found␍␊
[11:52:07:699] no mmc device at slot 0␍␊
[11:52:07:699] Bad Linux ARM64 Image magic!␍␊
Hi everyone,
same problem here. 16 GB SD Card works fine, 32 GB SD Card reads the U-Boot partition but not the Linux one.
The images and the binaries inside the 2 cards are the same.
With the 16 GB SD Card:
u-boot=> mmc info
Device: FSL_SDHC
Manufacturer ID: 74
OEM: 4a60
Name: USDU1
Bus Speed: 200000000
Mode: UHS SDR104 (208MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.7 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
u-boot=> mmc dev
Run CMD11 1.8V switch
switch to partitions #0, OK
mmc1 is current device
u-boot=> mmc list
FSL_SDHC: 1 (SD)
FSL_SDHC: 2
With the 32 GB SD Card:
u-boot=> mmc info
MMC Device 0 not found
no mmc device at slot 0
u-boot=> mmc dev
MMC Device 0 not found
no mmc device at slot 0
u-boot=> mmc list
FSL_SDHC: 1
FSL_SDHC: 2
Any suggestion?
Hi Igor,
I've tried the same micro SD cards (Samsung EVO 512G U3 and Integral 32GB U3) in the i.MX8MMini EVK with stock images with the same result.
I've also tried the cards on another board (different product, different PCB layout) based on the i.MX8M Mini and also got the same result.
I find it suspicious that 3 different boards have the same signal integrity issues.
Are there compatibility issues between the i.MX8M Mini and micro SD cards? Which class of cards is it meant to support and has it been tested with?
Is there a way to control which mode u-boot and then the Linux kernel interface with the card? Currently they both switch to CMD11 (1V8 and 200MHz). Can we control that somehow? I'd like to try it at a lower clock speed.
Thanks,
JP
[10:15:29:827] U-Boot SPL 2019.04-4.19.35-1.1.0+g4d377539a1 (Mar 15 2021 - 18:04:49 +0000)␍␊
[10:15:29:848] power_bd71837_init␍␊
[10:15:29:848] DDRINFO: start DRAM init␍␊
[10:15:30:136] DDRINFO:ddrphy calibration done␍␊
[10:15:30:136] DDRINFO: ddrmix config done␍␊
[10:15:30:184] Normal Boot␍␊
[10:15:30:184] Trying to boot from MMC1␍␊
[10:15:30:617] ␍␊
[10:15:30:617] ␍␊
[10:15:30:617] U-Boot 2019.04-4.19.35-1.1.0+g4d377539a1 (Mar 15 2021 - 18:04:49 +0000)␍␊
[10:15:30:617] ␍␊
[10:15:30:617] CPU: Freescale i.MX8MMQ rev1.0 1800 MHz (running at 1200 MHz)␍␊
[10:15:30:617] CPU: Commercial temperature grade (0C to 95C) at 41C␍␊
[10:15:30:738] Reset cause: POR␍␊
[10:15:30:738] Model: FSL i.MX8MM EVK board␍␊
[10:15:30:738] DRAM: 2 GiB␍␊
[10:15:30:818] TCPC: Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x52]␍␊
[10:15:30:840] Power supply on USB2␍␊
[10:15:30:840] TCPC: Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x50]␍␊
[10:15:30:840] MMC: FSL_SDHC: 1, FSL_SDHC: 2␍␊
[10:15:30:856] Loading Environment from MMC... *** Warning - No block device, using default environment␍␊
[10:15:38:205] ␍␊
[10:15:38:205] No panel detected: default to MIPI2HDMI␍␊
[10:15:38:205] adv7535_init: Can't find device id=0x3d, on bus 1␍␊
[10:15:38:205] Display: MIPI2HDMI (1920x1080)␍␊
[10:15:38:205] Video: 1920x1080x24␍␊
[10:15:38:205] In: serial␍␊
[10:15:38:205] Out: serial␍␊
[10:15:38:205] Err: serial␍␊
[10:15:38:226] ␍␊
[10:15:38:226] BuildInfo:␍␊
[10:15:38:226] - ATF 70fa7bc␍␊
[10:15:38:226] - U-Boot 2019.04-4.19.35-1.1.0+g4d377539a1␍␊
[10:15:38:226] ␍␊
[10:15:45:537] flash target is MMC:1␍␊
[10:15:52:848] MMC card init failed!␍␊
[10:16:00:182] ** Block device MMC 1 not supported␍␊
[10:16:00:182] Net: ␍␊
[10:16:00:182] Warning: ethernet@30be0000 using MAC address from ROM␍␊
[10:16:00:182] eth0: ethernet@30be0000␍␊
[10:16:00:182] Fastboot: Normal␍␊
[10:16:00:182] Normal Boot␍␊
[10:16:00:182] Hit any key to stop autoboot: 2 <0x08><0x08><0x08> 1 <0x08><0x08><0x08> 0 ␍␊
[10:16:09:498] MMC Device 0 not found␍␊
[10:16:09:498] no mmc device at slot 0␍␊
[10:16:09:498] Bad Linux ARM64 Image magic!␍␊
[10:20:35:441] U-Boot SPL 2019.04-4.19.35-1.1.0+g4d377539a1 (Mar 15 2021 - 18:04:49 +0000)␍␊
[10:20:35:462] power_bd71837_init␍␊
[10:20:35:462] DDRINFO: start DRAM init␍␊
[10:20:35:750] DDRINFO:ddrphy calibration done␍␊
[10:20:35:750] DDRINFO: ddrmix config done␍␊
[10:20:35:798] Normal Boot␍␊
[10:20:35:798] Trying to boot from MMC1␍␊
[10:20:36:197] ␍␊
[10:20:36:197] ␍␊
[10:20:36:197] U-Boot 2019.04-4.19.35-1.1.0+g4d377539a1 (Mar 15 2021 - 18:04:49 +0000)␍␊
[10:20:36:223] ␍␊
[10:20:36:223] CPU: Freescale i.MX8MMQ rev1.0 1800 MHz (running at 1200 MHz)␍␊
[10:20:36:223] CPU: Commercial temperature grade (0C to 95C) at 30C␍␊
[10:20:36:347] Reset cause: POR␍␊
[10:20:36:347] Model: FSL i.MX8MM EVK board␍␊
[10:20:36:347] DRAM: 2 GiB␍␊
[10:20:36:427] TCPC: Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x52]␍␊
[10:20:36:449] Power supply on USB2␍␊
[10:20:36:449] TCPC: Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x50]␍␊
[10:20:36:449] MMC: FSL_SDHC: 1, FSL_SDHC: 2␍␊
[10:20:36:465] Loading Environment from MMC... Run CMD11 1.8V switch␍␊
[10:20:36:705] *** Warning - No block device, using default environment␍␊
[10:20:36:733] ␍␊
[10:20:36:733] No panel detected: default to MIPI2HDMI␍␊
[10:20:36:733] adv7535_init: Can't find device id=0x3d, on bus 1␍␊
[10:20:36:733] Display: MIPI2HDMI (1920x1080)␍␊
[10:20:36:733] Video: 1920x1080x24␍␊
[10:20:36:763] In: serial␍␊
[10:20:36:763] Out: serial␍␊
[10:20:36:763] Err: serial␍␊
[10:20:36:763] ␍␊
[10:20:36:763] BuildInfo:␍␊
[10:20:36:763] - ATF 70fa7bc␍␊
[10:20:36:763] - U-Boot 2019.04-4.19.35-1.1.0+g4d377539a1␍␊
[10:20:36:763] ␍␊
[10:20:36:971] Run CMD11 1.8V switch␍␊
[10:20:36:987] flash target is MMC:1␍␊
[10:20:37:195] Run CMD11 1.8V switch␍␊
[10:20:37:227] MMC card init failed!␍␊
[10:20:37:435] Run CMD11 1.8V switch␍␊
[10:20:37:492] ** Block device MMC 1 not supported␍␊
[10:20:37:492] Net: ␍␊
[10:20:37:492] Warning: ethernet@30be0000 using MAC address from ROM␍␊
[10:20:37:492] eth0: ethernet@30be0000␍␊
[10:20:37:492] Fastboot: Normal␍␊
[10:20:37:492] Normal Boot␍␊
[10:20:37:492] Hit any key to stop autoboot: 2 <0x08><0x08><0x08> 1 <0x08><0x08><0x08> 0 ␍␊
[10:20:39:700] Run CMD11 1.8V switch␍␊
[10:20:39:716] MMC Device 0 not found␍␊
[10:20:39:737] no mmc device at slot 0␍␊
[10:20:39:737] Bad Linux ARM64 Image magic!␍␊
[10:20:39:737] u-boot=>
Any comment?...
Hi jp_arnaud
>I find it suspicious that 3 different boards have the same signal integrity issues.
error "we get 'Bad Linux ARM64 Image magic!' relates to wrong uboot/linux versions.
You should use uboot version aligned to linux version as described in Release Notes on
NXP linux documentation link:
Other issues are related to signal integrity and solution is provided on
https://community.nxp.com/t5/i-MX-Processors/eMMC-8GB-to-4GB-crash-on-linux-yocto-boot/m-p/373231
>Are there compatibility issues between the i.MX8M Mini and micro SD cards?
no
>Which class of cards is it meant to support and has it been tested with?
all classes are supported.
>Is there a way to control which mode u-boot and then the Linux kernel interface with the card?
no way sorry. Working mode is selected automatically by SD driver.
>Currently they both switch to CMD11 (1V8 and 200MHz). Can we control that somehow?
>I'd like to try it at a lower clock speed.
not sorry. Errors with high speed modes (1V8 and 200MHz) - is another confirmation that
issue is related to SD signal integrity.
Best regards
igor
Hi Igor,
We are using u-boot 2019.04-4.19.35-1.1.0 with Linux imx_19.35-1.1.0. The image generated does work when burnt onto smaller micro SDs, but not on larger.
Are the SD cards listed in my original post all supposed to work with the i.MX with regards to booting from them?
I have now run tests whilst booting from the eMMC and inserted various micro SD cards to check whether I could use them or not.
In this configuration, the Samsung EVO 512GB U3 appears to work. I can format it, read and write to it. See below for the way it is setup in the OS.
I measure ~50MB/sec datarate when writing to it using dd. Given the actual clock appears to be 200MHz and we're using 4 bit, I'd have expected something closer to 100MB/sec.
Why is that?
This is how I measure the throughput:
echo 3 > /proc/sys/vm/drop_caches
dd if=/dev/zero of=/mnt/tmp/output bs=8k count=100k
Results of cat /sys/kernel/debug/mmc1/ios
root@imx8mmharrier:~# cat /sys/kernel/debug/mmc1/ios
clock: 208000000 Hz
actual clock: 200000000 Hz
vdd: 21 (3.3 ~ 3.4 V)
bus mode: 2 (push-pull)
chip select: 0 (don't care)
power mode: 2
bus width: 2 (4 bits)
timing spec: 6 (sd uhs SDR104)
signal voltage: 1 (1.80 V)
driver type: 0 (driver type B)
Hi jp_arnaud
reason may be signal integrity issues as described on below link
https://community.nxp.com/t5/i-MX-Processors/eMMC-8GB-to-4GB-crash-on-linux-yocto-boot/m-p/373231
Best regards
igor
Hi jp_arnaud
"Bad Linux ARM64 Image magic!" may happen when wrong kernel version used with uboot,
so for example with U-Boot SPL 2019.04-4.19.35-1.1.0 should be used linux L4.19.35-1.1.0:
https://source.codeaurora.org/external/imx/linux-imx/tree/?h=imx_4.19.35_1.1.0
So one can try to rebuild all software components from scratch using nxp documentation
Best regards
igor