上次我尝试为我的运行 android 的设备编译内核时,我遇到了奇怪的问题,如下所示:
/cmsource/kernel/samsung/msm7x30-common/scripts/mkmakefile: line 5: $'\r': command not found
cmsource/kernel/samsung/msm7x30-common/scripts/mkmakefile: line 12: $'\r': command not found
/cmsource/kernel/samsung/msm7x30-common/scripts/mkmakefile: line 59: warning: here-document at line 24 delimited by end-of-file (wanted `EOF')
cmsource/kernel/samsung/msm7x30-common/scripts/mkmakefile: line 60: syntax error: unexpected end of file
mkmakefile
是 bash script如你所知
我试图解决编译错误,但我无法弄明白。
我由此怀疑:我在一周前对 git 进行了各种更改,例如以下更改:
git config --global core.autocrlf input
git config --global core.whitespace trailing-space,space-before-tab,inden
git config --global core.autocrlf true
我在网上搜索时看到了以下帖子:the post on stackoverflow
我必须说我使用 git clone
下载了内核源代码
所以在我看来设置git crlf、行尾设置和脚本导致的内核编译错误之间有关系
谁能阐明这一点?
最佳答案
git config --global core.autocrlf true
的问题是它是一个全局设置,可以影响所有你的文件,包括那些 eol (end-行外)字符不应更改
(I found it problematic in the past)。
先试试:
git config --global core.autocrlf false
然后再次克隆您的存储库以查看问题是否仍然存在。
关于android - 内核 bash 脚本编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37427047/