Jeevan Shriram | 062058c | 2016-11-07 16:46:44 -0800 | [diff] [blame] | 1 | #Android makefile to build bootloader as a part of Android Build |
Sridhar Parasuram | fedf9ac | 2015-11-03 16:20:50 -0800 | [diff] [blame] | 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 ($(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VERITY),true) |
| 6 | VERIFIED_BOOT := VERIFIED_BOOT=1 |
| 7 | else |
| 8 | VERIFIED_BOOT := VERIFIED_BOOT=0 |
Sridhar Parasuram | fedf9ac | 2015-11-03 16:20:50 -0800 | [diff] [blame] | 9 | endif |
| 10 | |
Shivaprasad Hongal | 3860bbf | 2017-04-27 17:40:13 -0700 | [diff] [blame^] | 11 | ifeq ($(BOARD_AVB_ENABLE),true) |
| 12 | VERIFIED_BOOT_2 := VERIFIED_BOOT_2=1 |
| 13 | else |
| 14 | VERIFIED_BOOT_2 := VERIFIED_BOOT_2=0 |
| 15 | endif |
| 16 | |
Sridhar Parasuram | fedf9ac | 2015-11-03 16:20:50 -0800 | [diff] [blame] | 17 | ifeq ($(TARGET_BUILD_VARIANT),user) |
Vijay Kumar Pendoti | 9946e04 | 2016-09-16 17:38:51 +0530 | [diff] [blame] | 18 | USER_BUILD_VARIANT := USER_BUILD_VARIANT=1 |
| 19 | else |
| 20 | USER_BUILD_VARIANT := USER_BUILD_VARIANT=0 |
Sridhar Parasuram | fedf9ac | 2015-11-03 16:20:50 -0800 | [diff] [blame] | 21 | endif |
| 22 | |
| 23 | # ABL ELF output |
| 24 | TARGET_ABL := $(PRODUCT_OUT)/abl.elf |
Channagoud Kadabi | 9dff4e2 | 2016-02-10 11:19:49 -0800 | [diff] [blame] | 25 | TARGET_EMMC_BOOTLOADER := $(TARGET_ABL) |
Sridhar Parasuram | fedf9ac | 2015-11-03 16:20:50 -0800 | [diff] [blame] | 26 | ABL_OUT := $(TARGET_OUT_INTERMEDIATES)/ABL_OBJ |
| 27 | |
| 28 | abl_clean: |
| 29 | $(hide) rm -f $(TARGET_ABL) |
| 30 | |
| 31 | $(ABL_OUT): |
| 32 | mkdir -p $(ABL_OUT) |
| 33 | |
| 34 | # Top level target |
| 35 | $(TARGET_ABL): abl_clean | $(ABL_OUT) $(INSTALLED_KEYSTOREIMAGE_TARGET) |
Shivaprasad Hongal | 3860bbf | 2017-04-27 17:40:13 -0700 | [diff] [blame^] | 36 | $(MAKE) -C bootable/bootloader/edk2 BOOTLOADER_OUT=../../../$(ABL_OUT) all $(VERIFIED_BOOT) $(VERIFIED_BOOT_2) $(USER_BUILD_VARIANT) CLANG_BIN=$(CLANG_BIN) |
Sridhar Parasuram | fedf9ac | 2015-11-03 16:20:50 -0800 | [diff] [blame] | 37 | |
Sridhar Parasuram | fedf9ac | 2015-11-03 16:20:50 -0800 | [diff] [blame] | 38 | .PHONY: abl |
| 39 | |
| 40 | abl: $(TARGET_ABL) |