#include <asm/arch/crm_regs.h>
#include <asm/setup.h>
#include <asm/bootm.h>
+#include <mmc.h>
DECLARE_GLOBAL_DATA_PTR;
return 0;
}
+
+uint board_mmc_get_env_part(struct mmc *mmc)
+{
+ uint part = EXT_CSD_EXTRACT_BOOT_PART(mmc->part_config);
+
+ if (part == 7)
+ part = 0;
+ return part;
+}
CONFIG_CMD_UNZIP=y
CONFIG_CMD_DFU=y
CONFIG_CMD_GPIO=y
+CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
CONFIG_CMD_PART=y
CONFIG_CMD_DHCP=y
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_BOUNCE_BUFFER=y
CONFIG_BOOTCOUNT_LIMIT=y
"mmcpart=1\0" \
"mmcpart_committed=1\0" \
"mmcargs=setenv bootargs console=${console},${baudrate} " \
- "root=/dev/mmcblk0p${mmcpart_committed} rootwait rw " \
- __stringify(EXTRA_BOOTPARAMS) "\0" \
+ "root=/dev/mmcblk${mmcdev}p${gpt_partition_entry} rootwait rw " \
+ __stringify(EXTRA_BOOTPARAMS) " SM_ROOT_DEV=${mmcdev} SM_ROOT_PART=${gpt_partition_entry} SM_BOOT_PART=${boot_part}\0" \
"commit_mmc=if test \"${ustate}\" = 1 -a \"${mmcpart}\" != \"${mmcpart_committed}\"; then " \
"setenv mmcpart_committed ${mmcpart};" \
"saveenv;" \
"fi;\0" \
"bootlimit=3\0" \
- "loadimage=load mmc ${mmcdev}:${mmcpart_committed} ${loadaddr} boot/${image}\0" \
- "loadfdt=load mmc ${mmcdev}:${mmcpart_committed} ${fdt_addr} boot/${fdtfile}\0" \
+ "loadimage=load mmc ${mmcdev}#rootfs-${mmcpart_committed} ${loadaddr} boot/${image}\0" \
+ "loadfdt=load mmc ${mmcdev}#rootfs-${mmcpart_committed} ${fdt_addr} boot/${fdtfile}\0" \
+ "loadpart=gpt setenv mmc ${mmcdev} rootfs-${mmcpart_committed}\0" \
+ "loadbootpart=mmc partconf 1 boot_part\0" \
"mmcboot=echo Booting from mmc ...; " \
"run commit_mmc; " \
+ "run loadpart; " \
+ "run loadbootpart; " \
"run mmcargs; " \
"if run loadfdt; then " \
"if bootz ${loadaddr} - ${fdt_addr}; then " \