如何制作公司免费网站,网上购物商城系统论文,有什么做衣服的网站,网站建设 软件开发一个朋友的问题#xff0c;我们共同分析后搞定。其实以前也遇到过同样问题#xff0c;时间长了#xff0c;没总结。 事发#xff1a;在Nand Flash上使用2.6.14的linux kernel#xff0c;三星2440的板子#xff0c;连续写入文件#xff0c;到一定大小限制就删除#xff…一个朋友的问题我们共同分析后搞定。其实以前也遇到过同样问题时间长了没总结。 事发在Nand Flash上使用2.6.14的linux kernel三星2440的板子连续写入文件到一定大小限制就删除文件写入没有超过flash保留10%的空闲应该说还差很多。 第一步不适用syslog写换做自己写代码写入出现几率降低
第二步fwrite换成write几率增加很快就坏。 坏的时候提示yaffs tragedy: no more eraased blocks !!!!!!!!! Allocator out !!!!!!!!!!!!!!!!! 重新启动就会标出很多坏块bad block...当然是假的一格式化就好。 第三步朋友说用2.6.34的内核没有问题但从14移到34需要修改的驱动之类太多数据结构变化太大。
第四步我想起以前说起nand时候mtd校验和yaffs校验不能同时开启。
第五步让在14内核上关闭yaffs软校验开启mtd nand硬件校验出现mtd ecc error unfixed on chunk 26784
第六步14内核关闭mtd nand硬件校验使用yaffs软校验出现 VFS: Mounted root (cramfs filesystem) readonly. Mounted devfs on /dev Freeing init memory: 108K Error -3 while decompressing! c02ccb50(312)-c3cc0000(4096) Failed to execute /linuxrc. Attempting defaults... Kernel panic - not syncing: No init found. Try passing init option to kernel. 然后想了想。
34可以14同样的配置不可以应该是软件差异。查看14下yaffs的版本挺老。朋友说34下的yaffs拿过去编译无法通过。
我从这边使用的18内核抠出来yaffs部分给他这个yaffs是
Id: yaffs_mtdif.c,v 1.22 2009/03/06 17:20:51 wookey Exp $; 编译还是有一个头文件linux/uaccess.h找不到屏蔽之OK。 再编译使用mtd的硬nand ecc关闭yaffs own ecc测试OK写文件OK写入断电 OK。 总结主要就是两种ECC冲突的事情yaffs官网上写道 Nand interface: For yaffs to function, it must be able to be the only code that writes to the oob area on the NAND device. The existing NAND driver in kernel 2.4.19 assumes that it will do the ecc/oob management for the host fs. For yaffs, this is quite wrong. You can disable ecc/oob calculations either by hand patching the mtd code to bypass ecc calculations or by merging the latest mtd cvs. 当然这针对2.4的内核莫非2.6也涛声依旧