platform: msm_shared: Fix compilation errors after disable FBCON_DISPLAY_MSG
Update Verified boot state menu and fix compilation issue
when fbcon display is disabled.
Change-Id: I07921d28b7f63eb72afb00942fad2da72f0c8a8e
diff --git a/platform/msm_shared/avb/VerifiedBoot.c b/platform/msm_shared/avb/VerifiedBoot.c
index 7a06655..a322e5d 100644
--- a/platform/msm_shared/avb/VerifiedBoot.c
+++ b/platform/msm_shared/avb/VerifiedBoot.c
@@ -692,35 +692,38 @@
switch (Info->boot_state)
{
case RED:
+#if FBCON_DISPLAY_MSG
display_bootverify_menu(DISPLAY_MENU_RED);
- //if (Status != EFI_SUCCESS) {
- dprintf(INFO, "Your device is corrupt. It can't be trusted and will not boot." \
- "\nYour device will shutdown in 30s\n");
- //}
+ wait_for_users_action();
+#else
+ dprintf(INFO, "Your device is corrupt. It can't be trusted and will not boot." \
+ "\nYour device will shutdown in 30s\n");
udelay(30000000);
shutdown_device();
+#endif
break;
case YELLOW:
+#if FBCON_DISPLAY_MSG
display_bootverify_menu(DISPLAY_MENU_YELLOW);
- //if (Status == EFI_SUCCESS) {
+ wait_for_users_action();
wait_for_users_action();
- //} else {
- dprintf(INFO, "Your device has loaded a different operating system." \
- "\nWait for 5 seconds before proceeding\n");
- udelay(5000000);
- //}
+#else
+ dprintf(INFO, "Your device has loaded a different operating system." \
+ "\nWait for 5 seconds before proceeding\n");
+ udelay(5000000);
+#endif
break;
case ORANGE:
if (ffbm_mode_string[0] != '\0' && !target_build_variant_user()) {
dprintf(DEBUG, "Device will boot into FFBM mode\n");
} else {
+#if FBCON_DISPLAY_MSG
display_bootverify_menu(DISPLAY_MENU_ORANGE);
- if (Status == EFI_SUCCESS) {
- wait_for_users_action();
- } else {
- dprintf(INFO, "Device is unlocked, Skipping boot verification\n");
- udelay(5000000);
- }
+ wait_for_users_action();
+#else
+ dprintf(INFO, "Device is unlocked, Skipping boot verification\n");
+ udelay(5000000);
+#endif
}
break;
default: