summaryrefslogtreecommitdiff
path: root/fallback.c
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2021-04-06 14:58:00 +0100
committerPeter Jones <pjones@redhat.com>2021-09-03 16:53:32 -0400
commit0837d010a6ee140ff3cc770aadc89fbb015a7ca2 (patch)
tree0325783b79d0742a5e1706a0a7b4dfd0bdd3268c /fallback.c
parent77648c5c01c79a330075824ff695ecd185514edc (diff)
downloadefi-boot-shim-0837d010a6ee140ff3cc770aadc89fbb015a7ca2.tar.gz
efi-boot-shim-0837d010a6ee140ff3cc770aadc89fbb015a7ca2.zip
fallback: add compile option FALLBACK_NONINTERACTIVE
In the cloud, all boots are non-interactive with keyboard and console access either typically not available or prohibited. Also clouds always do firstboot via fallback. This currently results in an unacceptable 5s boot delay whilst fallback offers interactive reset options that cannot be actioned. In Ubuntu, we'd like to make fallback noninteractive by default without any boot delays, due to bootspeed impact on firstboot of the preinstalled images. Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/shim/+bug/1922581 Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
Diffstat (limited to 'fallback.c')
-rw-r--r--fallback.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fallback.c b/fallback.c
index 801955c7..302eeac1 100644
--- a/fallback.c
+++ b/fallback.c
@@ -1041,6 +1041,7 @@ get_fallback_no_reboot(void)
return 0;
}
+#ifndef FALLBACK_NONINTERACTIVE
static EFI_STATUS
set_fallback_no_reboot(void)
{
@@ -1084,6 +1085,7 @@ get_user_choice(void)
return choice;
}
+#endif
extern EFI_STATUS
efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *systab);
@@ -1156,6 +1158,7 @@ efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
try_start_first_option(image);
}
+#ifndef FALLBACK_NONINTERACTIVE
int timeout = draw_countdown();
if (timeout == 0)
goto reset;
@@ -1171,6 +1174,7 @@ efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
VerbosePrint(L"tpm present, starting the first image\n");
try_start_first_option(image);
reset:
+#endif
VerbosePrint(L"tpm present, resetting system\n");
}