summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-16 01:08:08 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-16 01:08:40 +0100
commit0e9b36c581e4471f6148023fdc5537b833a51a6c (patch)
treeb0b50912bd677c3037af8d141f097e795f917e91
parent3a7b3660f9dd536512dc428c50dd9ed4fd2007ef (diff)
roms: simplify timeout/scandisk insertion
we don't need to call mktemp everytime. just use a staticly named file in tmpdir and keep overwriting it. these files are only small, and they get deleted when the build system exits later on. Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-xscript/roms3
1 files changed, 1 insertions, 2 deletions
diff --git a/script/roms b/script/roms
index 4a7492f4..fe666754 100755
--- a/script/roms
+++ b/script/roms
@@ -250,14 +250,13 @@ build_grub_roms()
# we only need insert grub.elf once, for each coreboot config:
cbfs "$tmprom" "$grubelf" "$grub_cbfs"
- tmpcfg="$(mktemp -t coreboot_rom.XXXXXXXXXX)"
+ tmpcfg="$tmpdir/tmpcfg"
printf "set grub_scan_disk=\"%s\"\n" "$grub_scan_disk" > "$tmpcfg" || \
$err "set grub_scan_disk, $grub_scan_disk, $tmpcfg"
cbfs "$tmprom" "$tmpcfg" scan.cfg raw
printf "set timeout=%s\n" "$grub_timeout" > "$tmpcfg" || \
$err "set timeout, $grub_timeout, $tmpcfg"
[ -z "$grub_timeout" ] || cbfs "$tmprom" "$tmpcfg" timeout.cfg raw
- x_ rm -f "$tmpcfg"
newrom="$romdir/${payload1}_${board}_${initmode}_$displaymode.rom"
[ "$initmode" = "normal" ] && newrom="$romdir/${payload1}_" \