summaryrefslogtreecommitdiff
path: root/recipes/images/files/library/fwd_mmc.scr
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2015-11-03 01:23:54 +0100
committerStefan Agner <stefan.agner@toradex.com>2015-11-03 01:51:17 +0100
commit319c95b5aebe27e26e3c5d7b0eb8250ab1640155 (patch)
tree536a73be07c102bdb7879931a35b7f23c49ee633 /recipes/images/files/library/fwd_mmc.scr
parent15e1cbe6534accaeb7b8a604523b921f61b2c2f4 (diff)
update.sh: source update script only if loaded successfully
Source the update script only if loading succeeded. This avoids loops if board_name is not set. Also add a test if board_name is really set since this variable is/was not available in older U-Boots.
Diffstat (limited to 'recipes/images/files/library/fwd_mmc.scr')
-rw-r--r--recipes/images/files/library/fwd_mmc.scr4
1 files changed, 2 insertions, 2 deletions
diff --git a/recipes/images/files/library/fwd_mmc.scr b/recipes/images/files/library/fwd_mmc.scr
index 561a861..4731435 100644
--- a/recipes/images/files/library/fwd_mmc.scr
+++ b/recipes/images/files/library/fwd_mmc.scr
@@ -5,5 +5,5 @@ test -n ${drive} || setenv drive 1
test "${board_name}" = "colibri_t20" && setenv drive 0
test "${board_name}" = "colibri_vf" && setenv drive 0
-fatload ${interface} ${drive}:1 ${loadaddr} ${board_name}/flash_blk.img
-source ${loadaddr}
+test -n ${board_name} || echo "board_name env not set!" && exit
+fatload ${interface} ${drive}:1 ${loadaddr} ${board_name}/flash_blk.img && source ${loadaddr}