From 3d7084f526303b8176f5a66ffd13b8df72e667bd Mon Sep 17 00:00:00 2001 From: swaroopb Date: Wed, 1 Mar 2023 16:54:23 +0530 Subject: [PATCH] Kernelflinger: Disalbe UI display function #51 --- Android.mk | 1 - avb/Android.mk | 1 - kernelflinger.c | 9 ++++----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Android.mk b/Android.mk index 5e72383e..cfe1bdcb 100644 --- a/Android.mk +++ b/Android.mk @@ -90,7 +90,6 @@ ifneq ($(TARGET_BUILD_VARIANT),user) endif ifneq ($(strip $(KERNELFLINGER_USE_UI)),false) - KERNELFLINGER_CFLAGS += -DUSE_UI endif ifeq ($(KERNELFLINGER_OS_SECURE_BOOT),true) diff --git a/avb/Android.mk b/avb/Android.mk index 4a85fa0c..22c6008d 100644 --- a/avb/Android.mk +++ b/avb/Android.mk @@ -68,7 +68,6 @@ LOCAL_STATIC_LIBRARIES := \ libkernelflinger-$(TARGET_BUILD_VARIANT) ifneq ($(strip $(KERNELFLINGER_USE_UI)),false) - LOCAL_CFLAGS += -DUSE_UI endif LOCAL_SRC_FILES := \ diff --git a/kernelflinger.c b/kernelflinger.c index dba41f8c..a7dcf3d3 100644 --- a/kernelflinger.c +++ b/kernelflinger.c @@ -1109,7 +1109,7 @@ static VOID enter_fastboot_mode(UINT8 boot_state) die(); } -static void bootloader_recover_mode(UINT8 boot_state) +static void bootloader_recover_mode(UINT8 boot_state __unused) { enum boot_target target; @@ -1136,8 +1136,8 @@ static void bootloader_recover_mode(UINT8 boot_state) die(); } -static VOID boot_error(enum ux_error_code error_code, UINT8 boot_state, - UINT8 *hash, UINTN hash_size) +static VOID boot_error(enum ux_error_code error_code __unused, UINT8 boot_state, + UINT8 *hash __unused, UINTN hash_size __unused) { BOOLEAN power_off = FALSE; enum boot_target bt; @@ -1241,8 +1241,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) /* For civ, flash images to disk is not MUST. So set device to LOCKED * state by default on the first boot. */ - if (need_lock) - set_current_state(LOCKED); + set_current_state(UNLOCKED); ret = set_device_security_info(NULL); if (EFI_ERROR(ret)) {