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>
This commit is contained in:
Leah Rowe
2024-06-24 18:30:48 +01:00
parent 8af9f904c4
commit c661eca6b9
+3 -4
View File
@@ -139,10 +139,9 @@ add_payloads()
[ "$payload_uboot" = "y" ] || return 0 [ "$payload_uboot" = "y" ] || return 0
# add u-boot payload # add u-boot payload
x_ ./update trees -b u-boot $board ubdir="elf/u-boot/$board/$uboot_config"; ubootelf="$ubdir/u-boot.elf" \
ubdir="elf/u-boot/$board/$uboot_config" && [ ! -f "$ubootelf" ] && ubootelf="$ubdir/u-boot"
ubootelf="$ubdir/u-boot.elf" && [ ! -f "$ubootelf" ] && \ [ -f "$ubootelf" ] || x_ ./update trees -b u-boot $board
ubootelf="$ubdir/u-boot"
[ -f "$ubootelf" ] || $err "$board: Can't find u-boot" [ -f "$ubootelf" ] || $err "$board: Can't find u-boot"
cbfs "$tmprom" "$ubootelf" "fallback/payload" cbfs "$tmprom" "$ubootelf" "fallback/payload"