i.mx93 evk boot from sd card

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

i.mx93 evk boot from sd card

Jump to solution
4,142 Views
rockerr
Contributor II

Hi, I'm trying to boot my custom image build with yocto and bsp layers provided by nxp, however the board always boots from the eMMC memory. It seems that in the i.MX 93 EVK Quick Start Guide boot switches setup for booting from an Micro SD card isn't even mentioned. What am I missing here?

What's the correct setup to boot from a micro SD card? Or perhaps is there a way to flash the wic.zst image directly to the eMMC?

Tags (1)
0 Kudos
Reply
1 Solution
4,008 Views
joanxie
NXP TechSupport
NXP TechSupport

SW1301 is boot mode, and you can find the table on the board too, for microSD/SDHC2, the SW1302[3:0]=0010

View solution in original post

13 Replies
4,028 Views
joanxie
NXP TechSupport
NXP TechSupport

what flash command do you use? if you want to boot from sd card, you need to use dd command or uuu -b sd_all <bootloader> <wic image> to download images to the sd card, pls check it if you flash the images to the sd card correctly or not

0 Kudos
Reply
4,024 Views
rockerr
Contributor II

This is the command I use, I really think the card is being flashed properly.

 

zstdcat <image_name>.wic.zst | sudo dd of=/dev/sd<partition> bs=1M conv=fsync
0 Kudos
Reply
4,109 Views
ramprakash08
Contributor IV

It sounds like you're having trouble booting your i.MX93 EVK from an SD card. The boot switch settings for booting from an SD card are indeed not mentioned in the i.MX 93 EVK Quick Start Guide. However, you can find these settings in the i.MX 93 EVK Hardware User Guide. Here are the steps you need to follow:

  1. Set the BOOT_MODE[1:0] switches to '10' to select the Serial Downloader mode.
  2. Set the BOOT_CFG[3:0] switches to '0100' to select the SD card as the boot device.

As for flashing the wic.zst image directly to the eMMC, you can use the dd command in Linux. Here's a sample command:

 dd if=/path/to/your/image.wic.zst of=/dev/mmcblk0 bs=1M 

Replace '/path/to/your/image.wic.zst' with the actual path to your image file. Also, make sure to replace '/dev/mmcblk0' with the correct device node for your eMMC.

Please note that this command will overwrite the entire eMMC, so make sure to backup any important data first.

Also, please be aware that the dd command does not provide any progress indication. It may appear to be doing nothing, but it is actually writing the image to the eMMC. Be patient and wait for the command to complete.

Hope this helps!

0 Kudos
Reply
4,016 Views
rockerr
Contributor II

Maybe you could elaborate on how to set the board into a mode that would allow the eMMC to be flashed as well? Somehow I cannot find a proper document with instructions on how to do that.

0 Kudos
Reply
4,020 Views
rockerr
Contributor II

Could you tell me the code number of the BOOT_MODE and BOOT_CFG switches?

I didn't find a file called "i.MX 93 EVK Hardware User Guide", the best I could do is "i.MX 93 EVK Hardware Design Guide" and it doesn't contain information on which switches are the BOOT_MODE and BOOT_CFG swtiches. I don't think there are any labels like this on the i.MX 93 EVK board.

I did find a label "BMODE" on the board, is that the BOOT_MODE set of switches? This is accompanied by a list of ["BM1", "BM0", "BM2", "BM3"].

0 Kudos
Reply
4,009 Views
joanxie
NXP TechSupport
NXP TechSupport

SW1301 is boot mode, and you can find the table on the board too, for microSD/SDHC2, the SW1302[3:0]=0010

3,747 Views
hutchman
Contributor II

So I did like 4 complete clean builds from different distros, NXP and meta-freescale releases ... and couldn't get the imx93evk to boot from sdcard.  But my issue turned out to be the dip switch settings.

I looked at the hardware guide (see pic of it below) and the quick start guide and all say SD is 0010 (specifically sw1301-3 is on) but the attached picture is what actually worked for me after wasting tons of time:

sdcard.jpg

So actually that's sw1301-2 that's on and all others off!

Regards,

Brian

 

schematic.jpeg

 

3,713 Views
joanxie
NXP TechSupport
NXP TechSupport

in fact, you can find the boot table on the imx93evk board, it shows

sw1301[3:0]=0010 for SD card

0 Kudos
Reply
3,698 Views
hutchman
Contributor II

It sure does:

sw1301.jpg

And since it says SW1301[3:0] most people would look at that and set

Switch - Position

1 - off

2 - off

3 - on

4 - off

I'll wait (and won't hold my breath) while you go try that and see what happens.  Spoiler alert ... nothing, it doesn't work.

Now if you noticed my picture above of what actually works, it sets:

Switch - Position

1 - off

2 - on

3 - off

4 - off

... which does not match the silk screen, quick start guide, hardware guide etc..

But, it does match what ramprakash08 said above so they should probably get credit for the right answer ha, ha.

 

Regards,

Brian

0 Kudos
Reply
3,690 Views
joanxie
NXP TechSupport
NXP TechSupport

yes, the table isn't clear enough for the engineer who use imx93 first time, but sw1301[3:0] =0010 means 4-off, 3-off,2-on, 1-off, sw1301[0:3]=0010 means 1-off 2-off,3-on,4-off, indeed most people would misunderstand this, maybe SW1301[4-1] is more clear, you also can refer to the table, it's very clear to understand how the switch mode works

joanxie_0-1694057579721.png

joanxie_1-1694057632338.png

 

 

0 Kudos
Reply
3,996 Views
rockerr
Contributor II
which one is SW1302? All the switches I see are SW1301, SW101, SW1005, SW1006, SW1007.
0 Kudos
Reply
3,991 Views
joanxie
NXP TechSupport
NXP TechSupport

sorry it's my typo, I mean SW1301

0 Kudos
Reply
3,977 Views
rockerr
Contributor II
Thanks, I finally got it!
0 Kudos
Reply