android - 内核 bash 脚本编译错误

标签 android git bash linux-kernel line-endings

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

我在网上搜索时看到了以下帖子: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/

相关文章:

android - 'soft launch' 使用 Expo 构建的新 React Native 应用程序的最佳方法是什么?

git 错误 : cannot stat <filename> : Protocol error

git - 如何刷新 Github Desktop 上的远程分支列表?

git - 将 Visual Studio Code 设置为 OSX 上的全局 Git 编辑器

linux - 将 grep 输出放入循环的变量内

java - RALLY Android 应用程序的用户登录流程

java - android 绘制曲线

Android:使用 setTransform 翻转实时 TextureView

git - 在 Bash 脚本中为 Git 提供密码

linux - 需要编写脚本来添加数字的帮助