浅谈更新linux-3.2.5(6)文件系统的加载.docx

上传人:hw****26 文档编号:3115113 上传时间:2019-05-21 格式:DOCX 页数:4 大小:18.52KB
下载 相关 举报
浅谈更新linux-3.2.5(6)文件系统的加载.docx_第1页
第1页 / 共4页
浅谈更新linux-3.2.5(6)文件系统的加载.docx_第2页
第2页 / 共4页
浅谈更新linux-3.2.5(6)文件系统的加载.docx_第3页
第3页 / 共4页
浅谈更新linux-3.2.5(6)文件系统的加载.docx_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

1、技术交流群 linux+wince+android(122879839)作者:卢浩浅谈更新 linux-3.2.5(6 )文件系统的加载VFS: Cannot open root device “mtdblock2“ or unknown-block(0,0)Please append a correct “root=“ boot option; here are the available partitions:Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) (unwind_back

2、trace+0x0/0xf8) from (panic+0x58/0x1bc) (panic+0x58/0x1bc) from (mount_block_root+0x10c/0x2bc) (mount_block_root+0x10c/0x2bc) from (prepare_namespace+0x14c/0x1dc) (prepare_namespace+0x14c/0x1dc) from (kernel_init+0xe4/0x124) (kernel_init+0xe4/0x124) from (kernel_thread_exit+0x0/0x8)在 OK6410上出现如上的错误,

3、不能加载系统 VFS: Cannot open root device “mtdblock2“ or unknown-block(2,0) 系统启动后,虽然 nand 驱动表现正常,但是最后挂载 rootfs 时候出错:Kernel command line: root=/dev/mtdblock2 rw init=/linuxrc console=ttyAMA1,115200 mem=64M rootfstype=yaffs2。AS353X NAND Driver, (c) 2010 austriamicrosystemsas353x_nand_probeNand clock set to

4、24000000Nand:res-start at e60000Nand:mapped registers at c48dc000as353x_nand_inithwNand:initialising set 0 (c3a62800, info c3a934e0)as353x_nand_init_chipNAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V 8-bit)Scanning device for bad blocksBad eraseblock 2262 at 0x11ac0000Bad

5、eraseblock 3151 at 0x189e0000Bad eraseblock 3649 at 0x1c820000Bad eraseblock 5198 at 0x289c0000Bad eraseblock 6842 at 0x35740000as353x_nand_add_partitionCreating 5 MTD partitions on “NAND 1GiB 3,3V 8-bit“:0x00000000-0x00100000 : “U-Boot“0x00100000-0x00900000 : “Kernel“0x00900000-0x0d100000 : “Root f

6、ilesystem“0x0d100000-0x11100000 : “Temp“技术交流群 linux+wince+android(122879839)作者:卢浩0x11100000-0x3d700000 : “Data“Nand:initialised ok。Root-NFS: No NFS server available, giving up.VFS: Unable to mount root fs via NFS, trying floppy.VFS: Cannot open root device “mtdblock2“ or unknown-block(2,0)Please app

7、end a correct “root=“ boot option; here are the available partitions:Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)【解决过程】1.开始以为 rootfs 里面没有/dev/mtdblock2 这个设备呢,后去制作 rootfs 的所用的文件那里查证,rootfs 里面是有这些设备的:crifanlinux-41lh root$ls dev/mtd* -l-rw-r- 1 eric develop 0 2010-01-

8、12 13:58 dev/mtd0-rw-r- 1 eric develop 0 2010-01-12 13:58 dev/mtd1-rw-r- 1 eric develop 0 2010-01-12 13:58 dev/mtd2-rw-r- 1 eric develop 0 2010-01-12 13:58 dev/mtd3-rw-r- 1 eric develop 0 2010-01-12 13:58 dev/mtdblock0-rw-r- 1 eric develop 0 2010-01-12 13:58 dev/mtdblock1-rw-r- 1 eric develop 0 2010

