From: Chao Liu Date: Mon, 19 Nov 2018 11:36:47 +0000 (+0800) Subject: linuxdriver: Change the compiled output directory [1/1] X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8d691592e0caf3188fb005bff81a3d69f59b3307;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_optee.git linuxdriver: Change the compiled output directory [1/1] PD#SWPL-2236 Problem: optee.mod.c and optee_armtz.mod.c has no license declaration Solution: Switch compilation directory to $(PRODUCT_OUT)/obj/optee_modules Verify: Verified on U200 Change-Id: I6d370a35a7324a89d949dc41e3c5175648d85975 Signed-off-by: Chao Liu --- diff --git a/Android.mk b/Android.mk index afbb170..de85d75 100755 --- a/Android.mk +++ b/Android.mk @@ -17,28 +17,23 @@ KERNEL_DRIVER_CROSS_COMPILE := aarch64-linux-gnu- KERNEL_CONFIG=meson64_defconfig endif +OPTEE_MODULES := $(shell pwd)/$(PRODUCT_OUT)/obj/optee_modules include $(CLEAR_VARS) $(info $(shell if [ ! -d $(KERNEL_OUT_DIR) ]; then mkdir -p $(KERNEL_OUT_DIR); fi)) $(info $(shell if [ ! -e $(KERNEL_OUT_DIR)/include/generated/autoconf.h ]; then $(MAKE) -C $(KERNEL_DIR) O=../$(KERNEL_OUT_DIR) ARCH=$(KERNEL_ARCH) CROSS_COMPILE=$(KERNEL_DRIVER_CROSS_COMPILE) $(KERNEL_CONFIG); fi)) -$(info $(shell if [ ! -e $(KERNEL_OUT_DIR)/include/generated/autoconf.h ]; then $(MAKE) -C $(KERNEL_DIR) O=../$(KERNEL_OUT_DIR) ARCH=$(KERNEL_ARCH) CROSS_COMPILE=$(KERNEL_DRIVER_CROSS_COMPILE) modules_prepare; fi)) - -$(info $(shell $(MAKE) -C $(shell pwd)/$(KERNEL_OUT_DIR) M=$(shell pwd)/$(BOARD_AML_VENDOR_PATH)/tdk/linuxdriver/ KERNEL_A32_SUPPORT=$(KERNEL_A32_SUPPORT) ARCH=$(KERNEL_ARCH) CROSS_COMPILE=$(KERNEL_DRIVER_CROSS_COMPILE) modules)) -$(info $(shell mkdir -p $(PRODUCT_OUT)/obj/lib)) -$(info $(shell cp -vf $(LOCAL_PATH)/optee/optee_armtz.ko $(PRODUCT_OUT)/obj/lib)) -$(info $(shell cp -vf $(LOCAL_PATH)/optee.ko $(PRODUCT_OUT)/obj/lib)) +$(info $(shell if [ ! -e $(KERNEL_OUT_DIR)/include/generated/autoconf.h ]; then $(MAKE) -C $(KERNEL_DIR) O=../$(KERNEL_OUT_DIR) ARCH=$(KERNEL_ARCH) CROSS_COMPILE=$(KERNEL_DRIVER_CROSS_COMPILE) modules_prepare; fi)) -armtz_ko_file := $(wildcard $(LOCAL_PATH)/optee/*.ko) -armtz_ko_file := $(patsubst $(LOCAL_PATH)/optee/%,%,$(armtz_ko_file)) +$(info $(shell if [ ! -d $(OPTEE_MODULES) ]; then mkdir -p $(OPTEE_MODULES); fi)) +$(info $(shell cp $(LOCAL_PATH)/* $(OPTEE_MODULES) -rfa)) +$(info $(shell $(MAKE) -C $(shell pwd)/$(KERNEL_OUT_DIR) M=$(OPTEE_MODULES) KERNEL_A32_SUPPORT=$(KERNEL_A32_SUPPORT) ARCH=$(KERNEL_ARCH) CROSS_COMPILE=$(KERNEL_DRIVER_CROSS_COMPILE) modules)) -core_ko_file := $(wildcard $(LOCAL_PATH)/*.ko) -core_ko_file := $(patsubst $(LOCAL_PATH)/%,%,$(core_ko_file)) include $(CLEAR_VARS) LOCAL_MODULE := optee_armtz -LOCAL_SRC_FILES := optee/$(armtz_ko_file) +LOCAL_PREBUILT_MODULE_FILE := $(OPTEE_MODULES)/optee/optee_armtz.ko LOCAL_MODULE_TAGS := optional LOCAL_MODULE_CLASS := SHARED_LIBRARIES LOCAL_MODULE_SUFFIX := .ko @@ -48,7 +43,7 @@ include $(BUILD_PREBUILT) include $(CLEAR_VARS) LOCAL_MODULE := optee -LOCAL_SRC_FILES := $(core_ko_file) +LOCAL_PREBUILT_MODULE_FILE := $(OPTEE_MODULES)/optee.ko LOCAL_MODULE_TAGS := optional LOCAL_MODULE_CLASS := SHARED_LIBRARIES LOCAL_MODULE_SUFFIX := .ko diff --git a/optee.mod.o b/optee.mod.o deleted file mode 100644 index 67e865c..0000000 Binary files a/optee.mod.o and /dev/null differ