blob: 36ecb632183d25cade669c21ea68366e78f2ab7d [file] [log] [blame]
Sridhar Parasuramfedf9ac2015-11-03 16:20:50 -08001UEFI_TOP_DIR := .
2
3ifndef $(BOOTLOADER_OUT)
4 BOOTLOADER_OUT := .
5endif
6export $(BOOTLOADER_OUT)
7
8BUILDDIR=$(shell pwd)
9export CLANG35_AARCH64_PREFIX := $(ANDROID_TOOLCHAIN)/aarch64-linux-android-
10export CLANG35_BIN := $(CLANG_BIN)
11ANDROID_PRODUCT_OUT := $(BOOTLOADER_OUT)/edk2
12
13WORKSPACE=$(BUILDDIR)
14TARGET_TOOLS := CLANG35
15TARGET := DEBUG
16BUILD_ROOT := $(ANDROID_PRODUCT_OUT)/$(TARGET)_$(TARGET_TOOLS)
17LOAD_ADDRESS := 0X98100000
Channagoud Kadabi1ed4a152016-02-05 15:15:41 -080018EDK_TOOLS := $(BUILDDIR)/BaseTools
19EDK_TOOLS_BIN := $(EDK_TOOLS)/Source/C/bin
Sridhar Parasuramfedf9ac2015-11-03 16:20:50 -080020ABL_FV_IMG := $(BUILD_ROOT)/FV/abl.fv
21ABL_FV_ELF := $(BOOTLOADER_OUT)/../../abl.elf
22
23.PHONY: all cleanall
24
25all: ABL_FV_ELF
26
27cleanall:
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 Kadabi1ed4a152016-02-05 15:15:41 -080032EDK_TOOLS_BIN:
Sridhar Parasuramfedf9ac2015-11-03 16:20:50 -080033 @. ./edksetup.sh BaseTools && \
Channagoud Kadabi1ed4a152016-02-05 15:15:41 -080034 $(MAKE) -C $(EDK_TOOLS) -j1
35
36ABL_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 Parasuramfedf9ac2015-11-03 16:20:50 -080039 cp $(BUILD_ROOT)/FV/FVMAIN_COMPACT.Fv $(ABL_FV_IMG)
40
41ABL_FV_ELF: ABL_FV_IMG
42 python $(WORKSPACE)/QcomModulePkg/Tools/image_header.py $(ABL_FV_IMG) $(ABL_FV_ELF) $(LOAD_ADDRESS) elf 64