]> git.sur5r.net Git - u-boot/commitdiff
arm: m53evk: Test if bootscript exists before loading it
authorMarek Vasut <marex@denx.de>
Tue, 23 Sep 2014 11:18:19 +0000 (13:18 +0200)
committerStefano Babic <sbabic@denx.de>
Mon, 29 Sep 2014 09:36:55 +0000 (11:36 +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/m53evk.h

index df6a2261099a6334a75dd79d3d13a0dad0b49557..ad9c39c16cabbfb508a2a7ded6c3c91f4dc2a0c4 100644 (file)
                "bootm ${kernel_addr_r}\0"                              \
        "try_bootscript="                                               \
                "mmc rescan;"                                           \
+               "if test -e mmc 0:1 ${bootscript} ; then "              \
                "if ext4load mmc 0:1 ${kernel_addr_r} ${bootscript};"   \
                "then;"                                                 \
                        "\techo Running bootscript...;"                 \
                        "\tsource ${kernel_addr_r};"                    \
+               "fi ; "                                                 \
                "fi\0"
 
 #endif /* __M53EVK_CONFIG_H__ */