configs: omap5: Enable custom mmc boot to distroboot for AM57x
TI AM57x boards use a custom (though family common to TI boards) mechanism
for booting Linux. Add support to enable custom MMC boot as a default
option along with the distroboot approach.
Also, add supporting mmc boot environment variables which shall be used for
custom MMC boot
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Signed-off-by: Anurag Dutta <a-dutta@ti.com>
diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h
index d315a52..ef97711 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -240,16 +240,31 @@
"echo WARNING: Could not determine device tree to use; fi; \0"
#define BOOT_TARGET_DEVICES(func) \
+ func(TI_MMC, ti_mmc, na) \
func(MMC, mmc, 0) \
func(MMC, mmc, 1) \
func(PXE, pxe, na) \
func(DHCP, dhcp, na)
+#define BOOTENV_DEV_TI_MMC(devtypeu, devtypel, instance) \
+ "bootcmd_ti_mmc= run get_name_kern; run mmcboot\0"
+
+#define BOOTENV_DEV_NAME_TI_MMC(devtyeu, devtypel, instance) \
+ "ti_mmc "
+
#include <config_distro_bootcmd.h>
#define CFG_EXTRA_ENV_SETTINGS \
DEFAULT_LINUX_BOOT_ENV \
DEFAULT_MMC_TI_ARGS \
+ "bootpart=0:2\0" \
+ "bootdir=/boot\0" \
+ "get_name_kern=" \
+ "if test $boot_fit -eq 1; then " \
+ "setenv bootfile fitImage; " \
+ "else " \
+ "setenv bootfile zImage; " \
+ "fi\0" \
DEFAULT_FIT_TI_ARGS \
"get_fit_config=setenv name_fit_config ${fdtfile}\0" \
DEFAULT_COMMON_BOOT_TI_ARGS \