2021-01-11 08: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.
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.
2021-01-19 06: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
2021-01-19 06: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
2021-01-19 06:58 AM
Hi Olivier,
that also works for me. Thanks!
Aleksandar
2021-01-26 07: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?
2021-01-27 02: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