Bad device mmc 2

Hello

I am trying to boot my ixora from only sd card, no internal emmc

so that I am following this link

https://doc.qt.io/archives/qt-5.6-devicecreation/qtee-preparing-hardware-apalis-imx6.html

also this link

but it outputs error

Apalis iMX6 # setenv drive 2
Apalis iMX6 # setenv setupdate 'fatload mmc ${drive}:1 ${loadaddr} flash_mmc.img; source ${loadaddr}'
Apalis iMX6 # run setupdate
MMC: no card present
** Bad device mmc 2 **
## Executing script at 12000000
Wrong image format for "source" command

why this is not working on my board, I plugged out and plugged in my sd multiple times, but it still gives same error.

Thanks for help.

In your case (Apalis imx6 + Ixora board) SD car slot correspond to MMC device 1.
You can check status of SD card using commands:

Apalis iMX6 # mmc rescan
Apalis iMX6 # mmc dev 1
switch to partitions #0, OK
mmc1 is current device
Apalis iMX6 # mmc info
Device: FSL_SDHC
Manufacturer ID: 0
OEM: 0
Name: uSD
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 7.4 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes

Hello

How to backward the settings then or is it removed all data from my internal emmc ?

Thanks.

Sorry, but I do not understand your question. So far all those U-Boot commands as given above only did temporary stuff and no settings got changed. What exactly is it that is not working for you or what exactly is it that you are trying to achieve?

I mean,

I was currently runnig my linux operating system from toradexs’ internal mmc,
Now I booted it from external mmc, so in the internal mmc I have still a linux system, how to not read mmc dev 1 at boot, because, now it is every time looking for an sd card.

Difficult to say what exactly you did change. However, doing the following should reset the U-Boot environment back to defaults hopefully booting from eMMC again:

env default -a
saveenv
reset

I am really getting crazy

after mmc dev 1

I booted up my board from SD card properly
then I tried to boot it from emmc, to setting my environment default “env default -a”

it booted from emmc, But now mmc dev 1 is not working, it just saves and switches to dev 1 but after resetting it is not booting from SD card.

I really did not understand HOW TO BOOT FROM SD CARD and HOW TO BOOT FROM EMMC

I want to run my operating system from external SD card or EMMC, how to switch between them when I want, please help me TORADEX…

Plase clarify me.

@marcel.tx @alex.tx

I am really getting crazy

You should not.

Meanwhile, I am still not understanding what exactly it is that you are trying to achieve.

after mmc dev 1

Doing mmc dev 1 just changes the currently selected SDHCI controller instance for any subsequently entered U-Boot commands in that session. It won’t persist or anything.

I booted up my board from SD card properly

But how? What exactly is it that you did?

then I tried to boot it from emmc, to setting my environment default “env default -a”

it booted from emmc, But now mmc dev 1 is not working, it just saves and switches to dev 1 but after resetting it is not booting from SD card.

As mentioned above mmc dev 1 by itself really does not do much of anything.

I really did not understand HOW TO BOOT FROM SD CARD and HOW TO BOOT FROM EMMC

Some more information about Linux booting and various options may be found here:

I want to run my operating system from external SD card or EMMC, how to switch between them when I want, please help me TORADEX…

You may also find this new article about Distro Boot useful:

Plase clarify me.