summaryrefslogtreecommitdiff
path: root/script/roms
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-24 18:30:48 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-24 18:30:48 +0100
commitc661eca6b9e84c7ba036434e84461dd05727e832 (patch)
treef85631b493af2acd4407d70ea373fdf20cb69315 /script/roms
parent8af9f904c4c6d5a8e968e89d370919bbbf48a7ea (diff)
roms: optimise u-boot elf check
because we use crossgcc here, blindly running trees -f means needlessly re-running buildgcc, which then checks for gcc binaries, even though we already know that the u-boot binary exists. skip this check if u-boot exists. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/roms')
-rwxr-xr-xscript/roms7
1 files changed, 3 insertions, 4 deletions
diff --git a/script/roms b/script/roms
index 48c1f52b..06f58724 100755
--- a/script/roms
+++ b/script/roms
@@ -139,10 +139,9 @@ add_payloads()
[ "$payload_uboot" = "y" ] || return 0
# add u-boot payload
- x_ ./update trees -b u-boot $board
- ubdir="elf/u-boot/$board/$uboot_config"
- ubootelf="$ubdir/u-boot.elf" && [ ! -f "$ubootelf" ] && \
- ubootelf="$ubdir/u-boot"
+ ubdir="elf/u-boot/$board/$uboot_config"; ubootelf="$ubdir/u-boot.elf" \
+ && [ ! -f "$ubootelf" ] && ubootelf="$ubdir/u-boot"
+ [ -f "$ubootelf" ] || x_ ./update trees -b u-boot $board
[ -f "$ubootelf" ] || $err "$board: Can't find u-boot"
cbfs "$tmprom" "$ubootelf" "fallback/payload"