内核 bash 脚本编译错误

Kernel bash scripts compilation error

上次我尝试为运行 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

如您所知,mkmakefilebash 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

我在网上搜索时看到了以下post:the post on Whosebug

我必须说我使用 git clone

下载了内核源代码

所以我觉得设置gitcrlf、行尾设置和脚本导致的内核编译错误之间有关系

任何人都可以阐明这一点吗?

git config --global core.autocrlf true 的问题在于它是一个全局设置,可能会影响 所有 您的文件,包括其 eol(行尾)字符应该不会改变
(I found it problematic in the past).

先试试:

 git config --global core.autocrlf false

然后再次克隆您的存储库以查看问题是否仍然存在。