使用的bootloader:redboot
kernel版本:2.6.29
flash类型:NOR FLASH.
制作jffs2的命令:
mkfs.jffs2 -U -d /mnt/winF/tet/romfs -D devtable.jffs2.txt -l -e 0x10000 -p -n -o /tftpboot/jffs2fs.img
"-e":表示flash的擦除块大小为0x10000,这个值很重要,可以从datasheet中得到。
"-p":
Pad output to SIZE bytes with 0xFF. If SIZE is not specified, the output is padded to the end of the final erase block.
烧写命令:
load -r -v -h 172.21.73.101 -b 0x8000 kernel.lzo
fis create -b 0x8000 -l 0x200000 -s 0x200000 -f 0x7F060000 -e 0x8000 kernel.lzo
load -r -v -h 172.21.73.101 -b 0x100000 jffs2fs.img
fis write -b 0x100000 -f 0x7F260000 -l 0x250000
fis create -f 0x7F260000 -l 0x590000 jffs2.img
reset
问题描述:
第一次启动,会出现CRC错误信息,如下:
Shell invoked to run file: /etc/rc
Welcome to
____ _ _
/ __| ||_|
_ _| | | | _ ____ _ _ _ _
| | | | | | || | _ \| | | |\ \/ /
| |_| | |__| || | | | | |_| |/ \
| ___\____|_||_|_| |_|\____|\_/\_/
| |
|_| ADVANTECH eAutomation
For further information check:
Execution Finished, Exiting
Sash command shell (version 1.1.1)
/> JFFS2 notice: (164) jffs2_get_inode_nodes: Node header CRC failed at 0x06ddc8. {ff5c,ff5c,ff5cff5c,6cedd300}
JFFS2 notice: (164) jffs2_get_inode_nodes: Node header CRC failed at 0x06c8c4. {ff5c,ff5c,ff5cff5c,ff5cff5c}
JFFS2 notice: (164) jffs2_get_inode_nodes: Node header CRC failed at 0x06b3c0. {ff5c,ff5c,ff5cff5c,ff5cff5c}
JFFS2 notice: (164) check_node_data: wrong data CRC in data node at 0x0006d394: read 0xc96c7e1f, calculated 0xc6974f8f.
JFFS2 notice: (164) check_node_data: wrong data CRC in data node at 0x0006be3c: read 0xfaffca56, calculated 0x4e72e8e5.
JFFS2 notice: (164) jffs2_get_inode_nodes: Node header CRC failed at 0x071460. {ff1c,ff1c,ff1cff1c,ff1cff1c}
JFFS2 notice: (164) read_dnode: node CRC failed on dnode at 0x0709ac: read 0x8db9f359, calculated 0x22676b8
JFFS2 notice: (164) jffs2_get_inode_nodes: Node header CRC failed at 0x06fea4. {ff1c,ff1c,ff1cff1c,ff1cff1c}
JFFS2 notice: (164) jffs2_get_inode_nodes: Node header CRC failed at 0x06f3b4. {1985,e002,0000df5e,a5032844}
JFFS2 notice: (164) read_dnode: node CRC failed on dnode at 0x06e91c: read 0x603ebf95, calculated 0x28f62bdb
JFFS2 notice: (164) check_node_data: wrong data CRC in data node at 0x00071d6c: read 0xe3e40d9c, calculated 0x3b79fefa.
JFFS2 warning: (164) jffs2_do_read_inode_internal: Truncating ino #29 to 23732 bytes failed because it only had 12288 bytes to start with!
JFFS2 notice: (164) check_node_data: wrong data CRC in data node at 0x0007c694: read 0xe9808a11, calculated 0x98c8ae6e.
JFFS2 notice: (164) check_node_data: wrong data CRC in data node at 0x00076ba0: read 0x8207a914, calculated 0xa68949a.
0x090240. {ff5c,ff5c,ff5cff5c,ff5cff5c}
JFFS2 notice: (164) jffs2_get_inode_nodes: Node header CRC failed at 0x08dc84. {ff1c,ff1c,ff1cff1c,ff1cff1c}
Node totlen on flash (0xdf1edf1e) != totlen from node ref (0x000009d8)
JFFS2 notice: (164) jffs2_get_inode_nodes: Node header CRC failed at 0x08d1e8. {1985,e002,ff5cff5c,415e1f8f}
JFFS2 notice: (164) read_dnode: node CRC failed on dnode at 0x08c7b4: read 0x62c24375, calculated 0x4b07ea0
JFFS2 notice: (164) jffs2_get_inode_nodes: Node header CRC failed at 0x08b19c.
/>
重启,则不会有如上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文件系统的使用的!
阅读(10965) | 评论(5) | 转发(1) |