主题 : mini2440学习之(一)-------移植linux内核 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 5970
精华: 0
发帖: 37
金钱: 380 两
威望: 375 点
贡献值: 0 点
综合积分: 74 分
注册时间: 2009-05-15
最后登录: 2009-09-14
30楼  发表于: 2009-05-25 14:44
是啊,我是在mnt下面,不过我cp到linux下解压老说没空间,删了不少东西也还是不行,
另外我原来用redhat9.0编译友善给的内核压缩包的时候编译不过,但是重新在fedora下面同样的步骤却可以,不知道是不是和内核有关的
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
31楼  发表于: 2009-05-25 15:27
是啊,我是在mnt下面,不过我cp到linux下解压老说没空间,删了不少东西也还是不行,

不要在FAT/NTFS分区上编译linux内核
另外我原来用redhat9.0编译友善给的内核压缩包的时候编译不过,但是重新在fedora下面同样的步骤却可以,不知道是不是和内核有关的

跟内核无关,可能跟Redhat上的gcc或者glibc有关。不想自找麻烦的话用Fedora 9或更新的开发平台
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 5970
精华: 0
发帖: 37
金钱: 380 两
威望: 375 点
贡献值: 0 点
综合积分: 74 分
注册时间: 2009-05-15
最后登录: 2009-09-14
32楼  发表于: 2009-05-25 16:16
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2

我又搞到linux里面来了,没有了前面的错误,但是有出现了上面的错误,上网也查了什么ICC的,不懂,是不是缺什么东西啊
我的arm--linux-gcc 是3.4.1
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
33楼  发表于: 2009-05-25 16:29
在make的命令行上加上参数V=1, 贴出完整的输出信息
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 5970
精华: 0
发帖: 37
金钱: 380 两
威望: 375 点
贡献值: 0 点
综合积分: 74 分
注册时间: 2009-05-15
最后登录: 2009-09-14
34楼  发表于: 2009-05-25 16:37
ok,我回去再试下
级别: 新手上路
UID: 5970
精华: 0
发帖: 37
金钱: 380 两
威望: 375 点
贡献值: 0 点
综合积分: 74 分
注册时间: 2009-05-15
最后登录: 2009-09-14
35楼  发表于: 2009-05-25 17:17
错误是这样的:
CHK include /linux/utsreloase.h
SYMLINK include /asm->include /asm-arm
CC kernel /bounds.s
CC/:error: invalid option"abi=aapcs-linux"
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2

帮忙看下啊
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
36楼  发表于: 2009-05-25 22:17
引用第35楼xuxiaohuahhh于2009-05-25 17:17发表的  :
错误是这样的:
CHK include /linux/utsreloase.h
SYMLINK include /asm->include /asm-arm
CC kernel /bounds.s
CC/:error: invalid option"abi=aapcs-linux"
.......

你的内核配置为EABI的,但用的toolchian是OABI的,所以你有两个选择:
1. 去掉内核的EABI选项(Kernel Features->Use EABI), 但这样不能支持EABI的文件系统,比如20090405更新以后的root_qtopia;
2. 用一个支持EABI的toolchian编译,比如友善之臂提供的4.3.2的toolchain。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 5970
精华: 0
发帖: 37
金钱: 380 两
威望: 375 点
贡献值: 0 点
综合积分: 74 分
注册时间: 2009-05-15
最后登录: 2009-09-14
37楼  发表于: 2009-05-26 18:47
就是交叉编译器的问题,我换了4.3.2的就可以了
谢谢
级别: 新手上路
UID: 5970
精华: 0
发帖: 37
金钱: 380 两
威望: 375 点
贡献值: 0 点
综合积分: 74 分
注册时间: 2009-05-15
最后登录: 2009-09-14
38楼  发表于: 2009-05-26 18:48
接着.......................
内核是编译过了,但是下到扳子上去后,出现了下面的错误,cpu的ID问题,是不是要下子新的supervivi,因为我看友善新版的内核中MACH_TYPE是1999,我也试着改过这个号码,但是启动后还是一样的、?
Copy linux kernel from 0x00050000 to 0x30008000, size = 0x00200000 ... done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "noinitrd root=/dev/mtdblock2 init=/linuxrc

console=ttySAC0"
MACH_TYPE = 782
NOW, Booting Linux......
Uncompressing

Linux.................................................................................................................

done, booting the kernel.


Error: unrecognized/unsupported machine ID (r1 = 0x0000030e).


Available machine support:


ID (hex) NAME

000000c1 SMDK2410

0000015b IPAQ-H1940

0000039f Acer-N35

00000290 Acer-N30

0000014b Simtec-BAST

000002a8 Nex Vision - Otom 1.1

00000400 AML_M5900

000001db Thorcom-VR1000

00000454 QT2410

000003fe SMDK2413

000003f1 SMDK2412

00000377 S3C2413

00000474 VSTMS

0000016a SMDK2440

0000043c SMDK2443


Please check your kernel config and/or bootloader.
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
39楼  发表于: 2009-05-26 20:24
MACH_TYPE = 782

Supervivi传给内核的MACHINE ID是782, 所以你需要在内核里至少定义一个ID为782的machine。事实上,在友善之臂提供的2.6.29内核里,arch\arm\mach-s3c2440\mach-mini2440, 第218行有

复制代码
  1. MACHINE_START(PNX4008, "FriendlyARM Mini2440 development board")


而在arch/arm/tools/mach-types里有
复制代码
  1. pnx4008    MACH_PNX4008    PNX4008        782
  2. ...
  3. mini2440        MACH_MINI2440        MINI2440        1999

所以说,友善之臂在这里玩了个小花招,并没有用那个骗人的1999的mini2440的定义,用的还是782的ID
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."