2016-08-29 94 views
2

我想編譯我的自定義內核的arm64安卓設備有一個msm8996 SOC。我在GitHub上克隆了我的內核,以確保我有一個完全乾淨的代碼。然後我出口這些:android內核編譯錯誤爲arm64(msm8996)

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 

記住的msm8996有兩個雙核集羣這兩者都是arm64。我試着編譯使用股票gcc 4.9工具鏈,這是用Cyanogenmod來源shiped,然後我嘗試使用兩個UberTC 4.9工具鏈,可以在這裏找到:https://bitbucket.org/UBERTC/ aarch64-linux-android-4.9-kernel和aarch64-linux- android-4.9(我不知道這兩者之間有什麼區別)。 我每次重試建立我的內核我進行

make mrproper 

,並刪除了文件夾的ccache。然後我進行

make cm_pme_defconfig 

終於

make -j2 

我也試圖與

make -j1 

同樣的程序我無法找到任何人,所以我決定誰得到了同樣的錯誤在這裏發佈。 下面是我的終端錯誤消息:

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. 

而且這裏是我的內核在我的GitHub https://github.com/nico151999/android_kernel_htc_msm8996

我真的需要你的幫助,雖然問題的解決方案可能是相當明顯的。提前致謝)

回答

2

我碰到了與Qualcomm內核完全相同的問題。通常,添加 CFLAGS_trace.o:= -I $(src) 以更正Makefile可以解決此構建問題。但它不適合我。所以我用了一個非常大膽的方法。補丁就像是以下幾點:

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> 
+0

非常感謝。我試圖執行一個Cyanogenmod構建,其中一個成功的內核是結果。但是,構建內核會導致我發佈的錯誤。由於它與Cyanogenmod ROM版本一起工作,我目前不想應用此修補程序。無論如何,當我想再次構建內核時,我會嘗試一下。再次感謝;) –

2

實際上在此基礎上commit我發現全球答案 拿來看:

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> 

做到這一點( 「../../」)到其他TRACE_INCLUDE_PATH