• «
  • 1
  • 2
  • 3
  • »
  • Pages: 2/3     Go
主题 : 编译2.6.18 内核下载后为什么不能启动? 复制链接 | 浏览器收藏 | 打印
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
10楼  发表于: 2008-04-03 17:38
引用第22楼alexchen于2008-04-03 17:33发表的  :
我以前在编译内核时 出现PCIMEM_BASE 没有定义,所以我加上#define PCIMEM_BASE这句就通过编译了,不知道是否和这个有关。为什么PCIMEM_BASE没定义呢?用gcc 编译没问题啊。我一步步看vgacon_startup()看看是什么问题。


把没有define PCIMEM_BASE时编译出错的log贴出来
用gcc和arm-linux-gcc编译完全是两回事,编译的东西是不同的
"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: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
11楼  发表于: 2008-04-03 18:13
引用第24楼alexchen于2008-04-03 18:00发表的  :
  CHK     include/linux/compile.h
  CC      drivers/video/console/vgacon.o
In file included from drivers/video/console/vgacon.c:52:
include/video/vga.h: In function `vga_io_r':
include/video/vga.h:226: warning: comparison is always true due to limited range of data type
.......


把你现在用的.config文件也贴出来
"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: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
12楼  发表于: 2008-04-03 22:01
引用第26楼alexchen于2008-04-03 18:44发表的  :
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.18
# Thu Apr  3 13:11:10 2008
#
.......


这个config是不适用于QQ2440的。QQ2440是基于S3C2440的,因此,配置一个适用于QQ2440的内核最简单的方法是修改原本内核对于S3C2440的默认配置,这个config定义在arch/arm/configs/s3c2410_defconfig, 你可以通过make s3c2410_defconfig来配置内核。

另外,永远不要做自己定义一个地址这种傻事,内核不是应用程序,宏都有自己的物理意义,并且很多都是根据实际硬件决定的。
[ 此贴被kasim在2008-04-03 22:08重新编辑 ]
"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: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
13楼  发表于: 2008-04-04 08:28
我不明白你要做什么,如果你想用2.6.13的内核,那可以参照友善之臂提供的源代码,看友善之臂修改了哪些部分;如果你想自己移植2.6.18的内核,你可以参照友善之臂在移植2.6.13内核时修改的部分修改2.6.18的内核。如果你自己都不清楚一遍一遍重新编译内核源代码,重烧NAND Flash的目的,没人可以帮的了你。
"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: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
14楼  发表于: 2008-04-04 12:29
引用第30楼alexchen于2008-04-04 12:18发表的  :
谢谢版主指导,我不知道内核是否和文件系统有联系,所以我选择了和提供的内核相同的版本试试。我想比较两个内核的区别,能推荐一下用什么软件比较内核?


在linux下可以用diff -r命令,先用make distclean把编译出来的.o档去掉
"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: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
15楼  发表于: 2008-04-05 20:38
引用第32楼alexchen于2008-04-05 19:50发表的  :
我比较了一下,好几万行不同,头都大了,不知道从何改起。版主能说一下步骤吗?谢谢


拿比较2.6.13的kenel做例子:
1. 下载没有修改过的2.6.13的kernel,http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.13.tar.bz2

2. 解压下载下来的源代码包
$tar jxvf linux-2.6.13.tar.bz2

3. 解压光盘上提供的2.6.13的kernel
$tar jxvf /path/to/linux-2.6.13-qq2440-XXXXXXXX.tgz

4. 比较2.6.13的kernel和友善之臂提供的kernel
$diff -r -Nuap linux-2.6.13 kernel-2.6.13 > diff_2.6.13_FriendlyARM.txt

文件diff_2.6.13_FriendlyARM.txt就包含了所有友善之臂对2.6.13内核的修改
"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: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
16楼  发表于: 2008-04-08 21:42
内核命令行参数console=<串口设备名>, 其中串口设备名是当前系统所用的串口设备名称,由串口驱动决定。在QQ2440上,使用的是S3C2440A的UART串口驱动,源文件在drivers/serial/s3c2410.c.从这个驱动可以看出,设备名应该是ttySACX, 其中X表示设备的序号(S3C2440A有三个UART,X=0,1,2).而根据原理图,我们使用的串口对应的设备应该是UART0,即ttySAC0.

vivi中设定的内核命令行在vivi load内核之前会转换成ATAG存放在一个特定的位置,内核启动过程中会从该位置读取这些ATAG数据。只有当内核无法读到合法的ATAG数据,才会使用编译时指定的命令行,所以不用担心。

关于内核启动和ATAG, 可以参考http://www.arm.linux.org.uk/developer/booting.phphttp://www.simtec.co.uk/products/SWLINUX/files/booting_article.pdf
"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: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
17楼  发表于: 2008-04-09 13:32
引用第36楼alexchen于2008-04-09 11:33发表的  :
bootload的分区为vivi ,eboot,param,kernel,root,那么root=/dev/mtdblock2 是否应该改为4


内核启动后,MTD用的是自己的分区表,这个分区表有几种方法可以定义:
1. 写死在代码里
2. 通过内核命令行由bootloader传递给内核
3.自定义的其他方法

就2.6.18的内核来说,对于SMDK2440这个平台,我相信用的是方法1。你所要做的就是确保bon的分区和这个MTD的分区表一致。

另外,因为现在vivi传递给内核的machine type是362--SMDK2440,所以内核会load所有针对SMDK2440的配置,其中需要注意的是,SMDK2440用的输入晶振是16MHz,不同于QQ2440的12MHz,这应该可以解释为什么内核启动到console (串口)后出现问题
"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: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
18楼  发表于: 2008-04-09 23:59
从这个log看,你觉得内核启动问题出在哪里?
"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: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
19楼  发表于: 2008-04-10 07:18
引用第43楼alexchen于2008-04-10 02:29发表的  :
是否是EXT3-fs: unable to read superblock? 还请版主解释下


EXT3-fs: unable to read superblock是现象,原因在于前面的end_request: I/O error, dev mtdblock2, sector 2
也就是说,内核无法读取mtdblock2设备(即NAND Flash的第3个分区)。如果要找出NAND Flash无法读取的原因,建议你在编译内核时打开MTD相关的DEBUG选项
"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."
  • «
  • 1
  • 2
  • 3
  • »
  • Pages: 2/3     Go