From 0e9b36c581e4471f6148023fdc5537b833a51a6c Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 16 Jun 2024 01:08:08 +0100 Subject: 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 --- script/roms | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'script') 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}_" \ -- cgit v1.2.1