主题 : [已解决]通过NFS引导根d镜像出错,麻烦大家看看 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 1330
精华: 0
发帖: 39
金钱: 390 两
威望: 139 点
综合积分: 78 分
注册时间: 2008-08-18
最后登录: 2011-02-07
楼主  发表于: 2009-10-02 14:46

 [已解决]通过NFS引导根d镜像出错,麻烦大家看看

问题已解决,方法参见:移植2.6.31到mini2440成功!
好容易把U-boot、kernel2.6.31移植完了,本以为会轻松,结果……

话说u-boot移植成功了,通过tftp方式把内核烧入了nand,然后设置好引导参数,通过NFS启动。
NFS这边,根镜像是直接把mini2440带的板子里的linux/root_qtopia.tgz文件。
引导后,错误如下(从前十行来可以看出,内核成功引导并且挂在上了NFS上的根文件系统的):
复制代码
  1. s3c2410-rtc s3c2410-rtc: setting system clock to 2009-10-02 14:39:26 UTC (1254494366)
  2. eth0: link down
  3. IP-Config: Complete:
  4.      device=eth0, addr=192.168.0.111, mask=255.255.255.0, gw=192.168.0.10,
  5.      host=mini2440, domain=, nis-domain=gooth.cn,
  6.      bootserver=192.168.0.10, rootserver=192.168.0.10, rootpath=
  7. Looking up port of RPC 100003/2 on 192.168.0.10
  8. eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
  9. Looking up port of RPC 100005/1 on 192.168.0.10
  10. VFS: Mounted root (nfs filesystem) on device 0:14.
  11. Freeing init memory: 128K
  12. Unable to handle kernel paging request at virtual address 6bd00004
  13. pgd = c39f0000
  14. [6bd00004] *pgd=00000000
  15. Internal error: Oops: 5 [#1]
  16. Modules linked in:
  17. CPU: 0    Not tainted  (2.6.31 #15)
  18. PC is at s3c2410_gpio_setpin+0x1c/0x3c
  19. LR is at s3c24xx_led_set+0x24/0x48
  20. pc : [<c00319f4>]    lr : [<c020d854>]    psr: 60000093
  21. sp : c3825c10  ip : 6bd00000  fp : c03f4348
  22. r10: c03f4748  r9 : c03f4548  r8 : c03f4948
  23. r7 : c3824000  r6 : c39c7540  r5 : 00000000  r4 : 60000013
  24. r3 : 60000093  r2 : 00010000  r1 : 00000001  r0 : e1a00009
  25. Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
  26. Control: c000717f  Table: 339f0000  DAC: 00000015
  27. Process init (pid: 1, stack limit = 0xc3824270)
  28. Stack: (0xc3825c10 to 0xc3826000)
  29. 5c00:                                     c00246d8 c020d854 0000002e c39df6e0
  30. 5c20: c39c7540 c020dea4 c03f3b40 00000100 c020ddc0 c0043304 c3825c38 c3825c38
  31. ……
  32. 5fc0: 40025050 40025000 bec13c98 400252c8 bec13f10 400255dc 40025000 bec13c74
  33. 5fe0: 40000000 bec13c58 40000c88 40014bb0 60000010 ffffffff 33cc33cc 33cc33cc
  34. [<c00319f4>] (s3c2410_gpio_setpin+0x1c/0x3c) from [<c020d854>] (s3c24xx_led_set+0x24/0x48)
  35. [<c020d854>] (s3c24xx_led_set+0x24/0x48) from [<c020dea4>] (led_heartbeat_function+0xe4/0x104)
  36. [<c020dea4>] (led_heartbeat_function+0xe4/0x104) from [<c0043304>] (run_timer_softirq+0x154/0x1e8)
  37. [<c0043304>] (run_timer_softirq+0x154/0x1e8) from [<c003f0d8>] (__do_softirq+0x78/0x104)
  38. [<c003f0d8>] (__do_softirq+0x78/0x104) from [<c0028068>] (_text+0x68/0x80)
  39. [<c0028068>] (_text+0x68/0x80) from [<c00289e4>] (__irq_svc+0x24/0xa0)
  40. Exception stack(0xc3825ca0 to 0xc3825ce8)
  41. 5ca0: 00000000 c3a49010 00000002 02000000 c39d2a00 c3813a5c c3813a5c c3a41524
  42. 5cc0: 00001000 c3411638 00000000 c3a41520 3111e76d c3825ce8 c3a49004 c02a388c
  43. 5ce0: 60000013 ffffffff
  44. [<c00289e4>] (__irq_svc+0x24/0xa0) from [<c02a388c>] (call_transmit+0x148/0x294)
  45. [<c02a388c>] (call_transmit+0x148/0x294) from [<c02a9cb8>] (__rpc_execute+0x84/0x28c)
  46. [<c02a9cb8>] (__rpc_execute+0x84/0x28c) from [<c02a42c0>] (rpc_run_task+0x60/0x68)
  47. [<c02a42c0>] (rpc_run_task+0x60/0x68) from [<c0103d84>] (nfs_read_rpcsetup+0x1a4/0x1cc)
  48. [<c0103d84>] (nfs_read_rpcsetup+0x1a4/0x1cc) from [<c0101d3c>] (nfs_pageio_doio+0x44/0x74)
  49. [<c0101d3c>] (nfs_pageio_doio+0x44/0x74) from [<c0101e60>] (nfs_pageio_add_request+0xf4/0x108)
  50. [<c0101e60>] (nfs_pageio_add_request+0xf4/0x108) from [<c0103904>] (readpage_async_filler+0xdc/0x154)
  51. [<c0103904>] (readpage_async_filler+0xdc/0x154) from [<c006aff0>] (read_cache_pages+0x7c/0xf4)
  52. [<c006aff0>] (read_cache_pages+0x7c/0xf4) from [<c01035f4>] (nfs_readpages+0xfc/0x16c)
  53. [<c01035f4>] (nfs_readpages+0xfc/0x16c) from [<c006aabc>] (__do_page_cache_readahead+0x12c/0x1dc)
  54. [<c006aabc>] (__do_page_cache_readahead+0x12c/0x1dc) from [<c006ab90>] (ra_submit+0x24/0x28)
  55. [<c006ab90>] (ra_submit+0x24/0x28) from [<c0063dbc>] (filemap_fault+0x1ac/0x374)
  56. [<c0063dbc>] (filemap_fault+0x1ac/0x374) from [<c007481c>] (__do_fault+0x50/0x3b0)
  57. [<c007481c>] (__do_fault+0x50/0x3b0) from [<c0075a4c>] (handle_mm_fault+0x250/0x590)
  58. [<c0075a4c>] (handle_mm_fault+0x250/0x590) from [<c002e544>] (do_page_fault+0xe0/0x22c)
  59. [<c002e544>] (do_page_fault+0xe0/0x22c) from [<c0028d7c>] (ret_from_exception+0x0/0x10)
  60. Code: e121f003 e3c0c01f e1a0c0ac e28cc4fb (e59c3004)
  61. Kernel panic - not syncing: Fatal exception in interrupt
  62. [<c002d6a8>] (unwind_backtrace+0x0/0xdc) from [<c02c1af0>] (panic+0x40/0x118)
  63. [<c02c1af0>] (panic+0x40/0x118) from [<c002c520>] (die+0x13c/0x168)
  64. [<c002c520>] (die+0x13c/0x168) from [<c002e454>] (__do_kernel_fault+0x64/0x74)
  65. [<c002e454>] (__do_kernel_fault+0x64/0x74) from [<c002e670>] (do_page_fault+0x20c/0x22c)
  66. [<c002e670>] (do_page_fault+0x20c/0x22c) from [<c002822c>] (do_DataAbort+0x30/0x90)
  67. [<c002822c>] (do_DataAbort+0x30/0x90) from [<c00289a0>] (__dabt_svc+0x40/0x60)
  68. Exception stack(0xc3825bc8 to 0xc3825c10)
  69. 5bc0:                   e1a00009 00000001 00010000 60000093 60000013 00000000
  70. 5be0: c39c7540 c3824000 c03f4948 c03f4548 c03f4748 c03f4348 6bd00000 c3825c10
  71. 5c00: c020d854 c00319f4 60000093 ffffffff
  72. [<c00289a0>] (__dabt_svc+0x40/0x60) from [<c00319f4>] (s3c2410_gpio_setpin+0x1c/0x3c)
  73. [<c00319f4>] (s3c2410_gpio_setpin+0x1c/0x3c) from [<c020d854>] (s3c24xx_led_set+0x24/0x48)
  74. [<c020d854>] (s3c24xx_led_set+0x24/0x48) from [<c020dea4>] (led_heartbeat_function+0xe4/0x104)
  75. [<c020dea4>] (led_heartbeat_function+0xe4/0x104) from [<c0043304>] (run_timer_softirq+0x154/0x1e8)
  76. [<c0043304>] (run_timer_softirq+0x154/0x1e8) from [<c003f0d8>] (__do_softirq+0x78/0x104)
  77. [<c003f0d8>] (__do_softirq+0x78/0x104) from [<c0028068>] (_text+0x68/0x80)
  78. [<c0028068>] (_text+0x68/0x80) from [<c00289e4>] (__irq_svc+0x24/0xa0)
  79. Exception stack(0xc3825ca0 to 0xc3825ce8)
  80. 5ca0: 00000000 c3a49010 00000002 02000000 c39d2a00 c3813a5c c3813a5c c3a41524
  81. 5cc0: 00001000 c3411638 00000000 c3a41520 3111e76d c3825ce8 c3a49004 c02a388c
  82. 5ce0: 60000013 ffffffff
  83. [<c00289e4>] (__irq_svc+0x24/0xa0) from [<c02a388c>] (call_transmit+0x148/0x294)
  84. [<c02a388c>] (call_transmit+0x148/0x294) from [<c02a9cb8>] (__rpc_execute+0x84/0x28c)
  85. [<c02a9cb8>] (__rpc_execute+0x84/0x28c) from [<c02a42c0>] (rpc_run_task+0x60/0x68)
  86. [<c02a42c0>] (rpc_run_task+0x60/0x68) from [<c0103d84>] (nfs_read_rpcsetup+0x1a4/0x1cc)
  87. [<c0103d84>] (nfs_read_rpcsetup+0x1a4/0x1cc) from [<c0101d3c>] (nfs_pageio_doio+0x44/0x74)
  88. [<c0101d3c>] (nfs_pageio_doio+0x44/0x74) from [<c0101e60>] (nfs_pageio_add_request+0xf4/0x108)
  89. [<c0101e60>] (nfs_pageio_add_request+0xf4/0x108) from [<c0103904>] (readpage_async_filler+0xdc/0x154)
  90. [<c0103904>] (readpage_async_filler+0xdc/0x154) from [<c006aff0>] (read_cache_pages+0x7c/0xf4)
  91. [<c006aff0>] (read_cache_pages+0x7c/0xf4) from [<c01035f4>] (nfs_readpages+0xfc/0x16c)
  92. [<c01035f4>] (nfs_readpages+0xfc/0x16c) from [<c006aabc>] (__do_page_cache_readahead+0x12c/0x1dc)
  93. [<c006aabc>] (__do_page_cache_readahead+0x12c/0x1dc) from [<c006ab90>] (ra_submit+0x24/0x28)
  94. [<c006ab90>] (ra_submit+0x24/0x28) from [<c0063dbc>] (filemap_fault+0x1ac/0x374)
  95. [<c0063dbc>] (filemap_fault+0x1ac/0x374) from [<c007481c>] (__do_fault+0x50/0x3b0)
  96. [<c007481c>] (__do_fault+0x50/0x3b0) from [<c0075a4c>] (handle_mm_fault+0x250/0x590)
  97. [<c0075a4c>] (handle_mm_fault+0x250/0x590) from [<c002e544>] (do_page_fault+0xe0/0x22c)
  98. [<c002e544>] (do_page_fault+0xe0/0x22c) from [<c0028d7c>] (ret_from_exception+0x0/0x10)
[ 此帖被athurg在2009-10-03 13:52重新编辑 ]
级别: 新手上路
UID: 1330
精华: 0
发帖: 39
金钱: 390 两
威望: 139 点
综合积分: 78 分
注册时间: 2008-08-18
最后登录: 2011-02-07
1楼  发表于: 2009-10-02 14:51
11行上有个
复制代码
  1. Freeing init memory: 128K

好像说空闲内存才128K。好像有点不对哦?
启动的时候把内核拷到0x3100 0000,大小有0x50 0000这么大。算起来也才用掉20M左右,还有100多M呢
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
2楼  发表于: 2009-10-02 15:32
从内核的oops看,问题应该出在s3c24xx_led_set()调用s3c2410_gpio_setpin()上。你修改过2.6.31的源代码吗?
"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 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2009-10-02 15:33
引用第1楼athurg于2009-10-02 14:51发表的  :
11行上有个
复制代码
  1. Freeing init memory: 128K

好像说空闲内存才128K。好像有点不对哦?
启动的时候把内核拷到0x3100 0000,大小有0x50 0000这么大。算起来也才用掉20M左右,还有100多M呢

这个和Flash或者SDRAM的空闲空间没关系。
"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: 1330
精华: 0
发帖: 39
金钱: 390 两
威望: 139 点
综合积分: 78 分
注册时间: 2008-08-18
最后登录: 2011-02-07
4楼  发表于: 2009-10-02 16:13
源代码基本没修改过。

现在有个问题就是在u-boot里修改了参数后无法保存。nand flash是可以写入的,不过需要先手动解除保护
复制代码
  1. protect off all

不过就算解除保护了,也保存不了参数(环境变量)
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
5楼  发表于: 2009-10-02 17:03
呵呵,我在想我应该先帮你看哪个问题,内核crash还是U-Boot?
"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: 1330
精华: 0
发帖: 39
金钱: 390 两
威望: 139 点
综合积分: 78 分
注册时间: 2008-08-18
最后登录: 2011-02-07
6楼  发表于: 2009-10-02 17:17
内核的问题解决了,哈哈!
帮我看看uboot的吧!
内核的问题容我稍后整理一下。