免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: bob2004
打印 上一主题 下一主题

jffs2 挂载的问题 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2008-03-30 03:01 |只看该作者
如果挂载jffs2的时候,出现类似于:

CLEANMARKER node found at 0x0042c000 has totlen 0xc != normal 0x0  

的问题,则见到网上说的办法:

在嵌入式Linux系统中挂载 jffs2 根文件系统

二、制作根文件系统的JFFS2镜像。使用MTD工具中的mkfs.jffs2命令,具体做法如下: mkfs.jffs2 -r /home/tekkamanninja/working/nfs/rootfs -o rootfs.jffs2 -e 0x4000 --pad=0x500000 -s 0x200 -n

各参数的意义:(1)-r : 指定要做成image的源資料夾.
(2)-o : 指定輸出image檔案的文件名.
(3)-e : 每一塊要抹除的block size,預設是64KB.要注意,不同的flash, 其block size會不一樣.我的是三星的K9F1208U0B.
(4)--pad (-p): 用16進制來表示所要輸出檔案的大小,也就是root.jffs2的size。很重要的是, 為了不浪費flash空間, 這個值最好符合flash driver所規劃的區塊大小.以我的板子來說,就是5MB.
(5)如果挂载后会出现类似:CLEANMARKER node found at 0x0042c000 has totlen 0xc != normal 0x0   的警告,则加上 -n 就会消失。
(6) 还有的选项,自己看帮助!-h


不过,貌似网上记得有人说过,这样最好还是加上:

What is cleanmarker and what it is used for ?

Cleanmarker is a special JFFS2 node which is written to the beginning of
a block just after the block has been erased. On NOR flashes it is a
special small JFFS2 node at the beginning of the block. On NAND flashes
it is placed to the spare area of the first page.

The main reason why cleanmarkers are used is the need to be sure that
the block erase operation was correctly completed. All 0xFF bytes in the
block are not necessarily mean the block is ready to be utilized. For
example, if an unclean reboot happened just at the end of the block
erase cycle, the block might have unstable bits, which are read as "1"
one time and might be read as "0" next time.

When preparing a flash partition for JFFS2, it is recommended to put
cleanmarkers to the erased blocks. This might be done my means of "-j"
option of the "flash_eraseall" MTD utility. Otherwise, JFFS2 will re-
erase the blocks which contain all 0xFF and have no cleanmarker. This is
an unneeded wasting of time.

但是呢,对于大家常见的,也极少出现reboot的情况,所以我们在保证在对nand flash上分区制作jffs2的时候(???),没有reboot,这时候,就可以去掉那个 了,也就是加上 -n 或者 --no-cleanmarker

就像这这位说的:

http://lists.infradead.org/piper ... 04-June/009835.html

> Hi,
> I'm playing with jffs2 on NAND chips (Samsung 128Mbyte), MTD CVS is week
> old and kernel is 2.6.5.
>
> I'm making image with
> ./mkfs.jffs2 -b --eraseblock=131072 --pagesize=2048 -p -r /test_root -v -o
> test_root.img
>
> and then copy it with cp (nandwrite seems to have problems wiht endianess). > Everything work fine except on mounting filesystem I have messages:
>
> CLEANMARKER node found at 0x00000000 has totlen 0xc != normal 0x0
> CLEANMARKER node found at 0x00020000 has totlen 0xc != normal 0x0
> CLEANMARKER node found at 0x00040000 has totlen 0xc != normal 0x0

On NAND we store the cleanmarker (markes a clean erased block) in the out of
band area. So the cleanmarker node should be omitted when creating the fs
image. Add -n to the options
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP