From e9e4ada55fda436da0cde3bce057254f130a8550 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 9 Sep 2023 00:02:34 +0100 Subject: 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 --- script/build/boot/roms_helper | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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" -- cgit v1.2.1