简体   繁体   English

Linux内核使用来自不同驱动程序树的标头

[英]Linux kernel make with headers from different driver tree

I am trying to include the gpu_ipa header from the mali driver directory tree in my 3.10.9 android kernel within my cpufreq module. 我试图在cpufreq模块的3.10.9 android内核中包含来自马里驱动程序目录树的gpu_ipa标头。 I have been looking through the make files but cannot make sense of how I am meant to include the mali directories in the make config for my module, in the cpufreq driver directory. 我一直在浏览make文件,但无法理解在cpufreq驱动程序目录中如何在模块的make config中包含mali目录。

Just to elaborate if not quite clear. 只是要详细说明(如果不是很清楚)。

In my module (optigame_governor.c/h) I have 在我的模块(optigame_governor.c / h)中,我有

#include "gpu_ipa.h"

In my cpufreq makefile 在我的cpufreq makefile中

obj-$(CONFIG_CPU_FREQ_GOV_OPTIGAME) += optigame_governor.o

no includes :( 不包括:(

The file structure between my module and the target header looks like 我的模块和目标标头之间的文件结构如下所示

kernel---drivers---cpufreq---optigame_governor.c/h
                \--gpu---arm---midgard---platform---gpu_ipa.h

I am not 100% sure if this is the exact file I need but I will need something in this other driver branch and so am looking for a somewhat generalized solution. 我不是100%确定这是否是我需要的确切文件,但是我将在其他驱动程序分支中需要某些文件,因此我正在寻找某种通用的解决方案。

Cheers 干杯

I was able to solve my problem using the ccflags mentioned in the comments. 我能够使用评论中提到的ccflags解决我的问题。

Adding 添加

ccflags-$(CONFIG_CPU_FREQ_GOV_OPTIGAME) += -Idrivers/gpu/arm/midgard

to my cpufreq Makefile and adding 到我的cpufreq Makefile并添加

#include <platform/gpu_ipa.h>

to my c file solved the problem. 我的C文件解决了这个问题。 Problem was due to not using absolute paths. 问题是由于未使用绝对路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM