当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 3 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 内核编译问题
帖子发表于 : 2016-06-08 10:14 

注册: 2016-05-26 8:54
帖子: 6
系统: ubuntu16.04
送出感谢: 0 次
接收感谢: 0 次
root@zhang-ThinkPad-T60p:/usr/src/linux-2.6.38# make zImage
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
Generating include/generated/mach-types.h
CC kernel/bounds.s
gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’
gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
gcc: error: unrecognized command line option ‘-mlittle-endian’
gcc: error: unrecognized command line option ‘-mapcs’
gcc: error: unrecognized command line option ‘-mno-sched-prolog’
gcc: error: unrecognized command line option ‘-mno-thumb-interwork’
/usr/src/linux-2.6.38/./Kbuild:35: recipe for target 'kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 1
Makefile:956: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
root@zhang-ThinkPad-T60p:/usr/src/linux-2.6.38#


以上是编译时产生的错误。
电脑系统:ubuntu16.04 ;
菜鸟初学
系统内核是linux-4.4.0;
要编译的内核是linux2.6.38;
工具:arm-none-linux-gnueabi-gcc,~ -v测试版本显示正常,说明安装没问题;
改了makefile的ARCH ?=arm;
CROSS_COMPILR ?=arm-linux-;
其他没变,然后make menuconfig配置了一点内容一变产生.config文件。
然后直接make zImage就出错;
但是我编译linux4.4.0不会出错。且可以生存zImage镜像。
请问大神们,究竟错在哪了?


页首
 用户资料  
 
2 楼 
 文章标题 : Re: 内核编译问题
帖子发表于 : 2016-06-08 10:52 
头像

注册: 2008-09-18 13:11
帖子: 2781
送出感谢: 1
接收感谢: 453
CROSS_COMPILE 而非 CROSS_COMPILR


页首
 用户资料  
 
3 楼 
 文章标题 : Re: 内核编译问题
帖子发表于 : 2016-06-08 10:59 

注册: 2016-05-26 8:54
帖子: 6
系统: ubuntu16.04
送出感谢: 0 次
接收感谢: 0 次
这个错找到了,是arm-none-linux-gnueabi-gcc不是默认的gcc工具,用update-alternatives设置就好了,可有有新的错误。
scripts/mod/mk_elfconfig: 1: scripts/mod/mk_elfconfig: Syntax error: word unexpected (expecting ")")
/usr/src/linux-2.6.38/scripts/mod/Makefile:14: recipe for target 'scripts/mod/elfconfig.h' failed
make[2]: *** [scripts/mod/elfconfig.h] Error 2
scripts/Makefile.build:385: recipe for target 'scripts/mod' failed
make[1]: *** [scripts/mod] Error 2
Makefile:487: recipe for target 'scripts' failed
make: *** [scripts] Error 2

在scripts/mod/文件夹下明明有elfconfig.h文件,但打开是空文件,什么也没写


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 3 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 2 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译