Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1071568
  • 博文数量: 71
  • 博客积分: 3078
  • 博客等级: 少校
  • 技术积分: 945
  • 用 户 组: 普通用户
  • 注册时间: 2009-09-16 20:10
个人简介

此博客已停用 个人博客: Mangogeek.com

文章分类
文章存档

2016年(1)

2015年(32)

2014年(25)

2011年(13)

分类: LINUX

2015-03-04 22:59:23

前几天使用sdk4.3,发现sd卡驱动一直有问题,没头绪,换op。
op中按照默认配置编译出MT7628镜像后,发现无法挂在rootfs。
[    0.790000] VFS: Cannot open root device "mtdblock5" or unknown-block(31,5): error -2
[    0.810000] Please append a correct "root=" boot option; here are the available partitions:
[    0.830000] 1f00             192 mtdblock0  (driver?)
[    0.840000] 1f01              64 mtdblock1  (driver?)
[    0.850000] 1f02              64 mtdblock2  (driver?)
[    0.860000] 1f03            7872 mtdblock3  (driver?)
[    0.870000] 1f04            1157 mtdblock4  (driver?)
[    0.880000] 1f05            6714 mtdblock5  (driver?)
[    0.890000] 1f06            5248 mtdblock6  (driver?)
[    0.900000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,5)
[    0.900000] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,5)
[   82.700000] random: nonblocking pool is initialized
                                  
怎么会找不到呢?起先甚至都没有mtdblock5 这一句,后来网上搜罗一番,发现两个问题:1、MT7628的uboot,根本没给kernel传递cmdargs。2、内核的dts文件,也没有root=xxxx。
只有简单的一句:
/target/linux/ramips/dts/mt7628an.dtsi               
chosen {
                bootargs = "console=ttyS0,57600";
        };
 
后来我果断增加=/dev/mtdblock5,问题解决。
                                                                                                                                         
稍后再继续看  MTK MSDC 驱动到底在闹什么鬼                                    
 启动后打印信息如下:

