rom.sh: simplify ccache handling for coreboot

we simply do not need to run the make-oldconfig command
at all, and after removing it, the "cook" function seemed
quite redundant so i merged it with mkvendorfiles()

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-05-25 04:40:30 +01:00
parent 8c3f10ba40
commit d2e148fdd9
+2 -9
View File
@@ -45,7 +45,8 @@ mkpayload_grub()
mkvendorfiles() mkvendorfiles()
{ {
[ -z "$mode" ] && $dry cook_coreboot_config [ -n "$mode" ] || [ ! -f "$srcdir/.config" ] || $dry printf \
"CONFIG_CCACHE=y\n" >> "$srcdir/.config" || err "$srcdir: !cook"; :
fx_ check_coreboot_util printf "cbfstool\nifdtool\n" fx_ check_coreboot_util printf "cbfstool\nifdtool\n"
printf "%s\n" "${version%%-*}" > "$srcdir/.coreboot-version" || \ printf "%s\n" "${version%%-*}" > "$srcdir/.coreboot-version" || \
err "!mk $srcdir .coreboot-version" err "!mk $srcdir .coreboot-version"
@@ -53,14 +54,6 @@ mkvendorfiles()
x_ ./mk download "$target"; : x_ ./mk download "$target"; :
} }
cook_coreboot_config()
{
[ -f "$srcdir/.config" ] || return 0
printf "CONFIG_CCACHE=y\n" >> "$srcdir/.config" || \
err "$srcdir/.config: Could not enable ccache"
make -C "$srcdir" oldconfig || err "Could not cook $srcdir/.config"; :
}
check_coreboot_util() check_coreboot_util()
{ {
[ "$badhash" = "y" ] && x_ rm -f "elf/$1/$tree/$1" [ "$badhash" = "y" ] && x_ rm -f "elf/$1/$tree/$1"