summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlper Nebi Yasak <alpernebiyasak@gmail.com>2022-08-25 20:32:40 +0300
committerAlper Nebi Yasak <alpernebiyasak@gmail.com>2022-08-27 17:35:55 +0300
commit820b8e706eb42b8f7138c16bc17cf6b6eba26a09 (patch)
treed660cfec5fb6f84de5db36747105f49ff6c473b0
parenteae6b35dabdeba336aaa3ecc3fdc22a23b16d98a (diff)
download/u-boot: Support running extra commands from board dirs
Although it's unlikely, boards might want to run extra commands after the board-specific U-Boot directories are prepared. Copy the existing mechanism for that from the coreboot download script to the U-Boot one. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
-rwxr-xr-xresources/scripts/download/u-boot15
1 files changed, 15 insertions, 0 deletions
diff --git a/resources/scripts/download/u-boot b/resources/scripts/download/u-boot
index 212a5a21..025ff66e 100755
--- a/resources/scripts/download/u-boot
+++ b/resources/scripts/download/u-boot
@@ -183,6 +183,21 @@ downloadfor() {
return 1
fi
done
+
+ # extra.sh could be used to patch submodules, if you wanted to
+ # It's impossible to predict what submodules will be available, and
+ # it's rare that you'd want to patch them, so this is handled by
+ # extra.sh on a per-board basis
+ # In fact, extra.sh can be used for anything you want.
+ if [ -f "resources/u-boot/${board}/extra.sh" ]; then
+ "resources/u-boot/${board}/extra.sh" || touch build_error
+ if [ -f build_error ]; then
+ return 1
+ fi
+ return 0
+ else
+ return 0
+ fi
}
strip_comments()