]> git.sur5r.net Git - u-boot/commitdiff
arm: m28evk: Test if bootscript exists before loading it
authorMarek Vasut <marex@denx.de>
Tue, 23 Sep 2014 11:18:18 +0000 (13:18 +0200)
committerStefano Babic <sbabic@denx.de>
Mon, 29 Sep 2014 09:35:54 +0000 (11:35 +0200)
Make sure the boot.scr exists on the card before loading it
from the card to avoid annoying message on the console.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
include/configs/m28evk.h

index fccd29dc26ce8fba8d81dc410168be090a1d6e48..2d9ad5f23c9c62a41db42d26f063490a7cb3e3d4 100644 (file)
                "bootm ${kernel_addr_r}\0"                              \
        "try_bootscript="                                               \
                "mmc rescan;"                                           \
+               "if test -e mmc 0:2 ${bootscript} ; then "              \
                "if ext4load mmc 0:2 ${kernel_addr_r} ${bootscript};"   \
                "then;"                                                 \
                        "\techo Running bootscript...;"                 \
                        "\tsource ${kernel_addr_r};"                    \
+               "fi ; "                                                 \
                "fi\0"
 
 /* The rest of the configuration is shared */