Sridhar Parasuram | fedf9ac | 2015-11-03 16:20:50 -0800 | [diff] [blame] | 1 | UEFI_TOP_DIR := . |
| 2 | |
| 3 | ifndef $(BOOTLOADER_OUT) |
| 4 | BOOTLOADER_OUT := . |
| 5 | endif |
| 6 | export $(BOOTLOADER_OUT) |
| 7 | |
| 8 | BUILDDIR=$(shell pwd) |
| 9 | export CLANG35_AARCH64_PREFIX := $(ANDROID_TOOLCHAIN)/aarch64-linux-android- |
| 10 | export CLANG35_BIN := $(CLANG_BIN) |
| 11 | ANDROID_PRODUCT_OUT := $(BOOTLOADER_OUT)/edk2 |
| 12 | |
| 13 | WORKSPACE=$(BUILDDIR) |
| 14 | TARGET_TOOLS := CLANG35 |
| 15 | TARGET := DEBUG |
| 16 | BUILD_ROOT := $(ANDROID_PRODUCT_OUT)/$(TARGET)_$(TARGET_TOOLS) |
| 17 | LOAD_ADDRESS := 0X98100000 |
Channagoud Kadabi | 1ed4a15 | 2016-02-05 15:15:41 -0800 | [diff] [blame^] | 18 | EDK_TOOLS := $(BUILDDIR)/BaseTools |
| 19 | EDK_TOOLS_BIN := $(EDK_TOOLS)/Source/C/bin |
Sridhar Parasuram | fedf9ac | 2015-11-03 16:20:50 -0800 | [diff] [blame] | 20 | ABL_FV_IMG := $(BUILD_ROOT)/FV/abl.fv |
| 21 | ABL_FV_ELF := $(BOOTLOADER_OUT)/../../abl.elf |
| 22 | |
| 23 | .PHONY: all cleanall |
| 24 | |
| 25 | all: ABL_FV_ELF |
| 26 | |
| 27 | cleanall: |
| 28 | @. ./edksetup.sh BaseTools && \ |
| 29 | build -p $(WORKSPACE)/QcomModulePkg/QcomModulePkg.dsc -a AARCH64 -t $(TARGET_TOOLS) -b $(TARGET) -j build_modulepkg.log cleanall |
| 30 | rm -rf $(WORKSPACE)/QcomModulePkg/Bin64 |
| 31 | |
Channagoud Kadabi | 1ed4a15 | 2016-02-05 15:15:41 -0800 | [diff] [blame^] | 32 | EDK_TOOLS_BIN: |
Sridhar Parasuram | fedf9ac | 2015-11-03 16:20:50 -0800 | [diff] [blame] | 33 | @. ./edksetup.sh BaseTools && \ |
Channagoud Kadabi | 1ed4a15 | 2016-02-05 15:15:41 -0800 | [diff] [blame^] | 34 | $(MAKE) -C $(EDK_TOOLS) -j1 |
| 35 | |
| 36 | ABL_FV_IMG: EDK_TOOLS_BIN |
| 37 | @. ./edksetup.sh BaseTools && \ |
| 38 | build -p $(WORKSPACE)/QcomModulePkg/QcomModulePkg.dsc -a AARCH64 -t $(TARGET_TOOLS) -b $(TARGET) -D ABL_OUT_DIR=$(ANDROID_PRODUCT_OUT) -j build_modulepkg.log $* |
Sridhar Parasuram | fedf9ac | 2015-11-03 16:20:50 -0800 | [diff] [blame] | 39 | cp $(BUILD_ROOT)/FV/FVMAIN_COMPACT.Fv $(ABL_FV_IMG) |
| 40 | |
| 41 | ABL_FV_ELF: ABL_FV_IMG |
| 42 | python $(WORKSPACE)/QcomModulePkg/Tools/image_header.py $(ABL_FV_IMG) $(ABL_FV_ELF) $(LOAD_ADDRESS) elf 64 |