From: Shuide Chen <shuide.chen@amlogic.com>
Date: Tue, 28 May 2019 07:59:52 +0000 (+0800)
Subject: gpu: resolve dependency for build gpu module [2/2]
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=589a4a01ef42b49ed52921e2f37fa59fad5edeea;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_mali-driver.git

gpu: resolve dependency for build gpu module [2/2]

PD#SWPL-9058

Problem:
Previous optee module not depend kernel build, which may introduce
problem. after resolve optee issue, found gpu also has such problem
and may break the build.
Previous optee will build kernel configure at Android.mk scanning
stage, even gpu not relies on kernel, the '.config' is ready when start
build gpu module. now changed optee, GPU must depend on kernel module.

Solution:
Let gpu module depend the real kernel target. which fix this problem.

Verify:
locally

Change-Id: I2203ae234d7715878b7dc7d785e5147ebd7e233c
Signed-off-by: Shuide Chen <shuide.chen@amlogic.com>
---

diff --git a/gpu-v2.mk b/gpu-v2.mk
index bb9445d..51033b3 100644
--- a/gpu-v2.mk
+++ b/gpu-v2.mk
@@ -84,11 +84,11 @@ define bifrost-modules
 	@echo "make mali module finished current dir is $(shell pwd)"
 endef
 
-bifrost.ko: $(INTERMEDIATES_KERNEL)
+bifrost.ko: $(INSTALLED_KERNEL_TARGET)
 	$(call bifrost-modules,$(MESON_GPU_DIR),$(MESON_GPU_DIR)/bifrost/$(GPU_DRV_VERSION),$(KERNEL_ARCH))
 
-midgard.ko: $(INTERMEDIATES_KERNEL)
+midgard.ko: $(INSTALLED_KERNEL_TARGET)
 	$(call midgard-modules,$(MESON_GPU_DIR),$(MESON_GPU_DIR)/midgard/$(GPU_DRV_VERSION),$(KERNEL_ARCH))
 
-utgard.ko: $(INTERMEDIATES_KERNEL)
+utgard.ko: $(INSTALLED_KERNEL_TARGET)
 	$(call utgard-modules,$(MESON_GPU_DIR),$(MESON_GPU_DIR)/utgard/$(GPU_DRV_VERSION),$(KERNEL_ARCH))