linux编译kernel和svn版本冲突的解决办法

(编辑:jimmy 日期: 2024/9/24 浏览:2)

现象

系统本来可以正常编译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
<command-line>:0: warning: missing terminating " character
gcc: directory: No such file or directory
gcc: directory": No such file or directory
<command-line>:0: warning: missing terminating " character
gcc: directory: No such file or directory
gcc: directory": No such file or directory
<command-line>: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 := ""

总结

一句话新闻

一文看懂荣耀MagicBook Pro 16
荣耀猎人回归!七大亮点看懂不只是轻薄本,更是游戏本的MagicBook Pro 16.
人们对于笔记本电脑有一个固有印象:要么轻薄但性能一般,要么性能强劲但笨重臃肿。然而,今年荣耀新推出的MagicBook Pro 16刷新了人们的认知——发布会上,荣耀宣布猎人游戏本正式回归,称其继承了荣耀 HUNTER 基因,并自信地为其打出“轻薄本,更是游戏本”的口号。
众所周知,寻求轻薄本的用户普遍更看重便携性、外观造型、静谧性和打字办公等用机体验,而寻求游戏本的用户则普遍更看重硬件配置、性能释放等硬核指标。把两个看似难以相干的产品融合到一起,我们不禁对它产生了强烈的好奇:作为代表荣耀猎人游戏本的跨界新物种,它究竟做了哪些平衡以兼顾不同人群的各类需求呢?