build/roms: Rebuild cbutils module before starting coreboot build

In recent coreboot versions, running distclean started to erase the
cbfstool binary we built earlier in the util/cbfstool dir via the
cbutils build script call. The coreboot build puts it in a different
directory, and the roms build script can't find it when trying to add
payloads to the roms. This doesn't make the script fail (because set -e
is stupid like that), and the build appears to succeed if you don't look
close enough to see the "cbfsutil not found" error.

Build the coreboot utils we want at the places we want them after
calling distclean, so that we can actually use cbfsutil and avoid
silently-broken roms with newer coreboot versions.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
This commit is contained in:
Alper Nebi Yasak 2022-08-27 21:25:43 +03:00 committed by Denis 'GNUtoo' Carikli
parent bf07722d8e
commit 81ad84d72c
Signed by: GNUtoo
GPG Key ID: 5F5DFCC14177E263
1 changed files with 1 additions and 0 deletions

View File

@ -269,6 +269,7 @@ mkCoreboot() {
make distclean
)
cp "${cbcfgpath}" "${cbdir}"/.config
./build module cbutils ${cbdir#coreboot/}
(
cd "${cbdir}"
make -j$(nproc)