-#define CONFIG_ENV_SIZE (16 * 1024)
-#define CONFIG_ENV_OFFSET (1024 * SZ_1K)
-#define CONFIG_ENV_SECT_SIZE (64 * SZ_1K)
-#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
-#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
-#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
-#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
-#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
-#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \
- CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
-
-#ifdef CONFIG_ENV_IS_IN_NAND
-#define CONFIG_ENV_OFFSET (0x1E0000)
-#define CONFIG_ENV_SECT_SIZE (128 * SZ_1K)
-#endif
-
+#define ENV_MMC \
+ "mmcdev=0\0" \
+ "mmcpart=2\0" \
+ "fitpart=1\0" \
+ "mmcrootfstype=ext4\0" \
+ "fitname=fitImage\0" \
+ "mmcloadfit=load mmc ${mmcdev}:${fitpart} ${loadaddr} ${fitname}\0" \
+ "mmcargs=setenv bootargs root=/dev/mmcblk${mmcdev}p${mmcpart} " \
+ "rootfstype=${mmcrootfstype} ${optargs}\0" \
+ "mmcboot=run mmcloadfit;run mmcargs;bootm ${loadaddr}\0"
+
+#define ENV_NAND \
+ "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
+ "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
+ "nandroot=ubi0:root ubi.mtd=rootfs\0" \
+ "nandrootfstype=ubifs\0" \
+ "nandargs=setenv bootargs root=${nandroot} " \
+ "rootfstype=${nandrootfstype} ${mtdparts} ${optargs}\0" \
+ "nandloadfit=ubi part rootfs;ubi readvol ${loadaddr} fit\0" \
+ "nandboot=run nandloadfit;run nandargs;bootm ${loadaddr}\0"
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "bootm_size=0x30000000\0" \
+ "optargs=rw rootwait\0" \
+ ENV_MMC \
+ ENV_NAND