AndroidBoot: Cleanup AndroidBoot makefile
TARGET_EMMC_BOOTLOADER and TARGET_ABL are both dependent on each other
creating a circular dependency instead use only one TARGET for
bootloader. Set SIGNED_KERNEL if verified boot is enabled instead of
TARGET_BOOTIMG_SIGNED flag which is deprecated.
Change-Id: Ica3e62b9a781050f992a6e9db78ba51fd918ecd3
diff --git a/AndroidBoot.mk b/AndroidBoot.mk
index 99656fa..74a0ea1 100644
--- a/AndroidBoot.mk
+++ b/AndroidBoot.mk
@@ -2,21 +2,16 @@
CLANG_BIN := $(ANDROID_BUILD_TOP)/$(LLVM_PREBUILTS_PATH)/
-# Set flags if we need to include security libs
-ifeq ($(TARGET_BOOTIMG_SIGNED),true)
- SIGNED_KERNEL := SIGNED_KERNEL=1
-else
- SIGNED_KERNEL := SIGNED_KERNEL=0
-endif
-
ifeq ($(BOOTLOADER_PLATFORM),)
BOOTLOADER_PLATFORM := $(TARGET_BOARD_PLATFORM)
endif
ifeq ($(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VERITY),true)
VERIFIED_BOOT := VERIFIED_BOOT=1
+ SIGNED_KERNEL := SIGNED_KERNEL=1
else
VERIFIED_BOOT := VERIFIED_BOOT=0
+ SIGNED_KERNEL := SIGNED_KERNEL=0
endif
ifneq ($(TARGET_BUILD_VARIANT),user)
@@ -29,6 +24,7 @@
# ABL ELF output
TARGET_ABL := $(PRODUCT_OUT)/abl.elf
+TARGET_EMMC_BOOTLOADER := $(TARGET_ABL)
ABL_OUT := $(TARGET_OUT_INTERMEDIATES)/ABL_OBJ
abl_clean:
@@ -41,12 +37,6 @@
$(TARGET_ABL): abl_clean | $(ABL_OUT) $(INSTALLED_KEYSTOREIMAGE_TARGET)
$(MAKE) -C bootable/bootloader/edk2 BOOTLOADER_OUT=../../../$(ABL_OUT) all $(SIGNED_KERNEL) $(VERIFIED_BOOT) $(DEVICE_STATUS) $(BUILD_VARIANT) CLANG_BIN=$(CLANG_BIN)
-# Keep build default for targets still using TARGET_BOOTLOADER
-#TARGET_BOOTLOADER := $(PRODUCT_OUT)/EMMCBOOT.MBN
-
-TARGET_EMMC_BOOTLOADER := $(PRODUCT_OUT)/abl.elf
-$(TARGET_EMMC_BOOTLOADER): $(ABL_OUT) | $(TARGET_ABL)
-
.PHONY: abl
abl: $(TARGET_ABL)