]> git.sur5r.net Git - u-boot/commitdiff
ARM: AM43xx: Add extra ENV settings
authorLokesh Vutla <lokeshvutla@ti.com>
Tue, 10 Dec 2013 09:32:14 +0000 (15:02 +0530)
committerTom Rini <trini@ti.com>
Thu, 19 Dec 2013 02:14:00 +0000 (21:14 -0500)
Add Extra env settings.
This is derived from am335x Extra ENV settings.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
include/configs/am43xx_evm.h

index 833e5fa6f3ee765a673a5e1edd078199fb43f91e..0f340780cdc93d7755d8d88da558eb6e58df8ebf 100644 (file)
 #define CONFIG_OMAP_USB_PHY
 #define CONFIG_AM437X_USB2PHY2_HOST
 
+#ifndef CONFIG_SPL_BUILD
+#define CONFIG_EXTRA_ENV_SETTINGS \
+       "loadaddr=0x80200000\0" \
+       "fdtaddr=0x80F80000\0" \
+       "fdt_high=0xffffffff\0" \
+       "rdaddr=0x81000000\0" \
+       "fdtfile=undefined\0" \
+       "bootpart=0:2\0" \
+       "bootdir=/boot\0" \
+       "bootfile=zImage\0" \
+       "console=ttyO0,115200n8\0" \
+       "optargs=\0" \
+       "mmcdev=0\0" \
+       "mmcroot=/dev/mmcblk0p2 rw\0" \
+       "mmcrootfstype=ext4 rootwait\0" \
+       "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \
+       "ramrootfstype=ext2\0" \
+       "mmcargs=setenv bootargs console=${console} " \
+               "${optargs} " \
+               "root=${mmcroot} " \
+               "rootfstype=${mmcrootfstype}\0" \
+       "bootenv=uEnv.txt\0" \
+       "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
+       "importbootenv=echo Importing environment from mmc ...; " \
+               "env import -t $loadaddr $filesize\0" \
+       "ramargs=setenv bootargs console=${console} " \
+               "${optargs} " \
+               "root=${ramroot} " \
+               "rootfstype=${ramrootfstype}\0" \
+       "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
+       "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
+       "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
+       "mmcboot=mmc dev ${mmcdev}; " \
+               "if mmc rescan; 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 loadimage; then " \
+                               "run loadfdt; " \
+                               "echo Booting from mmc${mmcdev} ...; " \
+                               "run mmcargs; " \
+                               "bootz ${loadaddr} - ${fdtaddr}; " \
+                       "fi;" \
+               "fi;\0" \
+       "findfdt="\
+               "if test $board_name = AM43EPOS; then " \
+                       "setenv fdtfile am43x-epos-evm.dtb; fi; " \
+               "if test $board_name = AM43__GP; then " \
+                       "setenv fdtfile am437x-gp-evm.dtb; fi; " \
+               "if test $fdtfile = undefined; then " \
+                       "echo WARNING: Could not determine device tree; fi; \0"
+
+#define CONFIG_BOOTCOMMAND \
+       "run findfdt; " \
+       "run mmcboot;"
+
+#endif
 #endif /* __CONFIG_AM43XX_EVM_H */