歡迎您光臨本站 註冊首頁

linux編譯kernel和svn版本衝突的解決辦法

←手機掃碼閱讀     niceskyabc @ 2020-05-12 , reply:0

現象
系統本來可以正常編譯linux系統kernel,但在安裝svn後,kernel編譯出錯。
CHK include/linux/version.h CHK include/generated/utsrelease.h make[1]: `include/generated/mach-types.h' is up to date. CALL scripts/checksyscalls.sh CHK include/generated/compile.h gcc: directory: No such file or directory gcc: directory": No such file or directory

:0: warning: missing terminating " character gcc: directory: No such file or directory gcc: directory": No such file or directory:0: warning: missing terminating " character gcc: directory: No such file or directory gcc: directory": No such file or directory:0: warning: missing terminating " character CC drivers/gpu/mali/mali/common/mali_kernel_core.o arm-eabi-gcc: error: ": No such file or directory make[4]: *** [drivers/gpu/mali/mali/common/mali_kernel_core.o] 錯誤 1 make[3]: *** [drivers/gpu/mali/mali] 錯誤 2 make[2]: *** [drivers/gpu/mali] 錯誤 2 make[1]: *** [drivers/gpu] 錯誤 2 make: *** [drivers] 錯誤 2 make: *** 正在等待未完成的任務....
原因分析
定位到 drivers/gpu/mali/ump/Makefile.common 和 drivers/gpu/mali/mali/Makefile 兩個文件中都有關於 SVN_REV:=xxxx 的語句,正常情況下 SVN_REV:= 為空,當檢查到svn版本後, SVN_REV:= 有了值,導致腳本中判斷走入錯誤分支。
解決方法
將兩個文件中的 SVN_REV 值都賦值為空 “” 即可。
drivers/gpu/mali/ump/Makefile.common:
16 # Get subversion revision number, fall back to 0000 if no svn info is available 17 #SVN_REV:=$(shell ((svnversion | grep -qv exported && echo -n 'Revision: ' && svnversion) || git svn info | sed -e 's/$$$$/M/' | grep '^Revision: ' || echo ${MALI_RELEASE_NAME}) 2>/dev/null | sed -e 's/^Revision: //') 19 SVN_REV:=""
drivers/gpu/mali/mali/Makefile:
117 #SVN_REV := $(shell (cd $(DRIVER_DIR); (svnversion | grep -qv exported && svnversion) || git svn info | grep '^Revision: '| sed -e 's/ ^Revision: //' ) 2>/dev/null ) 119 SVN_REV := ""


[niceskyabc ] linux編譯kernel和svn版本衝突的解決辦法已經有250次圍觀

http://coctec.com/docs/linux/show-post-234047.html