问题
I'm trying to compile my custom kernel for an arm64 android device having an msm8996 SOC. I cloned my Kernel on GitHub just to make sure I have a fully clean code. Then I exported these:
export PATH=/home/nico/Downloads/kernel/aarch64-linux-android-4.9/bin:$PATH
export CROSS_COMPILE=aarch64-linux-android-
export ARCH=arm64
export SUBARCH=arm64
Keep in mind that the msm8996 has two dual-core clusters which are both arm64. I tried compiling using the stock gcc 4.9 toolchain which is shiped with the Cyanogenmod sources and then I tried it using two of the UberTC 4.9 toolchains which can be found here: https://bitbucket.org/UBERTC/ aarch64-linux-android-4.9-kernel and aarch64-linux-android-4.9 (I dunno exactly what's the difference between those two). Every time I retried building my kernel I performed a
make mrproper
and also deleted the ccache folder. Then I performed a
make cm_pme_defconfig
and finally a
make -j2
I also tried the same procedure with
make -j1
I couldn't find anyone else who got the same error so I decided to post it here. Here's the error message in my terminal:
In file included from drivers/net/ethernet/msm/rndis_ipa_trace.h:81:0,
from drivers/net/ethernet/msm/rndis_ipa.c:32:
include/trace/define_trace.h:83:43: fatal error: ./rndis_ipa_trace.h:
No such file or directory
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
^
compilation terminated.
Furthermore here's my kernel on my GitHub https://github.com/nico151999/android_kernel_htc_msm8996
I really need your help though the solution to the problem may be quite obvious. Thanks a lot in advance ;)
回答1:
actually based on this commit i found global answer take look :
diff --git a/drivers/platform/msm/ipa/ipa_v2/ipa_trace.h b/drivers/platform/msm/ipa/ipa_v2/ipa_trace.h
index d70abdf..7f7e452 100644
--- a/drivers/platform/msm/ipa/ipa_v2/ipa_trace.h
+++ b/drivers/platform/msm/ipa/ipa_v2/ipa_trace.h
@@ -131,5 +131,5 @@ TRACE_EVENT(
/* This part must be outside protection */
#undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/platform/msm/ipa/ipa_v2
#include <trace/define_trace.h>
do this ("../../") to other TRACE_INCLUDE_PATH
回答2:
I hit the exactly same issue with Qualcomm kernel. Generally, adding CFLAGS_trace.o := -I$(src) to correct Makefile could fix this build issue. But it didn't work for me. So I used a very bold method. Patch is like following:
diff --git a/drivers/net/ethernet/msm/rndis_ipa_trace.h b/drivers/net/ethernet/msm/rndis_ipa_trace.h
index c0fc573..c18046b 100644
--- a/drivers/net/ethernet/msm/rndis_ipa_trace.h
+++ b/drivers/net/ethernet/msm/rndis_ipa_trace.h
@@ -77,5 +77,5 @@ TRACE_EVENT(
/* This part must be outside protection */
#undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH /opt/work/qcom/kernel/drivers/net/ethernet/msm/
#include <trace/define_trace.h>
diff --git a/drivers/platform/msm/ipa/ipa_v2/ipa_trace.h b/drivers/platform/msm/ipa/ipa_v2/ipa_trace.h
index d70abdf..7f7e452 100644
--- a/drivers/platform/msm/ipa/ipa_v2/ipa_trace.h
+++ b/drivers/platform/msm/ipa/ipa_v2/ipa_trace.h
@@ -131,5 +131,5 @@ TRACE_EVENT(
/* This part must be outside protection */
#undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH /opt/work/qcom/kernel/drivers/platform/msm/ipa/ipa_v2/
#include <trace/define_trace.h>
回答3:
I'm having the same problem.
It seems that you can modify "TRACE_INCLUDE_PATH" in the file "rndis_ipa_trace.h" for each directory. And, directories to be modified are included in the build error message.
As I proceeded with the build, I could find problems on the following path, and I proceeded with the build by referring to the solutions of the others above.
drivers/clk/qcom/mdss/rndis_ipa_trace.h & drivers/platform/msm/ipa/ipa_v2/rndis_ipa_trace.h
Thank you for your guide =)
来源:https://stackoverflow.com/questions/39211894/android-kernel-compiling-error-for-arm64-msm8996