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