diff mbox

[U-Boot,2/4] arm: m53evk: Test if bootscript exists before loading it

Message ID 1411471101-6219-2-git-send-email-marex@denx.de
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show

Commit Message

Marek Vasut Sept. 23, 2014, 11:18 a.m. UTC
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 | 2 ++
 1 file changed, 2 insertions(+)

Comments

Stefano Babic Sept. 29, 2014, 9:37 a.m. UTC | #1
On 23/09/2014 13:18, Marek Vasut wrote:
> 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>
> ---

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic
diff mbox

Patch

diff --git a/include/configs/m53evk.h b/include/configs/m53evk.h
index df6a226..ad9c39c 100644
--- a/include/configs/m53evk.h
+++ b/include/configs/m53evk.h
@@ -348,10 +348,12 @@ 
 		"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__ */