roms: further clean up build_grub_roms()

the tmpcfg variable will be useful elsewhere, for
the same kind of change as before.

Signed-off-by: Leah Rowe <leah@libreboot.org>
audit6-merge1
Leah Rowe 2024-06-16 01:11:46 +01:00
parent 0e9b36c581
commit 6dc0515583
1 changed files with 3 additions and 3 deletions

View File

@ -15,6 +15,7 @@ cfgsdir="config/coreboot"
picosrc="src/pico-serprog" picosrc="src/pico-serprog"
picosdk="src/pico-sdk" picosdk="src/pico-sdk"
stm32src="src/stm32-vserprog" stm32src="src/stm32-vserprog"
tmpcfg="$tmpdir/tmpcfg"
# Disable all payloads by default. # Disable all payloads by default.
# target.cfg files have to specifically enable [a] payload(s) # target.cfg files have to specifically enable [a] payload(s)
@ -250,12 +251,11 @@ build_grub_roms()
# we only need insert grub.elf once, for each coreboot config: # we only need insert grub.elf once, for each coreboot config:
cbfs "$tmprom" "$grubelf" "$grub_cbfs" cbfs "$tmprom" "$grubelf" "$grub_cbfs"
tmpcfg="$tmpdir/tmpcfg"
printf "set grub_scan_disk=\"%s\"\n" "$grub_scan_disk" > "$tmpcfg" || \ printf "set grub_scan_disk=\"%s\"\n" "$grub_scan_disk" > "$tmpcfg" || \
$err "set grub_scan_disk, $grub_scan_disk, $tmpcfg" $err "set grub_scan_disk, $grub_scan_disk, $tmpcfg"
cbfs "$tmprom" "$tmpcfg" scan.cfg raw cbfs "$tmprom" "$tmpcfg" scan.cfg raw
printf "set timeout=%s\n" "$grub_timeout" > "$tmpcfg" || \
$err "set timeout, $grub_timeout, $tmpcfg" printf "set timeout=%s\n" "$grub_timeout" > "$tmpcfg" || $err "!time"
[ -z "$grub_timeout" ] || cbfs "$tmprom" "$tmpcfg" timeout.cfg raw [ -z "$grub_timeout" ] || cbfs "$tmprom" "$tmpcfg" timeout.cfg raw
newrom="$romdir/${payload1}_${board}_${initmode}_$displaymode.rom" newrom="$romdir/${payload1}_${board}_${initmode}_$displaymode.rom"