cache cbfstool and ifdtool builds

coreboot's build system regularly purges these, when
executed, and parts of gnuboot expect the builds to
be there, where it currently uses them directly from
the coreboot build system.

this patch copies them to a dedicated directory within
the gnuboot build system, instead of coreboot's, and
that version is called.

this causes the roms build script to be more robust in
general, preventing build errors under certain edge cases.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe 2024-01-13 12:28:32 +00:00 committed by Leah Rowe
parent b566142205
commit 78654c86e9
4 changed files with 8 additions and 5 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@
/bin/
/bucts/
/build_error
/cbutils/
/coreboot/
/crossgcc/
*.date

View File

@ -28,6 +28,8 @@ set -u -e
printf "Cleaning the previous build of coreboot and its utilities\n"
[ ! -d "cbutils" ] || rm -Rf "cbutils" || exit 1
[ ! -d "coreboot/" ] && exit 0
for board in coreboot/*; do

View File

@ -35,10 +35,10 @@ buildutils() {
return 1
fi
for util in {cbfs,ifd}tool; do
(
cd "coreboot/${cbtree}/util/${util}/"
make -j$(nproc) || return 1
)
[ -f "cbutils/$cbtree/$util" ] && continue
make -C coreboot/${cbtree}/util/${util}/ || return 1
mkdir -p cbutils/$cbtree || return 1
cp coreboot/${cbtree}/util/${util}/${util} cbutils/$cbtree || return 1
done
return 0
}

View File

@ -137,7 +137,7 @@ cbdir="coreboot/${board}"
if [ "${board}" != "${cbtree}" ]; then
cbdir="coreboot/${cbtree}"
fi
cbfstool="${cbdir}/util/cbfstool/cbfstool"
cbfstool="cbutils/$cbtree/cbfstool"
corebootrom="${cbdir}/build/coreboot.rom"
seavgabiosrom="payload/seabios/seavgabios.bin"