mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +02:00
set grub.cfg timeout to 5s (10 on some boards)
target.cfg can now specify e.g. grub_timeout=20 this would then be inserted as timeout.cfg in cbfs, containing the instruction: set timeout=20 HP laptops need a bit of extra time, due to the delay caused by the EC bug workaround deployed in GRUB desktops in general need extra time. this too is set to 10s, like the HP laptops. only insert timeout.cfg if actually needed (declared in target.cfg), otherwise grub.cfg will default to 5s Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -41,6 +41,7 @@ displaymodes=""
|
||||
payloads=""
|
||||
keyboard_layouts=""
|
||||
|
||||
grub_timeout=""
|
||||
grub_scan_disk="undefined"
|
||||
tree="undefined"
|
||||
arch="undefined"
|
||||
@@ -370,13 +371,18 @@ build_grub_roms() {
|
||||
|
||||
fi
|
||||
|
||||
tmpscancfg=$(mktemp -t coreboot_rom.XXXXXXXXXX) ||
|
||||
tmpcfg=$(mktemp -t coreboot_rom.XXXXXXXXXX) ||
|
||||
err "mkGrubRom: cannot create temporary scan.cfg"
|
||||
printf "set grub_scan_disk=\"%s\"\n" "${grub_scan_disk}" > \
|
||||
"${tmpscancfg}" || \
|
||||
"${tmpcfg}" || \
|
||||
err "mkGrubRom: cannot insert into temporary scan.cfg"
|
||||
"${cbfstool}" "${tmprompath}" add -f "${tmpscancfg}" -n scan.cfg \
|
||||
"${cbfstool}" "${tmprompath}" add -f "${tmpcfg}" -n scan.cfg \
|
||||
-t raw || err "mkGrubROM: cannot insert scan.cfg into CBFS"
|
||||
printf "set timeout=%s\n" "${grub_timeout}" > "${tmpcfg}" || \
|
||||
err "mkGrubRom: cannot insert into temporary timeout.cfg"
|
||||
[ -z "${grub_timeout}" ] || \
|
||||
"${cbfstool}" "${tmprompath}" add -f "${tmpcfg}" -n timeout.cfg \
|
||||
-t raw || err "mkGrubROM: cannot insert timeout.cfg into CBFS"
|
||||
|
||||
keymaps=""
|
||||
if [ -z ${keyboard_layouts} ]; then
|
||||
|
||||
Reference in New Issue
Block a user