Kernel: fix out-of-tree build for merged kernel modules
authorIcenowy Zheng <uwu@icenowy.me>
Fri, 27 Oct 2023 09:11:04 +0000 (17:11 +0800)
committerJaehoon Chung <jh80.chung@samsung.com>
Wed, 13 Mar 2024 06:58:50 +0000 (15:58 +0900)
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
(cherry picked from commit 35a32afaf8c93301b2ca8087c80fef7fa0bee6a0)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/gpu/drm/img-rogue/Makefile
drivers/nna/Makefile
drivers/nna/img_mem/Makefile
drivers/nna/vha/Makefile
drivers/staging/media/vpu-vc8000d-kernel/linux/subsys_driver/Makefile

index 3ce2e94c473915d93b401b486cfc1c89182f700a..eb2878372d2ccc884dee2dd557e756d162828f03 100644 (file)
@@ -1,4 +1,4 @@
-img_basedir := drivers/gpu/drm/img-rogue
+img_basedir := $(srctree)/$(src)
 include $(img_basedir)/config_kernel.mk
 
 obj-$(CONFIG_DRM_POWERVR_ROGUE) += pvrsrvkm.o
index e51106d26a4bf9426b3c64864d5c855302f0b044..f51a45dc5951d5df430faa200138a36931565222 100644 (file)
@@ -4,4 +4,4 @@ endif
 obj-$(CONFIG_VHA) += vha/ img_mem/
 obj-$(CONFIG_LOKI) += fenrir_loki/
 
-subdir-ccflags-y += -I$(src)/include
+subdir-ccflags-y += -I$(srctree)/$(src)/include
index 19510b571a97b51cf19d3b79b27fc7fbea960209..49790613b69d5d03de47f09851c6496e866327e1 100644 (file)
@@ -14,7 +14,7 @@ CFLAGS_img_mem_ion.o += -Idrivers/staging/android/ion
 endif
 
 # IMGMMU: These should be obsoleted
-ccflags-y += -I$(src)/imgmmu/mmulib
+ccflags-y += -I$(srctree)/$(src)/imgmmu/mmulib
 # IMGMMU: code
 img_mem-y                           += imgmmu/imgmmu.o
 img_mem-y                           += imgmmu/kernel_heap.o
index 42907a890c2ff1df72e02b61d6409b7863b45983..23e1c1b2e54db9fe2671d4188d09e11cbd138131 100644 (file)
@@ -11,10 +11,10 @@ vha-y                   := vha_api.o vha_common.o
 vha-y                   += vha_dbg.o vha_pdump.o
 
 ifeq ($(CONFIG_HW_AX3_MC), y) 
-subdir-ccflags-y        += -I$(src)/multi
+subdir-ccflags-y        += -I$(srctree)/$(src)/multi
 vha-y                   += multi/vha_dev.o multi/vha_wm.o multi/vha_mmu.o multi/vha_mt19937.o
 else
-subdir-ccflags-y        += -I$(src)/single
+subdir-ccflags-y        += -I$(srctree)/$(src)/single
 vha-y                   += single/vha_dev.o single/vha_cnn.o single/vha_mmu.o
 vha-$(CONFIG_HW_AX2)    += single/vha_dev_ax2.o
 vha-$(CONFIG_HW_AX3)    += single/vha_dev_ax3.o
@@ -48,8 +48,8 @@ ccflags-$(CONFIG_VHA_SYS_AURA)   += -DCFG_SYS_AURA
 ccflags-$(CONFIG_VHA_SYS_VAGUS)  += -DCFG_SYS_VAGUS
 ccflags-$(CONFIG_VHA_SYS_MAGNA)  += -DCFG_SYS_MAGNA
 
-ccflags-y        += -I$(src)/$(PLAT)/
-subdir-ccflags-y += -I$(src)
+ccflags-y        += -I$(srctree)/$(src)/$(PLAT)/
+subdir-ccflags-y += -I$(srctree)/$(src)
 
 ifdef CONFIG_NEXEF_NNPU_INCLUDE
     subdir-ccflags-y += -I${CONFIG_NEXEF_NNPU_INCLUDE}
index 21cec8ea19eed1af3c3245e80d88d5ecc4eada01..b09967834f9ced700f9b42e43e9be5e46dcb79e4 100644 (file)
@@ -66,7 +66,7 @@ EXTRA_CFLAGS += $(DEBFLAGS)
 ifneq ($(KERNELRELEASE),)
 # recursive call from kernel build system
 
-ccflags-y := -I$(src)/../dwl
+ccflags-y := -I$(srctree)/$(src)/../dwl
 
 hantrodec-objs := hantro_dec.o hantro_mmu.o hantro_axife.o hantro_vcmd.o bidirect_list.o vcmdswhwregisters.o subsys.o kernel_allocator.o
 obj-m         += hantrodec.o