9、-01-12 13:58 dev/mtdblock2-rw-r- 1 eric develop 0 2010-01-12 13:58 dev/mtdblock3【!此理解错误-】此外,最后经证实和确定,系统访问/dev/mtdblock2 时候,这些块设备是系统内部生成的,即使你 rootfs 里面没建立这些设备文件,也是不影响的。2.以为 rootfs 数据有问题,后来发现,此时还未涉及到 rootfs 数据的读写,因为还没挂载成功呢。3.经过同事提醒,是否设置了 MTD 的 block device 支持。所以去内核源码处,查看配置:make ARCH=arm menuconfig在 de

10、vice drivers - Memory Technology Device (MTD) support -发现里面有个选项:Caching block device access to MTD devices经过看其 help:技术交流群 linux+wince+android(122879839)作者:卢浩Memory Technology Device (MTD) support -+| CONFIG_MTD: | | | | Memory Technology Devices are flash, RAM and similar chips, often | | used for s

11、olid state file systems on embedded devices. This option | | will provide the generic support for MTD drivers to register | | themselves with the kernel and for potential users of MTD devices | | to enumerate the devices which are present and obtain a handle on | | them. It will also allow you to se

12、lect individual drivers for | | particular hardware and users of MTD devices. If unsure, say N.和网上查找:7.1 MTD-Supported DevicesCaching block device access to MTD devices, CONFIG_MTD_BLOCKThis is the configuration option for the read-write block device MTD user module that is visible as /dev/mtdblockN

13、. If you configure this as a module, the modules filename is mtdblock.o.得知,这个就是对应的,mtd 的块设备的选项,因此,选上,重新编译,就可以加入 mtd 块设备的支持了。也就可以访问上面的/dev/mtdblcok2 了。【后记】1.经过实际测试发现,rootfs 中的/dev/mtdblockN ,还是有关系的,其系统访问此 mtd 块设备,还是会去访问此文件的,/dev/mtdblockN 会连接到底层对应的块设备,也就是这样是对的:rootlinux-41lh root$ls dev/mtd* -lcrw-r-

14、 1 root root 90, 0 2009-11-16 15:06 dev/mtd0crw-r- 1 root root 90, 2 2009-11-16 15:06 dev/mtd1技术交流群 linux+wince+android(122879839)作者:卢浩crw-r- 1 root root 90, 4 2009-11-16 15:06 dev/mtd2crw-r- 1 root root 90, 6 2009-11-16 15:06 dev/mtd3crwxr-xr-x 1 root root 90, 8 2009-11-16 15:06 dev/mtd4brw-r- 1 ro

15、ot root 31, 0 2009-11-16 15:06 dev/mtdblock0brw-r- 1 root root 31, 1 2009-11-16 15:06 dev/mtdblock1brw-r- 1 root root 31, 2 2009-11-16 15:06 dev/mtdblock2brw-r- 1 root root 31, 3 2009-11-16 15:06 dev/mtdblock3brwxr-xr-x 1 root root 31, 4 2009-11-16 15:06 dev/mtdblock4而上面我们看到的:-rw-r- 1 eric develop 0 2010-01-12 13:58 dev/mtdblock2这个明显不是设备文件,所以是不正常的。因此,需要生成对应的设备文件放到 rootfs 里面,然后重新执着 roofs 镜像文件(此处我这里是用 mkyaffs2image 去对 root/文件夹及其下面的文件,制作出来 yaffs2 的 rootfs 文件的)。参考 http:/

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育教学资料库 > 精品笔记

Copyright © 2018-2021 Wenke99.com All rights reserved

工信部备案号浙ICP备20026746号-2  

公安局备案号:浙公网安备33038302330469号

本站为C2C交文档易平台,即用户上传的文档直接卖给下载用户,本站只是网络服务中间平台,所有原创文档下载所得归上传人所有,若您发现上传作品侵犯了您的权利,请立刻联系网站客服并提供证据,平台将在3个工作日内予以改正。