From 4b64e34fc2d3ebfe22d350f0b04023fe60e0df3e Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Tue, 30 Nov 2021 18:44:08 +0000 Subject: [PATCH] build/roms: warn if grub_scan_disk is not set at all --- resources/scripts/build/boot/roms_helper | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/scripts/build/boot/roms_helper b/resources/scripts/build/boot/roms_helper index f4eeccf..d98195f 100755 --- a/resources/scripts/build/boot/roms_helper +++ b/resources/scripts/build/boot/roms_helper @@ -49,7 +49,7 @@ fi # Workaround to grub's slow boot -grub_scan_disk="both" # both: scan ata and ahci (slow), there is ata and ahci too +grub_scan_disk="undefined" # both: scan ata and ahci (slow), there is ata and ahci too # as an option cbtree="undefined" romtype="normal" # optional parameter in board.cfg. "normal" is default @@ -65,6 +65,11 @@ payload_memtest="n" # Override the above defaults using board.cfg source "resources/coreboot/${board}/board.cfg" +if [ "${grub_scan_disk}" = "undefined" ]; then + printf "build/roms: Target %s does not define grub_scan_disk. Defaulting to 'both'.\n" "${board}" + grub_scan_disk="both" +fi + if [ "${grub_scan_disk}" != "both" ] && \ [ "${grub_scan_disk}" != "ata" ] && \ [ "${grub_scan_disk}" != "ahci" ]; then