• «
  • 1
  • 2
  • 3
  • »
  • Pages: 1/3     Go
主题 : 编译2.6.18 内核下载后为什么不能启动? 复制链接 | 浏览器收藏 | 打印
级别: 侠客
UID: 172
精华: 1
发帖: 48
金钱: 500 两
威望: 68 点
贡献值: 10 点
综合积分: 116 分
注册时间: 2008-02-27
最后登录: 2017-09-13
楼主  发表于: 2008-03-27 18:23

 编译2.6.18 内核下载后为什么不能启动?

管理提醒: 本帖被 qq2440 执行置顶操作(2009-12-07)
我编译通过后,下载到板子上,但是启动不了,请问是不是SUPPER VIVI
不支持还是编译内核那个配置选项没选上?请qq2440 kasim帮忙看看。。
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2008-03-28 23:24
put your log here please
"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
2楼  发表于: 2008-03-31 15:49
从这个log看,Kernel启动挂在自解压之后。你可以通过'menuconfig' enable下面的debug选项:
(1)  Kernel hacking --->
[*] Kernel debugging
[*] Kernel low-level debugging functions
[*]  Kernel low-level debugging messages via S3C2410 UART
(0) S3C2410 UART to use for low-level debug

(2) System Type  --->
(0) S3C2410 UART to use for low-level messages
"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
3楼  发表于: 2008-03-31 20:28
想像这位大哥一样因祸得福的话可以看看这个
http://www.hackhero.com/bbs/simple/index.php?t29291.html

这是arm.linux.org.uk上对于这个问题的解决方法
http://lists.arm.linux.org.uk/lurker/message/20020111.100639.9fafb9d1.html
"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
4楼  发表于: 2008-04-01 21:05
如果你能看到linux version 2.6.13(root@localhost.localdomain) ,这句log是从定义在init/main.c的start_kernel()里的printk(linux_banner)里打印出来的
"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
5楼  发表于: 2008-04-01 23:19
The best advice is if you're using your own debugging code, remove it.
Use the debugging printascii() stuff for your platform in
arch/arm/kernel/debug-armv.S (enabled by CONFIG_DEBUG_LL) and drop it
into printk() (kernel/printk.c) just after the vsprintf() call, and
monitor the relevant serial port.
"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
6楼  发表于: 2008-04-02 14:12
引用第10楼alexchen于2008-04-01 22:32发表的  :
可是还没看到,我移植的2.6.18就是done, booting the kernel.这里停了。
可能再head.s中 bl decompress_kernel 和mov pc ,r4 中间出现问题,在汇编中用什么指令可以输出一些信息来看是那条指令跑飞了。先感谢了

如果你修改过Machine ID还是出现这样的错,一般来说是挂在板级的初始化阶段,这部分代码是用C写,你可以通过参照上面的回贴修改printk()来让串口在这个阶段就输出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."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
7楼  发表于: 2008-04-02 22:55
引用第14楼alexchen于2008-04-02 17:24发表的  :
我在init/main.c的start_kernel 中加入printascii("hello worldn");编译错误,好像是什么没有定义,要加那些头文件。版主能不能发一个QQ2440 2.6.13以上的zImage 给我参考下。邮箱是alexchenq@163.com,先谢了。


Patch the 2.6.18 kernel with the following patch to make printk() output via serial port before uart driver is inited

cd linux-2.6.18 &&  patch  -p1  < /path/to/early_printk.patch

early_printk.patch:

---
kernel/printk.c |  12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

Index: linux-2.6.18/kernel/printk.c
===================================================================
--- linux-2.6.18.orig/kernel/printk.c    2008-04-02 21:46:59.000000000 +0800
+++ linux-2.6.18/kernel/printk.c    2008-04-02 21:55:18.000000000 +0800
@@ -492,11 +492,19 @@
{
    va_list args;
    int r;
-
+#ifdef CONFIG_DEBUG_LL
+    extern void printascii(const char *);
+    char buff[256];
+#endif
    va_start(args, fmt);
    r = vprintk(fmt, args);
+#ifdef CONFIG_DEBUG_LL
+    vsprintf(buff, fmt, args);
+#endif
    va_end(args);
-
+#ifdef CONFIG_DEBUG_LL
+    printascii(buff);
+#endif
    return r;
}
附件: early_printk.patch.zip (1 K) 下载次数:20
"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
8楼  发表于: 2008-04-03 13:28
引用第18楼alexchen于2008-04-03 12:33发表的  :
我打了补丁,下载启动后出现以下错误,请版主再分析分析。。

Enter your selection: b
Copy linux kernel from 0x00050000 to 0x30008000, size = 0x00200000 ... done
zImage magic = 0x016f2818
.......


仔细看kernel crash的信息:

<1>Unable to handle kernel paging request at virtual address 000b8022
<1>pgd = c0004000
<1>[000b8022] *pgd=00000000
Internal error: Oops: 5 [#1]
Modules linked in:
CPU: 0
PC is at vgacon_startup+0x25c/0x3f4
LR is at 0xb8000

pc : [<c011356c>]    lr : [<000b8000>]    Not tainted
sp : c0243f74  ip : 000b8022  fp : c0243f98
r10: c02c7864  r9 : 41129200  r8 : c0247250
r7 : ffffaa55  r6 : c021e970  r5 : 000055aa  r4 : 00000000
r3 : c02c7854  r2 : 000c0022  r1 : c02c7850  r0 : 00000000
Flags: nzCv  IRQs on  FIQs off  Mode SVC_32  Segment kernel
Control: C000717F  Table: 30004000  DAC: 00000017
Process swapper (pid: 0, stack limit = 0xc0242250)
Stack: (0xc0243f74 to 0xc0244000)
3f60:                                              c02ca57c c001e2c8 00000000
3f80: 00000000 3001dcac 3001dc78 c0243fbc c0243f9c c00191e0 c0113320 c01224ac
3fa0: c001e2c0 c001e2c8 c02471a4 c02e7b60 c0243fd4 c0243fc0 c0018aec c00191bc
3fc0: c0007175 c029f444 c0243ff4 c0243fd8 c0008930 c0018acc c0008464 c029f4c8
3fe0: c0007175 c029f444 00000000 c0243ff8 30008030 c0008800 00000000 00000000
Backtrace:
[<c0113310>] (vgacon_startup+0x0/0x3f4) from [<c00191e0>] (con_init+0x34/0x2b0)
[<c00191ac>] (con_init+0x0/0x2b0) from [<c0018aec>] (console_init+0x30/0x48)
r7 = C02E7B60  r6 = C02471A4  r5 = C001E2C8  r4 = C001E2C0
[<c0018abc>] (console_init+0x0/0x48) from [<c0008930>] (start_kernel+0x140/0x26c
)
r5 = C029F444  r4 = C0007175
[<c00087f0>] (start_kernel+0x0/0x26c) from [<30008030>] (0x30008030)
r5 = C029F444  r4 = C0007175
Code: e59f7178 e59f5178 e5832000 e581c000 (e1de22b2)
<0>Kernel panic - not syncing: Attempted to kill the idle task!

如果你想学ARM汇编,你可以试试反汇编kernel,然后找出crash的位置;
如果你和我一样懒,就多加几个printk()吧
[ 此贴被kasim在2008-04-03 13:34重新编辑 ]
"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
9楼  发表于: 2008-04-03 17:11
kernel原来crash的位置在vgacon_startup()里,你可以在这个函数里加printk()找到crash的地方。
"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: 1/3     Go