jffs2文件系统挂载问题

出错信息:

Empty flash at 0x01cdfffc ends at 0x01ce0000
CLEANMARKER node found at 0x01ce0000, not first node in block (0x01cc0000)

......
Empty flash at 0x01cefffc ends at 0x01cf0000
CLEANMARKER node found at 0x01cf0000, not first node in block (0x01cc0000)

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01cfbfb8: 0x7de7 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01cfbfbc: 0xe9cf instead
VFS: Mounted root (jffs2 filesystem).
Mounted devfs on /dev
Freeing init memory: 108K
jffs2_reserve_space(): Low on dirty space to GC, but it's a deletion. Allowing...
VFS: Can't find ext2 filesystem on dev hdb1.

Can't activate this console

Please press Enter to activate this console. Using fallback suid method

 

分析可能原因:

1.擦写flash时出错

2.console设置错误

 

查找了相关资料,首先解决第一个问题:

制作jffs2根文件系统时有一个参数是指定flash每一块要擦除的block size ,预设是64KB。要注意的是不同的flash,block size不一样。

YLE270的NOR Flash:32MByte存储器(2片intel E28F128组成32位接口)p { margin-bottom: 0.21cm; R R 

查阅E28F128的DATASHEET可知,其为16位32MByte存储器,块大小1MBit/block。

所以YLE270每次擦写32位的块大小应为2MBit。即2×220 /23 Byte=218 Byte,转换为16进制为0x40000(二进制转换十六进制:从低位开始,连续四位划分为一位)。

解决办法:

制作根文件时指定块大小为0x40000,执行: p { margin-bottom: 0.21cm; }

./mkfs.jffs2 -r rootfs -o rootfs.jffs2 -e 0x40000

重新烧写文件系统后启动正常:

 

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01ce5df0: 0x1fc5 id
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01ce5df4: 0xf89a id
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01ce5df8: 0xc74c id
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01ce5dfc: 0x6168 id
VFS: Mounted root (jffs2 filesystem).

Mounted devfs on /dev                                                          
Freeing init memory: 108K                                                      
Using fallback suid method                                                     
Using fallback suid method                                                     
Using fallback suid method                                                     
Using fallback suid method                                                     
                                                                               
Please press Enter to activate this console. Using fallback suid method        
Using fallback suid method                                                     
                                                                               
Please press Enter to activate this console.                                   
bash-2.05b#

你可能感兴趣的:(jffs2文件系统挂载问题)