免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 7656 | 回复: 8
打印 上一主题 下一主题

[文件系统] openwrt在9344上可以引导内核不能加载根文件系统 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-11-28 09:08 |只看该作者 |倒序浏览
本人想将openwrt移植到9344的板子上,在下载attitude_adjustment_12.09分支后,完成Target System, Target Profile (Atheros DB120 reference board) 后,编译版本后生成bin文件。
通过串口烧录到分区中,内核可以引导,但在加载根文件系统失败,对于这种问题,应该怎么去排查并找出解决办法?
启动日志如下:
  1. [    0.000000] Linux version 3.3.8 (root@linuxwang) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #19 Tue Nov 11 01:57:59 CST 2014
  2. [    0.000000] bootconsole [early0] enabled
  3. [    0.000000] CPU revision is: 0001974c (MIPS 74Kc)
  4. [    0.000000] SoC: Atheros AR9344 rev 2
  5. [    0.000000] Clocks: CPU:560.000MHz, DDR:480.000MHz, AHB:240.000MHz, Ref:40.000MHz
  6. [    0.000000] Determined physical RAM map:
  7. [    0.000000]  memory: 08000000 @ 00000000 (usable)
  8. [    0.000000] Initrd not found or empty - disabling initrd
  9. [    0.000000] Zone PFN ranges:
  10. [    0.000000]   Normal   0x00000000 -> 0x00008000
  11. [    0.000000] Movable zone start PFN for each node
  12. [    0.000000] Early memory PFN ranges
  13. [    0.000000]     0: 0x00000000 -> 0x00008000
  14. [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
  15. [    0.000000] Kernel command line:  board=DB120 console=ttyS0,115200 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1408k(kernel),64k(nvram),64k(art)ro,7744k@0x50000(firmware) root=31:02 rootfstype=squashfs noinitrd
  16. [    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
  17. [    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
  18. [    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
  19. [    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
  20. [    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
  21. [    0.000000] Writing ErrCtl register=00000000
  22. [    0.000000] Readback ErrCtl register=00000000
  23. [    0.000000] Memory: 126612k/131072k available (2086k kernel code, 4460k reserved, 403k data, 208k init, 0k highmem)
  24. [    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
  25. [    0.000000] NR_IRQS:51
  26. [    0.000000] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
  27. [    0.070000] pid_max: default: 32768 minimum: 301
  28. [    0.070000] Mount-cache hash table entries: 512
  29. [    0.080000] NET: Registered protocol family 16
  30. [    0.080000] gpiochip_add: registered GPIOs 0 to 22 on device: ath79
  31. [    0.090000] MIPS: machine is Atheros DB120 reference board
  32. [    0.100000] ar724x-pci ar724x-pci: PCIe link is down
  33. [    0.100000] registering PCI controller with io_map_base unset
  34. [    0.510000] bio: create slab <bio-0> at 0
  35. [    0.520000] PCI host bridge to bus 0000:00
  36. [    0.520000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
  37. [    0.530000] pci_bus 0000:00: root bus resource [io  0x0000]
  38. [    0.530000] Switching to clocksource MIPS
  39. [    0.540000] NET: Registered protocol family 2
  40. [    0.540000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
  41. [    0.550000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
  42. [    0.560000] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
  43. [    0.560000] TCP: Hash tables configured (established 4096 bind 4096)
  44. [    0.570000] TCP reno registered
  45. [    0.570000] UDP hash table entries: 256 (order: 0, 4096 bytes)
  46. [    0.580000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
  47. [    0.580000] NET: Registered protocol family 1
  48. [    0.600000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
  49. [    0.610000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
  50. [    0.620000] msgmni has been set to 247
  51. [    0.620000] io scheduler noop registered
  52. [    0.620000] io scheduler deadline registered (default)
  53. [    0.630000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
  54. [    0.660000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
  55. [    0.660000] console [ttyS0] enabled, bootconsole disabled
  56. [    0.660000] console [ttyS0] enabled, bootconsole disabled
  57. [    0.680000] m25p80 spi0.0: found mx25l25635e, expected m25p80
  58. [    0.680000] m25p80 spi0.0: mx25l25635e (32768 Kbytes)
  59. [    0.690000] 7 cmdlinepart partitions found on MTD device spi0.0
  60. [    0.690000] Creating 7 MTD partitions on "spi0.0":
  61. [    0.700000] 0x000000000000-0x000000040000 : "u-boot"
  62. [    0.710000] 0x000000040000-0x000000050000 : "u-boot-env"
  63. [    0.710000] 0x000000050000-0x000000680000 : "rootfs"
  64. [    0.720000] mtd:  partition "rootfs" set to be root filesystem
  65. [    0.730000] magic is 73717368 actual:0 in ""
  66. [    0.730000] split_squashfs: no squashfs found in "spi0.0"
  67. [    0.740000] 0x000000680000-0x0000007e0000 : "kernel"
  68. [    0.740000] 0x0000007e0000-0x0000007f0000 : "nvram"
  69. [    0.750000] 0x0000007f0000-0x000000800000 : "art"
  70. [    0.760000] 0x000000050000-0x0000007e0000 : "firmware"
  71. [    0.780000] ag71xx_mdio: probed
  72. [    0.790000] ag71xx_mdio: probed
  73. [    0.790000] eth0: Atheros AG71xx at 0xb9000000, irq 4
  74. [    1.350000] ag71xx ag71xx.0: eth0: no PHY found with phy_mask=00000001
  75. [    1.350000] eth0: Atheros AG71xx at 0xba000000, irq 5
  76. [    1.910000] eth0: Found an AR934X built-in switch
  77. [    2.950000] TCP cubic registered
  78. [    2.950000] NET: Registered protocol family 17
  79. [    2.950000] 8021q: 802.1Q VLAN Support v1.8
  80. [    2.960000] List of all partitions:
  81. [    2.960000] 1f00             256 mtdblock0  (driver?)
  82. [    2.970000] 1f01              64 mtdblock1  (driver?)
  83. [    2.970000] 1f02            6336 mtdblock2  (driver?)
  84. [    2.980000] 1f03            1408 mtdblock3  (driver?)
  85. [    2.980000] 1f04              64 mtdblock4  (driver?)
  86. [    2.990000] 1f05              64 mtdblock5  (driver?)
  87. [    2.990000] 1f06            7744 mtdblock6  (driver?)
  88. [    3.000000] No filesystem could mount root, tried:  squashfs
  89. [    3.010000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)
复制代码

论坛徽章:
9
辰龙
日期:2014-08-18 20:38:42未羊
日期:2014-09-04 08:50:45丑牛
日期:2014-09-06 00:12:55寅虎
日期:2014-12-22 20:50:56摩羯座
日期:2015-01-14 22:28:15巳蛇
日期:2015-01-23 20:39:272015年辞旧岁徽章
日期:2015-03-03 16:54:1515-16赛季CBA联赛之青岛
日期:2016-03-13 23:37:1915-16赛季CBA联赛之深圳
日期:2016-03-29 18:52:38
2 [报告]
发表于 2014-11-28 09:22 |只看该作者
看看 31、2这个块设备是否存在,如果存在,把它解出来,看看在host里能不能用squashfs挂载。

论坛徽章:
0
3 [报告]
发表于 2014-11-28 09:39 |只看该作者
回复 2# Tinnal


    这个分区应该在吧,内核分区都在的话,应该文件系统分区也在吧!如果要看怎么去查看是否分区存在?
"它解出来,看看在host里能不能用squashfs挂载"怎么操作?

论坛徽章:
1
15-16赛季CBA联赛之北控
日期:2016-03-15 22:53:29
4 [报告]
发表于 2014-11-28 12:24 |只看该作者
Kernel command line:  board=DB120 console=ttyS0,115200 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1408k(kernel),64k(nvram),64k(art)ro,7744k@0x50000(firmware) root=31:02 rootfstype=squashfs noinitrd


确定文件系统类型是否正确

论坛徽章:
0
5 [报告]
发表于 2014-11-28 13:25 |只看该作者
怎么确认??回复 4# yangPSO


   

论坛徽章:
1
15-16赛季CBA联赛之北控
日期:2016-03-15 22:53:29
6 [报告]
发表于 2014-11-28 13:26 |只看该作者
你自己制作的根文件系统,类型不知道吗,比如是不是jff2

论坛徽章:
0
7 [报告]
发表于 2014-11-28 16:29 |只看该作者
根据编译生成文件可以知道是squashfs文件系统
选择openwrt-ar71xx-generic-db120-rootfs-squashfs.bin文件烧写到文件系统分区中
回复 6# yangPSO


   

论坛徽章:
1
15-16赛季CBA联赛之北控
日期:2016-03-15 22:53:29
8 [报告]
发表于 2014-11-28 16:51 |只看该作者
那你在函数squashfs_fill_super()中添加一些调试语句,首先确认函数执行了没有,然后看看哪里报错了没有

论坛徽章:
1
15-16赛季CBA联赛之北控
日期:2016-03-15 22:53:29
9 [报告]
发表于 2014-11-28 16:51 |只看该作者
本帖最后由 yangPSO 于 2014-11-28 17:03 编辑

那你在函数squashfs_fill_super()中添加一些调试语句,首先确认函数执行了没有,然后看看哪里报错了没有
你可以把其中的TRACE和ERROR宏打印生效
【不小心发多了一次】
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP