Try to boot imx8mp evk from an sd card

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

Try to boot imx8mp evk from an sd card

Jump to solution
8,646 Views
asanson
Contributor I

Hi !

I want to use the card imx8mp evk for its TSN (Time Sensitive Network) features.

I want to boot the imx8mp evk from a microSD card but I have the following message on u-boot :

MMC Device 0 not found
no mmc device at slot 0

For more details, I flashed on the MicroSD card an image compiled with OpenIL. Here are the commands I entered on my terminal to build the image and flash it into the sd card

$ git clone https://github.com/openil/openil.git
$ cd openil
# checkout to the 2021.04 v1.11 release
$ git checkout OpenIL-v1.11-202104 -b OpenIL-v1.11-202104

# Command to build the image
$ make imx8mpevk_defconfig O=output_imx8mpevk
$ cd output_imx8mpevk; make; cd ..

# Command to flash the image on the sd card
$ sudo dd if=/path_to_openil/output-imx8mpevk/images/sdcard.img of=/dev/sdx
(sdx is the name of my sd card on ubuntu)

Then, when I boot the imx8mp evk, it runs u-boot but just before starting the kernel I have the error :

MMC Device 0 not found
no mmc device at slot 0

I'm stuck on this problem since 2 weeks. I really need somoene to help.

Thanks a lot.

Alexander

0 Kudos
1 Solution
8,529 Views
khang_letruong
Senior Contributor III

Hi @asanson ,

As @Yuri said that OpenIL only supports eMMC and net boot for iMX 8M Plus, I suggest to flash the image to eMMC using  uuu tool. Steps are :

1. Set board’s boot configuration pin to serial download mode

boot-serial-download.png

2. Plug the USB cable to USB Type-C on board (the one other than the power supply),

3. Power-on the board. Then in the host side, verify if it is connected :

 

$ lsusb
Bus 001 Device 013: ID 1fc9:0146 NXP Semiconductors SE Blank 865

 

or

 

$ uuu -lsusb
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.139-0-g1a8f760

Connected Known USB Devices
	Path	 Chip	 Pro	 Vid	 Pid	 BcdVersion
	==================================================
	1:13	 	 FB:	 0x0525	0xA4A5	 0x0223

 

4. Flash sdcard.img

 

$ sudo uuu -v -b emmc_all imx8-boot-sd.bin sdcard.img
uu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.139-0-g1a8f760

Success 1    Failure 0                                                                                                                                                                                    
                                                                                                                                                                                                           
                                                                                                                                                                                                           
1:8      8/ 8 [Done                                  ] FB: done 

 

5. When done, power-off the board, set board’s boot configuration pin to boot from eMMC (also make sure that no SD card inserted).

boot-emmc.png

6. The power it on again to verify the firmware image running on eMMC with messages crashed out to the serial console.

Regards,
Khang.

 

 

View solution in original post

14 Replies
8,592 Views
Lawrence1
Contributor I

Use the procedure documented below to install the U-Boot firmware, Linux kernel and filesystem images to an SD Card on the i.MX 8M module. Having completed the installation, the i.MX 8M SOM will boot to Linux from the SD Card on next reset / power on Connect an HDMI cable to the HDMI connector Jack J17. Connect the other end of the cable to a HDMI display panel

0 Kudos
8,617 Views
khang_letruong
Senior Contributor III

Hi @asanson ,

 You can also check section 3.10 of following document for u-Boot settings of iMX8MP EVK :
https://www.nxp.com/docs/en/user-guide/OPEN-LINUX-IND-UM-1-10.pdf

Best Regards,
K.

 

8,566 Views
asanson
Contributor I

Thanks a lot for this specification @khang_letruong !

I followed to the letter what is said in the section 3.10 of this doc https://www.nxp.com/docs/en/user-guide/OPEN-LINUX-IND-UM-1-10.pdf but I still have the same problem.

The command "=>tftp 81000000 imx8-boot-sd.bin" works in my case.

Now, I have new environment variables in my U-Boot :
jh_mmcboot=setenv fdt_file imx8mp-evk-root.dtb;setenv jh_clk clk_ignore_unused; if run loadimage; then run mmcboot; else run jh_netboot; fi;
jh_netboot=setenv fdt_file imx8mp-evk-root.dtb;setenv jh_clk clk_ignore_unused; run netboot;

The following command is "=>mmc erase 64 0xD00". When I enter this command on U-Boot I have the same message :
MMC Device 0 not found
no mmc device at slot 0

If it can help you, when I type saveenv on U-Boot I have the following message :
Saving Environment to MMC... Writing to MMC(1)... failed
Failed (1)

If you have an other idea to solve this problem, it will help me a lot

Sincerely, 

Alexander

0 Kudos
8,622 Views
josephzhou1
Contributor V

yes.

Best Regards,
Joseph Zhou Jianhui / Senior Embedded Software Engineer, Singapore
0 Kudos
8,631 Views
Yuri
NXP Employee
NXP Employee

@asanson 
Hello,

   Please check U-boot environment variables, if SD card is used for boot.
You may look at the variables of the demo image:

https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applicat...

 

Regards,
Yuri.

0 Kudos
8,573 Views
asanson
Contributor I

Thanks a lot for your answer @Yuri !

I tried to boot my i.MX 8M Plus EVK with a demo image (build with yocto project) from this link https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applicat... and it works perfectly! I stopped the boot to stay in U-boot and I tried to understand what's wrong with my environment variables. 

