]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
am335x_evm: Add boot script support to am335x_evm
authorGuillaume GARDET <guillaume.gardet@free.fr>
Thu, 11 Sep 2014 07:23:08 +0000 (09:23 +0200)
committerTom Rini <trini@ti.com>
Thu, 18 Sep 2014 01:06:56 +0000 (21:06 -0400)
This patch adds boot script support to am335x_evm

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Cc: Tom Rini <trini@ti.com>
include/configs/am335x_evm.h

index df1a6fc52885fcbb5368f4e38a204119aa9c627e..aef0ad3fbe955fd09f1f4e92b2c4665bd73cd817 100644 (file)
                "nfsroot=${serverip}:${rootpath},${nfsopts} rw " \
                "ip=dhcp\0" \
        "bootenv=uEnv.txt\0" \
+       "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
+       "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
+               "source ${loadaddr}\0" \
        "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
        "importbootenv=echo Importing environment from mmc ...; " \
                "env import -t -r $loadaddr $filesize\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 mmcloados;" \
-                       "fi;" \
+                       "if run loadbootscript; then " \
+                               "run bootscript;" \
+                       "else " \
+                               "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 mmcloados;" \
+                               "fi;" \
+                       "fi ;" \
                "fi;\0" \
        "spiboot=echo Booting from spi ...; " \
                "run spiargs; " \