summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-09-09 00:02:34 +0100
committerLeah Rowe <leah@libreboot.org>2023-09-09 00:10:23 +0100
commite9e4ada55fda436da0cde3bce057254f130a8550 (patch)
treebdf76546c75b6da15e1aaabc758783c0dd16e8c7
parent0e3f3efcaac4a202ab8e7027263c94d48236f0e4 (diff)
build/boot/rom: only insert scan.cfg if needed
where it is set to "both" (grub_scan_disk), inserting scan.cfg is superfluous, because grub.cfg defaults to both anyway, unless otherwise specified by scan.cfg, and only if that file exists within cbfs. thus, save a bit of build time (only a slight saving) Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-xscript/build/boot/roms_helper3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/build/boot/roms_helper b/script/build/boot/roms_helper
index bd25e3ed..fb25bba4 100755
--- a/script/build/boot/roms_helper
+++ b/script/build/boot/roms_helper
@@ -376,7 +376,8 @@ build_grub_roms() {
printf "set grub_scan_disk=\"%s\"\n" "${grub_scan_disk}" > \
"${tmpcfg}" || \
err "mkGrubRom: cannot insert into temporary scan.cfg"
- "${cbfstool}" "${tmprompath}" add -f "${tmpcfg}" -n scan.cfg \
+ [ "${grub_scan_disk}" = "both" ] || \
+ "${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"