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>
This commit is contained in:
Alper Nebi Yasak 2022-08-25 20:32:40 +03:00 committed by Denis 'GNUtoo' Carikli
parent 4cdb46569d
commit 7b85332fe3
Signed by: GNUtoo
GPG Key ID: 5F5DFCC14177E263
1 changed files with 15 additions and 0 deletions

View File

@ -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()