imx8mp mmc_get_env_dev() issue

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

imx8mp mmc_get_env_dev() issue

7,744 次查看
RickStievenart
Contributor V

Hello,

 

 I am having an issue I hope you can help me with. As you know we are developing a custom imx8mp board based on the evk, BSP 6.1 langdale. Our board has an on-board eMMC and two SD card slots. We are wanting to use Linux fw_setenv command to set u-boot environment variables. We have placed the u-boot env in the EMMC boot1 partition. From Linux this works fine - I can see it there if I do an od-x /dev/mmcblk2boot1 | more. If we place this image on the eMMC everything works fine, however if we place it on and SD card and set the boot mode to boot from it on SD2 the mmc_get_env_dev returns 1, I think it should return 2. Because it tries to load the env from dev 1 and we get "MMC partition switch failed". I added a lot of debug printf's but do not see where mmc_get_env_dev is getting the "1" from. As you can see from the code snippet attached I even try to set it to 2 in my board_init function but it does not change.  I have attached the console log, the board_init snippet and my defconfig, my uboot-config.cfg and my fw_env.config files.

I can send you the console log of it booting from eMMC if you need it.

Thanks for your help!

Rick

标记 (1)
0 项奖励
回复
3 回复数

7,714 次查看
RickStievenart
Contributor V

Also, I had the partition incorrectly set to 1, I have it set to 2 now which corresponds to boot1.

 

Rick

0 项奖励
回复

7,716 次查看
RickStievenart
Contributor V

Here is the boot log when I boot from eMMC.

 

Rick

0 项奖励
回复

7,630 次查看
jimmychan
NXP TechSupport
NXP TechSupport

Seems on your board, SD1 is mmc0, SD2 is mmc1 and eMMC is mmc2. If you want the return "dev" value of SD2 is 2, you may need to modify the mmc_get_env_dev() source code in u-boot.

0 项奖励
回复