点击(此处)折叠或打开

  1. U-Boot 1.1.3 (Sep 15 2014 - 10:02:31)

  2. Board: Ralink APSoC DRAM: 64 MB
  3. relocate_code Pointer at: 83fb8000
  4. ******************************
  5. Software System Reset Occurred
  6. ******************************
  7. flash manufacture id: ef, device id 40 17
  8. find flash: W25Q64BV
  9. raspi_read: from:40035 len:1
  10. 0x893
  11. raspi_read: from:30000 len:1000
  12. 0x7deaa
  13. raspi_read: from:30000 len:1000
  14. 0x7dea6
  15. ============================================
  16. Ralink UBoot Version: 4.3.S.0
  17. --------------------------------------------
  18. ASIC 7628_MP (Port5<->None)
  19. DRAM component: 512 Mbits DDR, width 16
  20. DRAM bus: 16 bit
  21. Total memory: 64 MBytes
  22. Flash component: SPI Flash
  23. Date:Sep 15 2014 Time:10:02:31
  24. ============================================
  25. icache: sets:512, ways:4, linesz:32 ,total:65536
  26. dcache: sets:256, ways:4, linesz:32 ,total:32768

  27.  ##### The CPU freq = 575 MHZ ####
  28.  estimate memory size =64 Mbytes
  29. RESET MT7628
  30. Please choose the operation:
  31.    1: Load system code to SDRAM via TFTP.
  32.    2: Load system code then write to Flash via TFTP.
  33.    3: Boot system code via Flash (default).
  34.    4: Entr boot command line interface.
  35.    7: Load Boot Loader code then write to Flash via Serial.
  36.    9: Load Boot Loader code then write to Flash via TFTP.
  37. default: 3 0
  38.    
  39. 3: System Boot system code via Flash.
  40. ## Booting image at bc050000 ...
  41. raspi_read: from:50000 len:40
  42. 0x1f9f
  43.    Image Name: MIPS OpenWrt Linux-3.18.7
  44.    Image Type: MIPS Linux Kernel Image (lzma compressed)
  45.    Data Size: 1185261 Bytes = 1.1 MB
  46.    Load Address: 80000000
  47.    Entry Point: 80000000
  48. raspi_read: from:50040 len:1215ed
  49. 0x8e51ad9
  50.    Verifying Checksum ... OK
  51.    Uncompressing Kernel Image ... OK
  52. No initrd
  53. ## Transferring control to Linux (at address 80000000) ...
  54. ## Giving linux memsize in MB, 64

  55. Starting kernel ...

  56. [ 0.000000] Linux version 3.18.7 (mango@mango-V) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r44581) ) #8 Wed Mar 4 09:42:31 EST 2015
  57. [ 0.000000] Board has DDR2
  58. [ 0.000000] Analog PMU set to hw control
  59. [ 0.000000] Digital PMU set to hw control
  60. [ 0.000000] SoC Type: Ralink MT7628AN ver:1 eco:2
  61. [ 0.000000] bootconsole [early0] enabled
  62. [ 0.000000] CPU0 revision is: 00019655 (MIPS 24KEc)
  63. [ 0.000000] MIPS: machine is Mediatek MT7628AN evaluation board
  64. [ 0.000000] Determined physical RAM map:
  65. [ 0.000000] memory: 02000000 @ 00000000 (usable)
  66. [ 0.000000] Initrd not found or empty - disabling initrd
  67. [ 0.000000] Zone ranges:
  68. [ 0.000000] Normal [mem 0x00000000-0x01ffffff]
  69. [ 0.000000] Movable zone start for each node
  70. [ 0.000000] Early memory node ranges
  71. [ 0.000000] node 0: [mem 0x00000000-0x01ffffff]
  72. [ 0.000000] Initmem setup node 0 [mem 0x00000000-0x01ffffff]
  73. [ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
  74. [ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
  75. [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
  76. [ 0.000000] Kernel command line: console=ttyS0,57600 root=/dev/mtdblock5 rootfstype=squashfs,jffs2
  77. [ 0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
  78. [ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
  79. [ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
  80. [ 0.000000] Writing ErrCtl register=0006eb40
  81. [ 0.000000] Readback ErrCtl register=0006eb40
  82. [ 0.000000] Memory: 28760K/32768K available (2586K kernel code, 131K rwdata, 536K rodata, 192K init, 186K bss, 4008K reserved)
  83. [ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
  84. [ 0.000000] NR_IRQS:256
  85. [ 0.000000] intc: using register map from devicetree
  86. [ 0.000000] CPU Clock: 580MHz
  87. [ 0.000000] clocksource_of_init: no matching clocksources found
  88. [ 0.000000] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
  89. [ 0.060000] pid_max: default: 32768 minimum: 301
  90. [ 0.060000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
  91. [ 0.070000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
  92. [ 0.080000] pinctrl core: initialized pinctrl subsystem
  93. [ 0.090000] NET: Registered protocol family 16
  94. [ 0.100000] rt2880-pinmux pinctrl: invalid group "jtag" for function "gpio"
  95. [ 0.120000] mt7621_gpio 10000600.gpio: registering 32 gpios
  96. [ 0.130000] mt7621_gpio 10000600.gpio: registering 32 gpios
  97. [ 0.140000] mt7621_gpio 10000600.gpio: registering 32 gpios
  98. [ 0.150000] Switched to clocksource MIPS
  99. [ 0.160000] NET: Registered protocol family 2
  100. [ 0.160000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
  101. [ 0.180000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
  102. [ 0.190000] TCP: Hash tables configured (established 1024 bind 1024)
  103. [ 0.200000] TCP: reno registered
  104. [ 0.210000] UDP hash table entries: 256 (order: 0, 4096 bytes)
  105. [ 0.220000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
  106. [ 0.230000] NET: Registered protocol family 1
  107. [ 0.240000] futex hash table entries: 256 (order: -1, 3072 bytes)
  108. [ 0.260000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
  109. [ 0.270000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
  110. [ 0.300000] msgmni has been set to 56
  111. [ 0.310000] io scheduler noop registered
  112. [ 0.320000] io scheduler deadline registered (default)
  113. [ 0.330000] drivers/phy/phy-ralink-usb.c:ralink_usb_phy_probe[147]
  114. [ 0.340000] drivers/phy/phy-ralink-usb.c:ralink_usb_phy_probe[161]
  115. [ 0.360000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
  116. [ 0.370000] rt2880-pinmux pinctrl: invalid group "uart0" for function "uart"
  117. [ 0.380000] console [ttyS0] disabled
  118. [ 0.390000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A
  119. [ 0.410000] console [ttyS0] enabled
  120. [ 0.410000] console [ttyS0] enabled
  121. [ 0.420000] bootconsole [early0] disabled
  122. [ 0.420000] bootconsole [early0] disabled
  123. [ 0.440000] m25p80 spi32766.0: found s25fl064k, expected en25q64
  124. [ 0.450000] m25p80 spi32766.0: s25fl064k (8192 Kbytes)
  125. [ 0.460000] m25p80 spi32766.0: using chunked io
  126. [ 0.470000] 4 ofpart partitions found on MTD device spi32766.0
  127. [ 0.490000] Creating 4 MTD partitions on "spi32766.0":
  128. [ 0.500000] 0x000000000000-0x000000030000 : "u-boot"
  129. [ 0.510000] 0x000000030000-0x000000040000 : "u-boot-env"
  130. [ 0.520000] 0x000000040000-0x000000050000 : "factory"
  131. [ 0.530000] 0x000000050000-0x000000800000 : "firmware"
  132. [ 0.570000] 2 uimage-fw partitions found on MTD device firmware
  133. [ 0.590000] 0x000000050000-0x00000017162d : "kernel"
  134. [ 0.600000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
  135. [ 0.620000] 0x00000017162d-0x000000800000 : "rootfs"
  136. [ 0.630000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
  137. [ 0.660000] mtd: device 5 (rootfs) set to be root filesystem
  138. [ 0.670000] 1 squashfs-split partitions found on MTD device rootfs
  139. [ 0.680000] 0x0000002e0000-0x000000800000 : "rootfs_data"
  140. [ 0.700000] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq 5
  141. [ 0.720000] mt7621_wdt 10000120.watchdog: Initialized
  142. [ 0.730000] MTK MSDC device init.
  143. [ 0.730000] mtk-sd: MediaTek MT6575 MSDC Driver
  144. [ 0.740000] TCP: cubic registered
  145. [ 0.750000] NET: Registered protocol family 17
  146. [ 0.760000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
  147. [ 0.780000] 8021q: 802.1Q VLAN Support v1.8
  148. [ 0.810000] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
  149. [ 0.820000] Freeing unused kernel memory: 192K (80330000 - 80360000)
  150. [ 2.610000] init: Console is alive
  151. [ 2.620000] init: - watchdog -
  152. [ 3.650000] usbcore: registered new interface driver usbfs
  153. [ 3.660000] usbcore: registered new interface driver hub
  154. [ 3.670000] usbcore: registered new device driver usb
  155. [ 3.680000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
  156. [ 3.700000] ehci-platform: EHCI generic platform driver
  157. [ 3.910000] phy phy-usbphy.0: remote usb device wakeup disabled
  158. [ 3.920000] phy phy-usbphy.0: UTMI 16bit 30MHz
  159. [ 3.930000] ehci-platform 101c0000.ehci: EHCI Host Controller
  160. [ 3.940000] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
  161. [ 3.960000] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
  162. [ 3.990000] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
  163. [ 4.000000] hub 1-0:1.0: USB hub found
  164. [ 4.010000] hub 1-0:1.0: 1 port detected
  165. [ 4.020000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
  166. [ 4.030000] ohci-platform: OHCI generic platform driver
  167. [ 4.040000] ohci-platform 101c1000.ohci: Generic Platform OHCI controller
  168. [ 4.050000] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2
  169. [ 4.070000] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
  170. [ 4.140000] hub 2-0:1.0: USB hub found
  171. [ 4.150000] hub 2-0:1.0: 1 port detected
  172. [ 4.630000] init: - preinit -
  173. [ 4.960000] rt305x-esw 10110000.esw: link changed 0x00
  174. [ 5.140000] random: mktemp urandom read with 7 bits of entropy available
  175. Press the [f] key and hit [enter] to enter failsafe mode
  176. Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
  177. [ 8.010000] rt305x-esw 10110000.esw: link changed 0x01
  178. [ 8.540000] jffs2: notice: (310) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
  179. [ 8.570000] mount_root: switching to jffs2 overlay
  180. [ 8.610000] procd: - early -
  181. [ 8.610000] procd: - watchdog -
  182. [ 9.390000] procd: - ubus -
  183. [ 10.410000] procd: - init -
  184. Please press Enter to activate this console.
  185. [ 11.010000] NET: Registered protocol family 10
  186. [ 11.020000] ip6_tables: (C) 2000-2006 Netfilter Core Team
  187. [ 11.050000] ip_tables: (C) 2000-2006 Netfilter Core Team
  188. [ 11.070000] nf_conntrack version 0.5.0 (452 buckets, 1808 max)
  189. [ 11.120000] xt_time: kernel timezone is -0000
  190. [ 11.140000] PPP generic driver version 2.4.2
  191. [ 11.150000] NET: Registered protocol family 24
  192. [ 13.960000] rt305x-esw 10110000.esw: link changed 0x00



  193. BusyBox v1.22.1 (2015-03-01 08:16:00 EST) built-in shell (ash)
  194. Enter 'help' for a list of built-in commands.

  195.   _______ ________ __
  196.  | |.-----.-----.-----.| | | |.----.| |_
  197.  | - || _ | -__| || | | || _|| _|
  198.  |_______|| __|_____|__|__||________||__| |____|
  199.           |__| W I R E L E S S F R E E D O M
  200.  -----------------------------------------------------
  201.  CHAOS CALMER (Bleeding Edge, r44581)
  202.  -----------------------------------------------------
  203.   * 1 1/2 oz Gin Shake with a glassful
  204.   * 1/4 oz Triple Sec of broken ice and pour
  205.   * 3/4 oz Lime Juice unstrained into a goblet.
  206.   * 1 1/2 oz Orange Juice
  207.   * 1 tsp. Grenadine Syrup
  208.  -----------------------------------------------------
  209. root@OpenWrt:/# [ 15.710000] device eth0.1 entered promiscuous mode
  210. [ 15.720000] device eth0 entered promiscuous mode
  211. [ 15.770000] br-lan: port 1(eth0.1) entered forwarding state
  212. [ 15.780000] br-lan: port 1(eth0.1) entered forwarding state
  213. [ 17.030000] rt305x-esw 10110000.esw: link changed 0x01
  214. [ 17.780000] br-lan: port 1(eth0.1) entered forwarding state
  215. [ 78.990000] random: nonblocking pool is initialized

  216. root@OpenWrt:/#
  217. root@OpenWrt:/#

                
阅读(22506) | 评论(3) | 转发(0) |
给主人留下些什么吧!~~

CallAck2017-05-09 11:33:30

怎么会找不到呢?起先甚至都没有mtdblock5 这一句,后来网上搜罗一番,发现两个问题:1、MT7628的uboot,根本没给kernel传递cmdargs。2、内核的dts文件,也没有root=xxxx。
只有简单的一句:
/target/linux/ramips/dts/mt7628an.dtsi               
chosen {
                bootargs = \"console=ttyS0,57600\";
        };
 
后来我果断增加=/dev/mtdblock5,问题解决。

这个代码,具体怎么添加的,遇到了相同的问题?

zl3084242015-07-09 21:28:37

爱笑的小子:楼主,mt7628a的平台,是用的什么硬件平台,那里购买的,我也想开发mt7628,谢谢!

mt7688/mt7628模块,可以关注下。http://item.taobao.com/item.htm?spm=a230r.1.14.137.c6MyZh&id=520446322687&ns=1&abbucket=15#detail

回复 | 举报

爱笑的小子2015-04-03 19:36:34

楼主,mt7628a的平台,是用的什么硬件平台,那里购买的,我也想开发mt7628,谢谢!