JSFF2 mount fail

来源:互联网 发布:编程语言排行榜2017 8 编辑:程序博客网 时间:2024/06/06 19:00

1. 使用dd将jsff2分区全部填满垃圾速度后,重新开机 提示magic bitmask 0x1985 not found。

解决方法:使用flash_eraseall将整个分区擦除,重新mount即可。


2. mount jsff2 小于0x40000返回-22.

因为如下c->flash_size < 4*c->sector_size,flash 分区大小小于4倍擦除大小时会返回失败。

int jffs2_do_fill_super(struct super_block *sb, void *data, int silent)
{
 struct jffs2_sb_info *c;
 struct inode *root_i;
 int ret;

 c = JFFS2_SB_INFO(sb);
 c->sector_size = c->mtd->erasesize;
 c->flash_size = c->mtd->size;
 if (c->flash_size < 4*c->sector_size) {
  printk(KERN_ERR "jffs2: Too few erase blocks (%d)/n",c->flash_size / c->sector_size);
  return -EINVAL;
 }
 c->cleanmarker_size = sizeof(struct jffs2_unknown_node);
 if (jffs2_cleanmarker_oob(c)) {  /* Cleanmarker is out-of-band, soinline size zero */
  c->cleanmarker_size = 0;
 }



0 0
原创粉丝点击