MMC Device 0 not found
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-01-11 8:35 AM
Hello,
I have a custom board with an eMMC on it and with no SD card available. In the U-Boot device tree I have the following line (On sdmmc2 is my eMMC):
aliases{
mmc0 = &sdmmc2;
};
The U-Boot seems to partly have a problem with it.
- Commands like "mmc write" or "mmc info" use the MMC Interface 0 - they set "curr_device" to 0 by default (unless I use "mmc dev 1"). And this is not a problem.
- However, the MMC environment works with MMC interface 1, which leads to failures. What I find the most weird is the following function in the mmc.c file:
static int env_mmc_save(void)
{
ALLOC_CACHE_ALIGN_BUFFER(env_t, env_new, 1);
int dev = mmc_get_env_dev();
...
}
The variable dev in the line 4 is always 1, I guess since the eMMC is set as boot instance 1.
To sum up: The MMC functions work by default with mmc 0, the env MMC works by defalt with mmc 1.
PS: I could maybe use the MMC 1 and use the 'mmc dev 1' at the beginning, but the STMCubeProgrammer cannot flash the devce as it comes with an error:
Download in Progress:
[==================================================] 100%
File download complete
Time elapsed during download operation: 00:01:40.159
RUNNING Program ...
PartID: :0x03
Start operation done successfully at partition 0x03
GETPHASE command not acknowledged!
Reemission of GetPhase command
Error: GetPhase Error: mmc device 1 not found
Received PhaseID == 0xFF, system is going to reboot
Could someone help me on this?
Solved! Go to Solution.
- Labels:
-
OpenSTLinux
-
STM32MP15 Lines
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-01-19 6:40 AM
Hi @Community member ,
I noticed you also raised same question to OLS.
We are working on a clean solution.
In the meantime we suggest to modify U-boot as follow :
int mmc_get_env_dev(void)
{
return 0;
}
Hope it help
Olivier
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-01-19 6:40 AM
Hi @Community member ,
I noticed you also raised same question to OLS.
We are working on a clean solution.
In the meantime we suggest to modify U-boot as follow :
int mmc_get_env_dev(void)
{
return 0;
}
Hope it help
Olivier
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-01-19 6:58 AM
Hi Olivier,
that also works for me. Thanks!
Aleksandar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-01-26 7:41 AM
I'm running into the same problem, is there an option besides editing files? If not, how to edit the file above with the distribution package, by creating a patch file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-01-27 2:45 AM
Hi @allard
I consider more convenient to work in developer package during bring-up BSP setting phase.
But you can stick on Distribution and see this page for support :
Olivier
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
