cb/kabylake: don't hardcode power_on_after_fail

I realised that the Dell OptiPlex 3050 Micro has NVRAM available.
Use that backend, and hardcode power_on_after_fail to Disable,
which is already done in cmos.default.

The Lenovo ThinkPad T480 currently has no option table in coreboot,
besides the CBFS one. For this, the CBFS option table has been
enabled, and the build system has been modified to insert
a relevant config for power_on_after_fail.

Nicholas Chin informs me that Kabylake generally has legacy NVRAM,
so enabling it for the T480/T480s should work, but we'll need
to use it in the future anyway; better to just use CBFS now.

I *could* use the CBFS backend on 3050micro as well.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-10-06 02:28:24 +01:00
parent b5ad829ffe
commit c716341c13
49 changed files with 187 additions and 241 deletions

View File

@@ -175,6 +175,9 @@ mkcorebootbin_real()
initmode="${initmode%%_*}"
cbfstool="elf/coreboot/$tree/cbfstool"
# cbfstool option backends, if they exist
cbfscfg="config/coreboot/$target/cbfs.cfg"
elfrom="elf/coreboot/$tree/$target/$initmode"
if [ -n "$displaymode" ]; then
elfrom="${elfrom}_$displaymode"
@@ -232,6 +235,10 @@ mkcorebootbin_real()
payload_grubsea="n"
fi
if [ -f "$cbfscfg" ]; then
dx_ add_cbfs_option "$cbfscfg"
fi
if $if_not_dry_build grep "CONFIG_PAYLOAD_NONE=y" "$defconfig"; then
if [ "$payload_seabios" = "y" ]; then
pname="seabios"
@@ -250,6 +257,25 @@ mkcorebootbin_real()
fi; :
}
# options for cbfs backend (as opposed to nvram/smmstore):
add_cbfs_option()
{
# TODO: input sanitization (currently mitigated by careful config)
op_name="`printf "%s\n" "$1" | awk '{print $1}'`"
op_arg="`printf "%s\n" "$1" | awk '{print $2}'`"
if [ -z "$op_name" ] || [ -z "$op_arg" ]; then
return 0
fi
( x_ "$cbfstool" "$tmprom" remove -n "option/$op_name" 1>/dev/null \
2>/dev/null ) || :
x_ "$cbfstool" "$tmprom" add-int -i "$op_arg" -n "option/$op_name"
}
# in our design, SeaBIOS is also responsible for starting either
# a GRUB or U-Boot payload. this is because SeaBIOS is generally
# a more reliable codebase, so it's less likely to cause a brick