Unable to boot with Class 10 Sandisk SD card on i.MX8 eval board

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Unable to boot with Class 10 Sandisk SD card on i.MX8 eval board

1,032件の閲覧回数
hemantvraut
Contributor I

Hi All,

 

We have i.MX8 evaluation board and custom build image for it.

When we use Transcend class 10 SD card, the board boots up completely,
but when we use SanDisk class 10 SD card, we get a device tree error.

Please find boot up log

U-Boot SPL 2020.04-tq-g28fae940aa (Feb 13 2023 - 08:31:58 +0000)
PMIC:  PCA9450 ID=0x31
CRCbdf5 (calculated bdf5) [OKAY]
HWREV.02xx
RAMtype 1, 2048 MiB, no ECC
RTCy
SPINORy
e-MMCy
SEy
EEPROMy
EEPROMtype 1, 8 KiB, page 32
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
Normal Boot
Trying to boot from BOOTROM
image offset 0x8000, pagesize 0x200, ivt offset 0x0


U-Boot 2020.04-tq-g28fae940aa (Feb 13 2023 - 08:31:58 +0000)

CPU:   i.MX8MP[6] rev1.1 1600 MHz (running at 1200 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 43C
Reset cause: POR
Model: TQ-Systems i.MX8MPlus TQMa8MPxL on MBa8MPxL
Boot:  USDHC2(SD)
Board: TQMa8MPQL on a MBa8MPxL
DRAM:  2 GiB
MMC:   FSL_SDHC: 1, FSL_SDHC: 0
Loading Environment from MMC... *** Warning - No block device, using default environment

In:    serial
Out:   serial
Err:   serial

 BuildInfo:
  - ATF cfccd00
  - U-Boot 2020.04-tq-g28fae940aa

TQMa8MPQL EEPROM:
  ID: TQMa8MPQL-CE.0200
  SN: 78851235
  MAC: 00:d0:93:6a:d0:0a
Net:   Could not get PHY for ethernet@30bf0000: addr 3
phy_connect() failed
Warning: ethernet@30be0000 using MAC address from ROM
eth0: ethernet@30be0000Could not get PHY for ethernet@30bf0000: addr 3
phy_connect() failed
Normal Boot
Hit any key to stop autoboot:  3  2  1  0 
Booting from mmc ...
WARN: Cannot load the DT
=>

 

Transcend mmc info

=> mmc dev 1
Run CMD11 1.8V switch
switch to partitions #0, OK
mmc1 is current device
=> 
=> 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.9 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
=> 

 

Sandisk mmc info

=> mmc dev 1
=> 
=> mmc infp o
Device: FSL_SDHC
Manufacturer ID: 45
OEM: 0
Name: DG4016 
Bus Speed: 200000000
Mode: HS400ES (200MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 14.7 GiB
Bus Width: 8-bit DDR
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 14.7 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 4 MiB ENH
=> 

 

Please suggest debugging inputs. Any pointers and direction are highly appreciated.

0 件の賞賛
返信
6 返答(返信)

895件の閲覧回数
opedis
Contributor III

Sandisk mmc info shows  very clear, it is an eMMC with 5.1.

It has boot, user, rpmb partition.

And it shows the speed is HS400ES, not a SD card speed mode.

 

Or an eMMC with adaptor could insert into tf/sdcard slot.

But if it is an eMMC with adaptor, lots of time, it could not work in tf/sdcard slot. Cause the slot hardware and this interface is designed for sdcard.

 

8bit for eMMC and 4 bit for sdcard.

only 4 bit in tf/sdcard slot.

 

タグ(1)
0 件の賞賛
返信

965件の閲覧回数
hemantvraut
Contributor I

Hello Chavira,

Thank you for your response and for providing inputs for further debugging.

As mentioned earlier, we were able to boot with Transcend SD card but not with SanDisk SD card, same with fdtfile command. We were able to check dtb files with Transcend SD card but not with SanDisk SD card.

 

Transcend SD card

=> fatls mmc 1:1
 33458688   Image
     8280   hello_world.bin
    66142   imx8mp-tqma8mpql-mba8mpxl-hdmi-imx327.dtb
    66079   imx8mp-tqma8mpql-mba8mpxl-hdmi-ov9281.dtb
    65125   imx8mp-tqma8mpql-mba8mpxl-hdmi.dtb
    64809   imx8mp-tqma8mpql-mba8mpxl-lvds-tm070jvhg33.dtb
    65509   imx8mp-tqma8mpql-mba8mpxl-rpmsg.dtb
    64809   imx8mp-tqma8mpql-mba8mpxl.dtb
    19108   rpmsg_lite_pingpong_rtos_linux_remote.bin

9 file(s), 0 dir(s)

=> 

SanDisk SD card

=> 
=> fatls mmc 1:1
=> 

 

As one SD card is working and other is not working,

Are there some SD card vendor-dependent settings we need to check, can we change the MMC speed from the u-boot command prompt?

Please suggest.

Thank you,

Hemant Raut

0 件の賞賛
返信

952件の閲覧回数
Chavira
NXP TechSupport
NXP TechSupport

Hi @hemantvraut!

Maybe could be the way that you are flashing the sd card.

How you are flashing the SD card?

Are you using the uuu tool or dd commands?

Best Regards!
Chavira

0 件の賞賛
返信

943件の閲覧回数
hemantvraut
Contributor I

Hi Chavira,

Good morning,

We are using dd commands or Disk Image Writer (a utility in Linux OS).

Does the flashing method have different behavior with different SD cards?

The Transcend SD card is working fine with dd commands or Disk Image Writer but Sandisk is unable to boot when flashed with dd commands or Disk Image Writer.

 

Thank you,

Hemant Raut

0 件の賞賛
返信

927件の閲覧回数
Chavira
NXP TechSupport
NXP TechSupport

Hi @hemantvraut!

Let me provide the steps I have followed and tested on my side that should work.

Format SD card connected to my Linux PC, listed as sdb
$ sudo fdisk /dev/sdb
Type the following parameters (each followed by
p [lists the current partitions]


d [to delete existing partitions. Repeat this until no unnecessary partitions are reported by the 'p' command to start fresh.]


n [create a new partition]


p [create a primary partition - use for both partitions]


1 [the first partition]


20480 [starting at offset sector]


1024000 [ending position of the first partition to be used for the boot images]


p [to check the partitions]


n

p

2

1228800 [starting at offset sector, which leaves enough space for the kernel, the bootloader and its configuration data]


<enter> [using the default value will create a partition that extends to the last sector of the media]


p [to check the partitions]


w [this writes the partition table to the media and fdisk exits]

Change directory to where I have all my files, ubot, rootfs, dtb, etc.
$ cd LF_v5.15.32-2.0.0_images_imx8mnevk/

Copy bootloader to SD card
$ sudo dd if=imx-boot-imx8mnevk-sd.bin-flash_evk of=/dev/sdb bs=1k seek=32 conv=fsync

Create a VFAT partition where kernel and dtb will be stored
$ sudo mkfs.vfat /dev/sdb1

Create a directory where SD partition will be mounted; next mount the partition
$ mkdir mountpoint
$ sudo mount /dev/sdb1 mountpoint

Copy and rename kernel image and dtb (here the documentation is not clear, so this may be the cause of your issue) uboot expects that kernel image is named Image and dtb imx8mq-evk.dtb
$ sudo cp Image-imx8mnevk.bin ./mountpoint/Image
$ sudo cp imx8mq-evk.dtb ./mountpoint/imx8mq-evk.dtb

Unmount the partition
$ sudo umount mountpoint

Format partition that will store the root file system
$ sudo mkfs.ext4 /dev/sdb2

Mount the partiotion
$ sudo mount /dev/sdb2 mountpoint/

Create a directory and extract root file system
$ mkdir rootfs
$ cd rootfs/
$ tar -jxvf ../imx-image-full-imx8mnevk.tar.bz2

Copy root file system to the mounted partition
$ sudo cp -a * ../mountpoint

Unmount partition and sync
$ sudo umount ../mountpoint
$ sync

You may unplug your SD card now and try it on your board, if you find any issue please do let me know.

https://www.nxp.com/docs/en/user-guide/IMX_LINUX_USERS_GUIDE.pdf

0 件の賞賛
返信

1,016件の閲覧回数
Chavira
NXP TechSupport
NXP TechSupport

Hi @hemantvraut!
Thank you for contacting NXP Support!

How you are flashing your image?

The dtb variable "fdtfile" should have the same name as our dtb.

You can check the dtb files loaded in the SD card using the command "fatls mmc 1:1".

It is necessary you have to change the variable with the next command "setenv fdtfile <name_of_your_dtb.dtb>" and saveenv

Best Regards!
Chavira

0 件の賞賛
返信