博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
UBIFS image 用燒錄機燒後mount起來寫入會失敗
阅读量:4285 次
发布时间:2019-05-27

本文共 1724 字,大约阅读时间需要 5 分钟。

解決方法:在生成UBIFS image時加個-F參數即可

 

What is the the purpose of the -F (--space-fixup) mkfs.ubifs option?

 

Because of subtle ECC errors that can arise when programming NAND flash (see here), ubiformat is the recommended way of flashing a UBI image which contains a UBIFS file system. However, this is not always possible - for example, some embedded devices are manufactured using an industrial NAND flash programmer which has no knowledge of UBI or UBIFS.

 

The -F option causes mkfs.ubifs to set a special flag in the superblock, which triggers a "free space fixup" procedure in the kernel the very first time the filesystem is mounted. This fixup procedure involves finding all empty pages in the UBIFS file system and re-erasing them. This ensures that NAND pages which contain all 0xFF data get fully erased, which removes any problematic non-0xFF data from their OOB areas.

 

Of course it is not possible to re-erase individual NAND pages, and entire PEBs are erased. UBIFS performs this procedure by reading the useful (non 0xFF'ed) contents of LEBs and then invoking the atomic LEB change UBI operation. Obviously, this means that UBIFS has to read and write a lot of LEBs which takes time. But this happens only once, and the "free space fixup" procedure then unsets the "fixup" UBIFS superblock flag.

 

This option is supported if you are running a kernel version 3.0 or higher, or if you have pulled the changes from a UBIFS back-port tree. Note that ubiformat is still the preferred flashing method if the image is not being flashed for the first time, since it preserves existing erase counters (while using nandwrite or its equivalent does not).

 

 

Reference:

http://www.linux-mtd.infradead.org/faq/ubifs.html#L_free_space_fixup

转载地址:http://zwpgi.baihongyu.com/

你可能感兴趣的文章
EntiryFramework中事务操作(二)TransactionScope
查看>>
EF获取非跟踪数据之DBSet.AsNoTracking()
查看>>
关于EF6.0整理
查看>>
C# using 关键字使用整理
查看>>
EF日期格式筛选_EF常用日期筛选逻辑整理
查看>>
EF日期筛选异常:SqlServer.DATEDIFF”函数的 DATEPART 参数必须是文字字符串。
查看>>
C# 托管资源 与 非托管资源
查看>>
C#析构函数
查看>>
C#IDisposable 接口&资源释放
查看>>
cssnext简介
查看>>
PostCss简介
查看>>
比较全的前端整理
查看>>
C# lock关键词/lock语句块、线程锁
查看>>
EF TransactionScope异常:分布式事务已完成。请将此会话登记到新事务或 NULL 事务中。
查看>>
EF 多线程TransactionScope事务异常"事务(进程 ID 58)与另一个进程被死锁在 锁 资源上,并且已被选作死锁牺牲品。请重新运行该事务。"
查看>>
TransactionScope线程安全问题整理
查看>>
关于EF上线文异常问题整理
查看>>
AngularJS路由之ui-router(三)大小写处理
查看>>
AngularJs checkbox绑定
查看>>
C# 扩展方法整理
查看>>