Sridhar Parasuram | fedf9ac | 2015-11-03 16:20:50 -0800 | [diff] [blame] | 1 | #Android makefile to build lk bootloader as a part of Android Build |
| 2 | |
| 3 | CLANG_BIN := $(ANDROID_BUILD_TOP)/$(LLVM_PREBUILTS_PATH)/ |
| 4 | |
Sridhar Parasuram | fedf9ac | 2015-11-03 16:20:50 -0800 | [diff] [blame] | 5 | ifeq ($(BOOTLOADER_PLATFORM),) |
| 6 | BOOTLOADER_PLATFORM := $(TARGET_BOARD_PLATFORM) |
| 7 | endif |
| 8 | |
| 9 | ifeq ($(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VERITY),true) |
| 10 | VERIFIED_BOOT := VERIFIED_BOOT=1 |
Channagoud Kadabi | 9dff4e2 | 2016-02-10 11:19:49 -0800 | [diff] [blame] | 11 | SIGNED_KERNEL := SIGNED_KERNEL=1 |
Sridhar Parasuram | fedf9ac | 2015-11-03 16:20:50 -0800 | [diff] [blame] | 12 | else |
| 13 | VERIFIED_BOOT := VERIFIED_BOOT=0 |
Channagoud Kadabi | 9dff4e2 | 2016-02-10 11:19:49 -0800 | [diff] [blame] | 14 | SIGNED_KERNEL := SIGNED_KERNEL=0 |
Sridhar Parasuram | fedf9ac | 2015-11-03 16:20:50 -0800 | [diff] [blame] | 15 | endif |
| 16 | |
| 17 | ifneq ($(TARGET_BUILD_VARIANT),user) |
| 18 | DEVICE_STATUS := DEFAULT_UNLOCK=true |
| 19 | endif |
| 20 | |
| 21 | ifeq ($(TARGET_BUILD_VARIANT),user) |
Vijay Kumar Pendoti | 9946e04 | 2016-09-16 17:38:51 +0530 | [diff] [blame^] | 22 | USER_BUILD_VARIANT := USER_BUILD_VARIANT=1 |
| 23 | else |
| 24 | USER_BUILD_VARIANT := USER_BUILD_VARIANT=0 |
Sridhar Parasuram | fedf9ac | 2015-11-03 16:20:50 -0800 | [diff] [blame] | 25 | endif |
| 26 | |
| 27 | # ABL ELF output |
| 28 | TARGET_ABL := $(PRODUCT_OUT)/abl.elf |
Channagoud Kadabi | 9dff4e2 | 2016-02-10 11:19:49 -0800 | [diff] [blame] | 29 | TARGET_EMMC_BOOTLOADER := $(TARGET_ABL) |
Sridhar Parasuram | fedf9ac | 2015-11-03 16:20:50 -0800 | [diff] [blame] | 30 | ABL_OUT := $(TARGET_OUT_INTERMEDIATES)/ABL_OBJ |
| 31 | |
| 32 | abl_clean: |
| 33 | $(hide) rm -f $(TARGET_ABL) |
| 34 | |
| 35 | $(ABL_OUT): |
| 36 | mkdir -p $(ABL_OUT) |
| 37 | |
| 38 | # Top level target |
| 39 | $(TARGET_ABL): abl_clean | $(ABL_OUT) $(INSTALLED_KEYSTOREIMAGE_TARGET) |
Vijay Kumar Pendoti | 9946e04 | 2016-09-16 17:38:51 +0530 | [diff] [blame^] | 40 | $(MAKE) -C bootable/bootloader/edk2 BOOTLOADER_OUT=../../../$(ABL_OUT) all $(SIGNED_KERNEL) $(VERIFIED_BOOT) $(DEVICE_STATUS) $(USER_BUILD_VARIANT) CLANG_BIN=$(CLANG_BIN) |
Sridhar Parasuram | fedf9ac | 2015-11-03 16:20:50 -0800 | [diff] [blame] | 41 | |
Sridhar Parasuram | fedf9ac | 2015-11-03 16:20:50 -0800 | [diff] [blame] | 42 | .PHONY: abl |
| 43 | |
| 44 | abl: $(TARGET_ABL) |