rom.sh: Don't run mkhelpers if release=n

This fixes the following error on ./mk release:

cp: cannot stat 'elf/coreboot/default/d510mo/libgfxinit_txtmode/coreboot.rom': No such file or directory

I recently re-wrote the handling of coreboot images, and
I overlooked this entirely. When a given target specifies
release=n, it has to be skipped, so builds are not done.

The "release" variable is already checked, in mkcoreboottar.

Let's also put it in the other mkhelper functions, to make sure
there are no errors.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-08-01 05:27:33 +01:00
parent 84a1ff85b0
commit a499d5bba2
+5
View File
@@ -45,6 +45,8 @@ mkpayload_grub()
corebootpremake()
{
[ "$XBMK_RELEASE" = "y" ] && [ "$release" = "n" ] && return 0; :
[ -n "$mode" ] || [ ! -f "$srcdir/.config" ] || $dry printf \
"CONFIG_CCACHE=y\n" >> "$srcdir/.config" || err "$srcdir: !cook"; :
fx_ check_coreboot_util printf "cbfstool\nifdtool\n"
@@ -76,11 +78,14 @@ check_coreboot_util()
coreboot_pad_one_byte()
{
[ "$XBMK_RELEASE" = "y" ] && [ "$release" = "n" ] && return 0; :
$dry pad_one_byte "$srcdir/build/coreboot.rom"
}
mkcorebootbin()
{
[ "$XBMK_RELEASE" = "y" ] && [ "$release" = "n" ] && return 0; :
$dry fx_ check_coreboot_util printf "cbfstool\nifdtool\n"
for y in "$target_dir/config"/*; do