4

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 ;)

4 Answers 4

6

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

1
  • This is true, and helped me solving this issue. The default TRACE_INCLUDE_PATH is the same as <trace/define_trace.h>'s path, which is normally kernel_root_dir/include/trace. By going up two directories (../../) and including the path for the c file that references <trace/define_trace.h>, you can fix any of such compilation errors without hardcoding your build path. In my case I changed define #define TRACE_INCLUDE_PATH . to #define TRACE_INCLUDE_PATH ../../drivers/net/ethernet/msm/, which is the path for rndis_ipa_trace.h, thus solving the problem the OP had, which is equal. Nov 8, 2018 at 16:59
3

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>
1
  • Thanks a lot. I tried to perform a Cyanogenmod build where a successfuly built kernel was the result. However, building just the kernel results in the error I posted. As it works alongside a Cyanogenmod ROM build I currently don't want to apply this patch. Anyway, when I want to build just the kernel again I will try it. Thanks a lot again ;) Sep 2, 2016 at 15:35
0

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 =)

0

I stumbled with the same problem as soon as I started working with Linux Kernel v3.18 - LineageOS source for Moto G5 (Qualcomm SD 430) at a few places.

Patch the file "drivers/net/ethernet/msm/rndis_ipa_trace.h" @ line 15

- #define TRACE_INCLUDE_FILE rndis_ipa_trace
+ #define TRACE_INCLUDE_FILE ../drivers/net/ethernet/msm/rndis_ipa_trace

and the file "drivers/platform/msm/ipa/ipa_v2/ipa_trace.h" @ line 15

- #define TRACE_INCLUDE_FILE ipa_trace
+ #define TRACE_INCLUDE_FILE ../drivers/platform/msm/ipa/ipa_v2/ipa_trace

Both changes were made to be less invasive and avoid modifying the file at "include/traces", which may be used by others C files. This is a more local solution than a general change. And also, does not need to worry with absolute paths for the files, the "#include" call has is root at "/path/to/source/linux/.", so if you use a relative path knowing it will start from there, the changes may work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.