From 7fc7aad152ae595de371a5b969744ff3b971d81c Mon Sep 17 00:00:00 2001 From: Keun young Park Date: Mon, 27 Feb 2012 15:49:23 -0800 Subject: [PATCH] changes to add pdk1 / pdk2 build for PDK build - additional files will be added to pdk/build Bug: 6079146 Change-Id: Ieb5fcab8002193250d770b923f60ec7333ce84e5 --- core/Makefile | 10 ++++++---- core/main.mk | 36 +++++++++++++++++++++++++++++++++++- core/tasks/apicheck.mk | 3 ++- 3 files changed, 43 insertions(+), 6 deletions(-) diff --git a/core/Makefile b/core/Makefile index 8d0dfed0b..ce22fc966 100644 --- a/core/Makefile +++ b/core/Makefile @@ -624,7 +624,7 @@ endef # Recovery image # If neither TARGET_NO_KERNEL nor TARGET_NO_RECOVERY are true -ifeq (,$(filter true, $(TARGET_NO_KERNEL) $(TARGET_NO_RECOVERY) $(BUILD_TINY_ANDROID))) +ifeq (,$(filter true, $(TARGET_NO_KERNEL) $(TARGET_NO_RECOVERY) $(BUILD_TINY_ANDROID) $(BUILD_PDK))) INSTALLED_RECOVERYIMAGE_TARGET := $(PRODUCT_OUT)/recovery.img @@ -1325,11 +1325,13 @@ $(INTERNAL_EMULATOR_PACKAGE_TARGET): $(INTERNAL_EMULATOR_PACKAGE_FILES) $(hide) zip -qj $@ $(INTERNAL_EMULATOR_PACKAGE_FILES) # ----------------------------------------------------------------- +# Old PDK stuffs, retired # The pdk package (Platform Development Kit) -ifneq (,$(filter pdk,$(MAKECMDGOALS))) - include development/pdk/Pdk.mk -endif +#ifneq (,$(filter pdk,$(MAKECMDGOALS))) +# include development/pdk/Pdk.mk +#endif + # ----------------------------------------------------------------- # The SDK diff --git a/core/main.mk b/core/main.mk index 309805116..41e788fe9 100644 --- a/core/main.mk +++ b/core/main.mk @@ -207,6 +207,32 @@ $(info ***************************************************************) $(error stopping) endif +# ----------------------------------------------------------------- +# The pdk (Platform Development Kit) build +# pdk1 : for building binary blob necessary for pdk2 build +# pdk2 : HAL build for chipset vendors + +PDK_BUILD_TYPE:= $(filter pdk1 pdk2,$(MAKECMDGOALS)) +ifneq (1,$(words $(PDK_BUILD_TYPE))) + $(error You can't build pdk1 and pdk2 in the same run.) +endif +ifneq ($(PDK_BUILD_TYPE),) + $(info PDK build type $(PDK_BUILD_TYPE)) + BUILD_PDK:= true + include pdk/build/pdk.mk + # force droid target + MAKECMDGOALS:= $(subst $(PDK_BUILD_TYPE),droid,$(MAKECMDGOALS)) +ifeq ($(PDK_BUILD_TYPE), pdk1) + .PHONY: pdk1 + pdk1: droid pdk_bin_zip + +else # pdk2 + .PHONY: pdk2 + pdk2: droid + +endif # pdk2 +endif # PDK_BUILD_TYPE +# ----------------------------------------------------------------- ### ### In this section we set up the things that are different ### between the build variants @@ -421,7 +447,10 @@ subdirs := \ external/yaffs2 \ external/zlib else # !BUILD_TINY_ANDROID - +ifneq ($(BUILD_PDK),) +subdirs := $(BUILD_PDK_SUBDIRS) +FULL_BUILD := true +else # Normal droid build # # Typical build; include any Android.mk files we can find. # @@ -429,6 +458,8 @@ subdirs := $(TOP) FULL_BUILD := true +endif # !BUILD_PDK + endif # !BUILD_TINY_ANDROID endif # !SDK_ONLY @@ -698,6 +729,9 @@ bootimage: $(INSTALLED_BOOTIMAGE_TARGET) ifeq ($(BUILD_TINY_ANDROID), true) INSTALLED_RECOVERYIMAGE_TARGET := endif +ifneq ($(BUILD_PDK),) +INSTALLED_RECOVERYIMAGE_TARGET := +endif # Build files and then package it into the rom formats .PHONY: droidcore diff --git a/core/tasks/apicheck.mk b/core/tasks/apicheck.mk index 96e0f44db..b3d800b4e 100644 --- a/core/tasks/apicheck.mk +++ b/core/tasks/apicheck.mk @@ -17,7 +17,8 @@ # api compatibility or added apis illegally. # -ifneq ($(BUILD_TINY_ANDROID), true) +# skip api check for TINY_ANDROID and PDK buid +ifeq (,$(filter true, $(BUILD_TINY_ANDROID) $(BUILD_PDK))) .PHONY: checkapi -- 2.11.0