blob: c373cdd1e57d3a9b679bdafaba4205acdb5da2c4 [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)
padarshr85181032016-07-09 02:32:43 +05309export CLANG35_AARCH64_PREFIX := $(ANDROID_BUILD_TOP)/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-$(TARGET_GCC_VERSION)/bin/aarch64-linux-android-
Sridhar Parasuramfedf9ac2015-11-03 16:20:50 -080010export CLANG35_BIN := $(CLANG_BIN)
Channagoud Kadabi53362e02016-06-29 18:34:12 -070011ANDROID_PRODUCT_OUT := $(BOOTLOADER_OUT)/Build
Sridhar Parasuramfedf9ac2015-11-03 16:20:50 -080012
13WORKSPACE=$(BUILDDIR)
14TARGET_TOOLS := CLANG35
15TARGET := DEBUG
16BUILD_ROOT := $(ANDROID_PRODUCT_OUT)/$(TARGET)_$(TARGET_TOOLS)
Channagoud Kadabi67698992016-03-02 13:04:47 -080017LOAD_ADDRESS := 0X9FA00000
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
lijuang4d342f62016-09-13 15:51:26 +080022SHELL:=/bin/bash
Sridhar Parasuramfedf9ac2015-11-03 16:20:50 -080023
24.PHONY: all cleanall
25
26all: ABL_FV_ELF
27
28cleanall:
29 @. ./edksetup.sh BaseTools && \
30 build -p $(WORKSPACE)/QcomModulePkg/QcomModulePkg.dsc -a AARCH64 -t $(TARGET_TOOLS) -b $(TARGET) -j build_modulepkg.log cleanall
31 rm -rf $(WORKSPACE)/QcomModulePkg/Bin64
32
Channagoud Kadabi1ed4a152016-02-05 15:15:41 -080033EDK_TOOLS_BIN:
Sridhar Parasuramfedf9ac2015-11-03 16:20:50 -080034 @. ./edksetup.sh BaseTools && \
Channagoud Kadabi1ed4a152016-02-05 15:15:41 -080035 $(MAKE) -C $(EDK_TOOLS) -j1
36
37ABL_FV_IMG: EDK_TOOLS_BIN
38 @. ./edksetup.sh BaseTools && \
Shivaprasad Hongal3860bbf2017-04-27 17:40:13 -070039 build -p $(WORKSPACE)/QcomModulePkg/QcomModulePkg.dsc -a AARCH64 -t $(TARGET_TOOLS) -b $(TARGET) -D ABL_OUT_DIR=$(ANDROID_PRODUCT_OUT) -D VERIFIED_BOOT=$(VERIFIED_BOOT) -D VERIFIED_BOOT_2=$(VERIFIED_BOOT_2) -D USER_BUILD_VARIANT=$(USER_BUILD_VARIANT) -j build_modulepkg.log $*
Sridhar Parasuramfedf9ac2015-11-03 16:20:50 -080040 cp $(BUILD_ROOT)/FV/FVMAIN_COMPACT.Fv $(ABL_FV_IMG)
41
42ABL_FV_ELF: ABL_FV_IMG
Jeevan Shriram19a53812017-06-14 15:39:48 -070043 python $(WORKSPACE)/QcomModulePkg/Tools/image_header.py $(ABL_FV_IMG) $(ABL_FV_ELF) $(LOAD_ADDRESS) elf 32