jffs2常见问题

转载 2017年01月23日 14:44:50

Question1:JFFS2 error: (1) jffs2_build_inode_pass1: child dir "alsa" (ino #1159) of dir ino #1074 appears to be a hard link 
JFFS2 error: (1) jffs2_build_inode_pass1: child dir "l" (ino #1170) of dir ino #1075 appears to be a hard link 
原由 : flash没有erase彻底.  

VFS: Mounted root (jffs2 filesystem) on device 31:1. Freeing init memory: 136K 
JFFS2 notice: (1) check_node_data: wrong data CRC in data node at 0x0f0a7f78: read 0x4462b066, calculated 0x48ea177f. 
JFFS2 error: (488) jffs2_do_read_inode_internal: Argh. Special inode #139 with mode 0x61b0 had more than one node iget() failed for ino #139 mknod: /dev/null: File exists 
Populating /dev using udev: udevd (499): /proc/499/oom_adj is deprecated, please use /proc/499/oom_score_adj instead. 
JFFS2 error: (500) jffs2_do_read_inode_internal: Argh. Special inode #1123 with mode 0x21b0 had more than one node iget() failed for ino #1123     


Question2:jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000024: 0x2b10 instead  
mkfs.jffs2 -s 的参数问题 对照FLASH的大小再重新生成镜像文件过即可 The answer this means that the data on your flash device is not a valid JFFS2 file system. 
There is no single solution for this problem, but we will try to provide you some ideas how to fix this.  
The first question you should try to answer is "why the data on my flash device is incorrect so that JFFS2 rejects to deal with it?". There are may be a plenty of reasons, e.g.:  
1. you flash driver is severely buggy so it reads trash instead of valid data;  

2. you flashed some trash instead of a valid JFFS2 image;  
3. you did not manage to flash JFFS2 image correctly so that you ended up with 
garbage on your flash, although the original image was perfectly fine; 

 4. you forgot to erase your flash before flashing it, etc.



Anyways, JFFS2 wouldn't complain if it was able to find correct data. As it does complain, there is something wrong with the data it reads.  
One common mistake is to use /dev/mtdX or /dev/mtdblockX devices to flash JFFS2 images on NAND flashes. E.g.  
cp jffs2_fs.img /dev/mtd2  
This is incorrect because when dealing with NAND flashes one has to skip bad 
eraseblocks and write only in NAND page size chunks. Please, use the nandwrite utility instead.  
Also please, do not forget to erase your flash before flashing the image. You may use the 
flash_eraseall utility for this. And it makes sense to make sure the erase functionality 
actually works by reading the erased MTD device back and checking that only 0xFF bytes were read.  
You may try to check if your flash driver works correctly and if you flashed the file system image correctly by means of reading the flash back after you have flashed your image, and compare the read image with the original one. Please, use the nandread utility to read from NAND flashes.  
You can also do the following experiment to make sure JFFS2 works well. Erase your MTD device and mount it to JFFS2. You will end up with an empty file system. Copy some files to the JFFS2 file system and unmount it. Then mount it again and see if it mounts without problems. If it does, this is most probably not a JFFS2 bug.  

 
Question3:Empty flash at 0xXXXXXXXX ends at 0xXXXXXXXX 
This message is generated if a block of data is partially written. It is generally not a sign of any problem.  

Question4:Name CRC failed on node at 0x00b620c8: Read 0x640c8ca3, calculated 0x795111fe 
重启,则不会有如上CRC错误信息。 问题原因: 
我在烧写jffs2 img之前,使用fis init -f 来擦除flash。fis init -f 命令执行完以后,flash空间就都是0xFF了!即使在mkfs.jffs2的时候使用'-p'参数指定最终输出img的大小,但是超出文件系统的部分也会被填充为0xFF!但这可不是jffs2的格式! 
我用fis create分了5M多(0x590000)的分区,但是jffs2fs.img只有不到3M(0x250000),那么把它烧写到flash以后,分区中除了jffs2 img之外剩余的flash空间(大概2M)全是0xFF,这不是jffs2要求的格式,所以,会发出CRC错误的信息。假如有一种工具,他可以将flash  format为jffs2的格式,那么就不会出现这个问题了。目前我还没有找到这种工具,但是,可以确信的是:上面的CRC错误是不影响jffs2文件系统的使用 
http://blog.chinaunix.net/space.php?uid=20727076&do=blog&id=1885384

Question5: VFS: Mounted root (jffs2 filesystem) readonly.  
Freeing unused kernel memory: 304k freed  Error -3 while decompressing!  804878c4(1884)->81200000(16384)  
Failed to execute /linuxrc. Attempting defaults...  
Kernel panic - not syncing: No init found. Try passing init= option to kernel.  
原由 : 没有仔细看 mkfs.jffs2 的手册, 须要指定-b参数, 大小与PAGE_SIZE一样 (查看.config文件 CONFIG_PAGE_SIZE_16KB=y). 

Question6: 
共提示以下几种错误: 
Empty flash at 0x00258c88 ends at 0x00258c8c 
jffs2_scan_inode_node(): CRC failed on node at 0x002873f0: Read 0x50dc72ec, calculated 0xafbffd1d 
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002d24ac: 0x000d instead JFFS2 notice: (1) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found. VFS: Mounted root (jffs2 filesystem). Freeing init memory: 124K 
JFFS2 notice: (1) check_node_data: wrong data CRC in data node at 0x00012000: read 0x1a9bfab2, calculated 0xdc27bef6. 
JFFS2 notice: (728) read_dnode: wrong data CRC in data node at 0x0000e438: read 0x3dcf6001, calculated 0xcb81f1ee. 
JFFS2 warning: (1) jffs2_do_read_inode_internal: no data nodes found for ino #14 JFFS2 notice: (1) jffs2_do_read_inode_internal: but it has children so we fake some modes for it 
Failed to execute /linuxrc. Attempting defaults... 
Kernel panic - not syncing: No init found. Try passing init= option to kernel. 分析: 
记得JFFS2是采用自己的ECC算法,但是在内核中又打开了S3C2410_HARDWARE_ECC 解决方案: 去掉硬件ECC

JFFS2文件系统的异常打印信息记录

在嵌入式产品中,使用JFFS2文件系统时,会遇到很多奇怪的打印: JFFS2 notice: (154) check_node_data: wrong data CRC in data node a...
  • coobutter
  • coobutter
  • 2014年12月12日 16:38
  • 406

jffs2_scan_inode_node(): Data CRC failed on node at ... Read ... calculated ...

【问题】jffs2_scan_inode_node(): Data CRC failed on node at ... Read ... calculated ... Empty flash at ...
  • junllee
  • junllee
  • 2012年08月03日 23:43
  • 3428

用mkfs.jffs2 命令制作jffs2镜像文件 (转)

 下载:ftp://sources.redhat.com/pub/jffs2/mkfs.jffs2或者使用命令:apt-get install mtd-utils命令使用实例:mkfs.jffs2  ...
  • itismine
  • itismine
  • 2009年11月06日 11:43
  • 25622

编译jffs2报struct addrinfo storage size isn't known错误

make[2]: Entering directory `/hisdk/Hi3536_SDK_V2.0.6.0/osdrv/tools/pc/jffs2_tool/tmp/mtd-utils-1.5....
  • remme123
  • remme123
  • 2017年03月15日 10:25
  • 1883

jffs2文件系统磁盘写入

在jffs2写入其实是一个页写入(不管是nand flash还是nor flash,无非norflash的页大小是1)。 当wbuf_len不足pagesize的时候,pagesize-wbufle...
  • fenglifeng1987
  • fenglifeng1987
  • 2013年01月25日 17:04
  • 2346

jffs2文件系统制作与移植(二)

****************************************************************************************************...
  • sonbai
  • sonbai
  • 2013年04月24日 12:38
  • 2762

文件系统的扩展属性:xattr命令

在 Mac OS X 下的 hfs+ 文件系统上,文件经常会被附加上 Mac 专有的扩展属性。比如 $ ls -l total 0 -rw-r--r--@ 1 daniel staff 0 16 ...
  • u010951938
  • u010951938
  • 2015年01月22日 22:25
  • 2297

ext2文件系统源代码之xattr.c

今天我们来看ext2的扩展属性的主要文件xattr.c,内部有扩展属性的最重要的代码实现,但是文件也真的很长,我们来开始吧。 /* 作者版权信息 * linux/fs/ext2/xattr.c ...
  • lwy313722871
  • lwy313722871
  • 2016年03月25日 21:02
  • 995

JFFS2文件系统挂载过程优化的分析报告

一 问题描述 在上电启动优化中发现Linux系统下挂载JFFS2文件系统耗时较长,以128M的NOR FLASH为例,用时接近20秒。后续单板的FLASH容量为256M,时间会更长。如此长的挂载时间...
  • lh2016rocky
  • lh2016rocky
  • 2017年01月23日 14:14
  • 366

xattr-文件系统扩展属性

简介: xattr扩展,允许操作 '文件系统的扩展属性' 安装: 1.为了使用xattr,需要安装 'libattr'。 2.切记: xattr扩展函数,仅仅作用于支持 '扩展属性...
  • beyond__devil
  • beyond__devil
  • 2016年12月20日 23:57
  • 1955
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:jffs2常见问题
举报原因:
原因补充:

(最多只允许输入30个字)