blob: f51438321f14b4e61ab0b4e1261dd6341a21aa8c [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
18
19ABL_FV_IMG := $(BUILD_ROOT)/FV/abl.fv
20ABL_FV_ELF := $(BOOTLOADER_OUT)/../../abl.elf
21
22.PHONY: all cleanall
23
24all: ABL_FV_ELF
25
26cleanall:
27 @. ./edksetup.sh BaseTools && \
28 build -p $(WORKSPACE)/QcomModulePkg/QcomModulePkg.dsc -a AARCH64 -t $(TARGET_TOOLS) -b $(TARGET) -j build_modulepkg.log cleanall
29 rm -rf $(WORKSPACE)/QcomModulePkg/Bin64
30
31ABL_FV_IMG:
32 @. ./edksetup.sh BaseTools && \
33 build -p $(WORKSPACE)/QcomModulePkg/QcomModulePkg.dsc -a AARCH64 -t $(TARGET_TOOLS) -b $(TARGET) -D ABL_OUT_DIR=$(ANDROID_PRODUCT_OUT) -j build_modulepkg.log $1 $2 $3 $4 $5 $6 $7 $8
34 cp $(BUILD_ROOT)/FV/FVMAIN_COMPACT.Fv $(ABL_FV_IMG)
35
36ABL_FV_ELF: ABL_FV_IMG
37 python $(WORKSPACE)/QcomModulePkg/Tools/image_header.py $(ABL_FV_IMG) $(ABL_FV_ELF) $(LOAD_ADDRESS) elf 64