打印
[技术问答]

[NUC975]NAND MTD partition挂载失败

[复制链接]
350|3
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
jcky001|  楼主 | 2023-8-22 16:06 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
AN, IO, NAND, TI, mt
[    1.530000] NAND device: Manufacturer ID: 0x01, Chip ID: 0xda (AMD/Spansion NAND 256MiB 3,3                                                                                                     V 8-bit), 256MiB, page size: 2048, OOB size: 64
[    1.540000] nand: SMRA size 64, 32
[    1.550000] Bad block table not found for chip 0
[    1.560000] Bad block table not found for chip 0
[    1.560000] Scanning device for bad blocks
[    1.810000] Bad eraseblock 2036 at 0x00000fe80000
[    1.810000] Bad eraseblock 2038 at 0x00000fec0000
[    1.820000] Bad eraseblock 2039 at 0x00000fee0000
[    1.820000] Bad eraseblock 2040 at 0x00000ff00000
[    1.830000] Bad eraseblock 2042 at 0x00000ff40000
[    1.830000] Bad eraseblock 2044 at 0x00000ff80000
[    1.840000] Bad eraseblock 2045 at 0x00000ffa0000
[    1.840000] Bad eraseblock 2046 at 0x00000ffc0000
[    1.850000] Bad eraseblock 2047 at 0x00000ffe0000
[    1.850000] No space left to write bad block table

使用特权

评论回复
沙发
riplay| | 2023-8-23 09:40 | 只看该作者
No space left to write bad block table
原因是没有空间存BBT,Linux MTD nand driver有要求最后4个block需要是好块,而当前flash最后的block都是坏块
参考:https://static.lwn.net/kerneldoc/driver-api/mtdnand.html
  • Number of reserved blocks
    For automatic placement some blocks must be reserved for bad block table storage. The number of reserved blocks is defined in the maxblocks member of the bad block table description structure. Reserving 4 blocks for mirrored tables should be a reasonable number. This also limits the number of blocks which are scanned for the bad block table ident pattern.

Linux 驱动中可通过修改这个定义放大BBT reserved block
./drivers/mtd/nand/diskonchip.c:#define INFTL_BBT_RESERVED_BLOCKS 4

使用特权

评论回复
板凳
cr315| | 2023-9-20 10:17 | 只看该作者
硬件如NAND闪存本身的问题或者配置的问题吧,你应该检查你的挂载命令以及/或启动脚本,确保它们是正确的。

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1504

主题

4518

帖子

6

粉丝