Dear NXP,
By default u-boot environment stored in EMMC offset - 0x400000.
I implement the new EMMC partition and switch u-boot environment variable to that partition,
include/configs/imx8mn_evk.h
#define CONFIG_SYS_MMC_ENV_PART 12
Created the partition,
+#part 12
+part /env --source bootimg-partition --ondisk mmcblk --fstype=vfat --label env --align 8192 --size 64
But, while booting I got following error -
Loading Environment from MMC... VINOTH ++++++++++++++++++++++++++++ mmc_set_env_part env partition is 12
VINOTH ++++++++++= blk_select_hwpart_devnum ++++++++++++++++ hwpart: 12 +++ ret: 0
VINOTH ++++++++++= mmc_switch_part ++++++++++++++++ part_num: 12 +++
VINOTH ++++++++++= mmc_select_hwpart 3 ++++++++++++++++ hwpart: 12 +++ ret: -5
MMC partition switch failed
This may help you. You may find some hints from the discussion of below link.
https://lists.denx.de/pipermail/u-boot/2013-June/155723.html
For the new version of u-boot, the mmc.c is in the env folder.
https://source.codeaurora.org/external/imx/uboot-imx/tree/env/mmc.c?h=imx_v2019.04_5.4.3_2.0.0