But there is too many differencies between the printenv from the demo image and the printenv from the openil image... What I am supposed to modify?

You can find attached a copy of the U-Boot environment variables from the demo image and the openil image.

If you think there is something important to modify in the U-Boot env variables of the OpenIL, let me know!

Sincerely, 

Alexander

0 Kudos
8,545 Views
Yuri
NXP Employee
NXP Employee

@asanson 
Hello,

  Looks like the demo supports usb, mmc1 and mmc2 for boot:

boot_targets=usb0 mmc1 mmc2
bootcmd=run distro_bootcmd;run bsp_bootcmd
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
bsp_bootcmd=echo Running BSP bootcmd ...; mmc dev ${mmcdev}; if mmc rescan; then if run 
     loadbootscript; then run bootscript; else if run loadimage; then run mmcboot; else run netboot; fi; fi; fi;

 

The openIL configuration  supports only mmc and net boot:

bootcmd=mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else if
    run loadimage; then run mmcboot; else run netboot; fi; fi; fi;

 

Regards,
Yuri.

0 Kudos
8,568 Views
khang_letruong
Senior Contributor III

Hi @asanson,

For OpenIL, can you just follow its instructions from 2.1 to 2.3.1 of https://www.nxp.com/docs/en/user-guide/OPEN-LINUX-IND-UM-1-10.pdf  to checkout the latest OpenIL-v1.11-202104 tag, make the imx8mpevk_defconfig or imx8mpevk_ubuntu_defconfig then run make to generate an sdcard.img file. Finally flash sdcard.img into an micro SD card and boot the iMX8MP EVK using from that medium ? I think that will be enough to boot from the micro SD card without setting anything in u-Boot.

Regards,
K.

 

0 Kudos
8,534 Views
asanson
Contributor I

It's exactly what I did. I followed to the letter the instructions from 2.1 and 2.3.1 of https://www.nxp.com/docs/en/user-guide/OPEN-LINUX-IND-UM-1-10.pdf

Unfortunately, it doesn't work because when I boot for from the micro SD card, I have the problem of the MMC device not found.

I formated the micro sd card before dd'ing it.

I really don't know what else to do...

Regards, 
Alexander

0 Kudos
8,530 Views
khang_letruong
Senior Contributor III

Hi @asanson ,

As @Yuri said that OpenIL only supports eMMC and net boot for iMX 8M Plus, I suggest to flash the image to eMMC using  uuu tool. Steps are :

1. Set board’s boot configuration pin to serial download mode

boot-serial-download.png

2. Plug the USB cable to USB Type-C on board (the one other than the power supply),

3. Power-on the board. Then in the host side, verify if it is connected :

 

$ lsusb
Bus 001 Device 013: ID 1fc9:0146 NXP Semiconductors SE Blank 865

 

or

 

$ uuu -lsusb
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.139-0-g1a8f760

Connected Known USB Devices
	Path	 Chip	 Pro	 Vid	 Pid	 BcdVersion
	==================================================
	1:13	 	 FB:	 0x0525	0xA4A5	 0x0223

 

4. Flash sdcard.img

 

$ sudo uuu -v -b emmc_all imx8-boot-sd.bin sdcard.img
uu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.139-0-g1a8f760

Success 1    Failure 0                                                                                                                                                                                    
                                                                                                                                                                                                           
                                                                                                                                                                                                           
1:8      8/ 8 [Done                                  ] FB: done 

 

5. When done, power-off the board, set board’s boot configuration pin to boot from eMMC (also make sure that no SD card inserted).

boot-emmc.png

6. The power it on again to verify the firmware image running on eMMC with messages crashed out to the serial console.

Regards,
Khang.

 

 

8,506 Views
asanson
Contributor I

Thanks a lot for these specifications @khang_letruong 

It solves my problem and now I can boot the iMX8M Plus EVK with an OpenIL build image!

But, I still have a small problem... It asks me a Login and Password :
OpenIL-Ubuntu ubuntu-20.04.1
IMX8MPEVK-Ubuntu login :

As it is specified in the documentation section 4.7.5 https://manuals.plus/m/f4d5122394e0060c1a11124cd7138cb99c361b8d1559f2d2ddf867dc771feb04.pdf, I tried the login "root" with no password (just press enter for the password) but it says that the login is incorrect.

Do you have an idea of the login and the password to use the card?

Thanks a lot,
Alexander

0 Kudos
8,496 Views
khang_letruong
Senior Contributor III

Hi @asanson,

As it is specified in the documentation section 4.7.5 https://manuals.plus/m/f4d5122394e0060c1a11124cd7138cb99c361b8d1559f2d2ddf867dc771feb04.pdf, I tried the login "root" with no password (just press enter for the password) but it says that the login is incorrect.

Above link is for Yocto based image (or Buildroot Busybox based image in the case of OpenIL, built with imx8mpevk_defconfig)

For OpenIL Ubuntu based image (built with imx8mpevk_ubuntu_defconfig), could it be a pair of root | root or ubuntu | ubuntu? Can you try ?

BR,
K.

 

0 Kudos
8,491 Views
asanson
Contributor I

A big thanks to you @khang_letruong!

It was the pair of root | root.

I can now start to work with IMX8M Plus EVK

Very good continuation.

BR,
Alexander

0 Kudos
8,567 Views
khang_letruong
Senior Contributor III

One more important thing :

Please unmount the mounted partitions (if any) of your SD card when plugged into laptop/PC before dd'ing it.

Regards,
K.

0 Kudos