Index: u-boot-2012.04.01/include/configs/origen.h =================================================================== --- u-boot-2012.04.01.orig/include/configs/origen.h +++ u-boot-2012.04.01/include/configs/origen.h @@ -87,6 +87,7 @@ #define CONFIG_CMD_DHCP #define CONFIG_CMD_MMC #define CONFIG_CMD_FAT +#define CONFIG_CMD_EXT2 /* EXT2 Support */ #undef CONFIG_CMD_NET #undef CONFIG_CMD_NFS @@ -96,7 +97,35 @@ #define CONFIG_SPL #define COPY_BL2_FNPTR_ADDR 0x02020030 -#define CONFIG_BOOTCOMMAND "fatload mmc 0 40007000 uImage; bootm 40007000" +#define CONFIG_EXTRA_ENV_SETTINGS \ + "loadaddr=0x40007000\0" \ + "rdaddr=0x4f000000\0" \ + "kerneladdr=0x40007000\0" \ + "ramdiskaddr=0x4f000000\0" \ + "console=ttySAC2,115200n8\0" \ + "mmcdev=0\0" \ + "bootenv=uEnv.txt\0" \ + "loadbootenv=ext2load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ + "importbootenv=echo Importing environment from mmc ...; " \ + "env import -t $loadaddr $filesize\0" \ + "loadbootscript=ext2load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ + "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ + "source ${loadaddr}\0" +#define CONFIG_BOOTCOMMAND \ + "if mmc rescan ${mmcdev}; then " \ + "echo SD/MMC found on device ${mmcdev};" \ + "if run loadbootenv; then " \ + "echo Loaded environment from ${bootenv};" \ + "run importbootenv;" \ + "fi;" \ + "if test -n $uenvcmd; then " \ + "echo Running uenvcmd ...;" \ + "run uenvcmd;" \ + "fi;" \ + "if run loadbootscript; then " \ + "run bootscript; " \ + "fi; " \ + "fi;" /* Miscellaneous configurable options */ #define CONFIG_SYS_LONGHELP /* undef to save memory */