Until now we were required to configure the environment FAT partition and device at compile time, which led to problems if boards have both SD cards and eMMC and we wanted to use the same image for booting from both.
Check the boot source and use this device for finding the environment. Signed-off-by: Andre Przywara <andre.przyw...@arm.com> --- board/sunxi/board.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 973dba4578..5802b079b6 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -227,6 +227,15 @@ int mmc_get_env_dev(void) return 1; } +static char fat_device[7]; + +char *fat_get_env_dev_part(void) +{ + sprintf(fat_device, "%d:auto", mmc_get_env_dev()); + + return fat_device; +} + #ifdef CONFIG_DM_MMC static void mmc_pinmux_setup(int sdc); #endif -- 2.14.5 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot