我正在运行5.4
内核并创建了以下 MTD 分区(使用 MFD)。
$ cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00020000 "part1"
mtd1: 00040000 00020000 "part2"
mtd2: 00040000 00020000 "part3"
mtd3: 01200000 00020000 "part4"
mtd4: 00080000 00020000 "part5"
mtd5: 00400000 00020000 "part6"
我ubiformat
在 mtd3 上做过:
$ubiformat /dev/mtd3 -y -v
ubiformat: mtd3 (nor), size 18874368 bytes (18.0 MiB), 144 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 1 bytes
libscan: start scanning eraseblocks 0-144
libscan: scanning eraseblock 0: alien
libscan: scanning eraseblock 1: alien
libscan: scanning eraseblock 2: alien
libscan: scanning eraseblock 3: alien
libscan: scanning eraseblock 4: alien
libscan: scanning eraseblock 5: alien
libscan: scanning eraseblock 6: alien
libscan: scanning eraseblock 7: alien
libscan: scanning eraseblock 8: alien
libscan: scanning eraseblock 9: alien
libscan: scanning eraseblock 10: alien
libscan: scanning eraseblock 11: alien
libscan: scanning eraseblock 12: alien
libscan: scanning eraseblock 13: alien
libscan: scanning eraseblock 14: alien
libscan: scanning eraseblock 15: alien
libscan: scanning eraseblock 16: alien
libscan: scanning eraseblock 17: alien
libscan: scanning eraseblock 18: alien
libscan: scanning eraseblock 19: alien
libscan: scanning eraseblock 20: alien
libscan: scanning eraseblock 21: alien
libscan: scanning eraseblock 22: alien
libscan: scanning eraseblock 23: alien
libscan: scanning eraseblock 24: alien
libscan: scanning eraseblock 25: alien
libscan: scanning eraseblock 26: alien
libscan: scanning eraseblock 27: alien
libscan: scanning eraseblock 28: alien
libscan: scanning eraseblock 29: alien
libscan: scanning eraseblock 30: alien
libscan: scanning eraseblock 31: alien
libscan: scanning eraseblock 32: alien
libscan: scanning eraseblock 33: alien
libscan: scanning eraseblock 34: alien
libscan: scanning eraseblock 35: alien
libscan: scanning eraseblock 36: alien
libscan: scanning eraseblock 37: alien
libscan: scanning eraseblock 38: alien
libscan: scanning eraseblock 39: alien
libscan: scanning eraseblock 40: alien
libscan: scanning eraseblock 41: alien
libscan: scanning eraseblock 42: alien
libscan: scanning eraseblock 43: alien
libscan: scanning eraseblock 44: alien
libscan: scanning eraseblock 45: alien
libscan: scanning eraseblock 46: alien
libscan: scanning eraseblock 47: alien
libscan: scanning eraseblock 48: alien
libscan: scanning eraseblock 49: alien
libscan: scanning eraseblock 50: alien
libscan: scanning eraseblock 51: alien
libscan: scanning eraseblock 52: alien
libscan: scanning eraseblock 53: alien
libscan: scanning eraseblock 54: alien
libscan: scanning eraseblock 55: alien
libscan: scanning eraseblock 56: alien
libscan: scanning eraseblock 57: alien
libscan: scanning eraseblock 58: alien
libscan: scanning eraseblock 59: alien
libscan: scanning eraseblock 60: alien
libscan: scanning eraseblock 61: alien
libscan: scanning eraseblock 62: alien
libscan: scanning eraseblock 63: alien
libscan: scanning eraseblock 64: alien
libscan: scanning eraseblock 65: alien
libscan: scanning eraseblock 66: alien
libscan: scanning eraseblock 67: alien
libscan: scanning eraseblock 68: alien
libscan: scanning eraseblock 69: alien
libscan: scanning eraseblock 70: alien
libscan: scanning eraseblock 71: alien
libscan: scanning eraseblock 72: alien
libscan: scanning eraseblock 73: alien
libscan: scanning eraseblock 74: alien
libscan: scanning eraseblock 75: alien
libscan: scanning eraseblock 76: alien
libscan: scanning eraseblock 77: alien
libscan: scanning eraseblock 78: alien
libscan: scanning eraseblock 79: alien
libscan: scanning eraseblock 80: alien
libscan: scanning eraseblock 81: alien
libscan: scanning eraseblock 82: alien
libscan: scanning eraseblock 83: alien
libscan: scanning eraseblock 84: alien
libscan: scanning eraseblock 85: alien
libscan: scanning eraseblock 86: alien
libscan: scanning eraseblock 87: alien
libscan: scanning eraseblock 88: alien
libscan: scanning eraseblock 89: alien
libscan: scanning eraseblock 90: alien
libscan: scanning eraseblock 91: alien
libscan: scanning eraseblock 92: alien
libscan: scanning eraseblock 93: alien
libscan: scanning eraseblock 94: alien
libscan: scanning eraseblock 95: alien
libscan: scanning eraseblock 96: alien
libscan: scanning eraseblock 97: alien
libscan: scanning eraseblock 98: alien
libscan: scanning eraseblock 99: alien
libscan: scanning eraseblock 100: alien
libscan: scanning eraseblock 101: alien
libscan: scanning eraseblock 102: alien
libscan: scanning eraseblock 103: alien
libscan: scanning eraseblock 104: alien
libscan: scanning eraseblock 105: alien
libscan: scanning eraseblock 106: alien
libscan: scanning eraseblock 107: alien
libscan: scanning eraseblock 108: alien
libscan: scanning eraseblock 109: alien
libscan: scanning eraseblock 110: alien
libscan: scanning eraseblock 111: alien
libscan: scanning eraseblock 112: alien
libscan: scanning eraseblock 113: alien
libscan: scanning eraseblock 114: alien
libscan: scanning eraseblock 115: alien
libscan: scanning eraseblock 116: alien
libscan: scanning eraseblock 117: alien
libscan: scanning eraseblock 118: alien
libscan: scanning eraseblock 119: alien
libscan: scanning eraseblock 120: alien
libscan: scanning eraseblock 121: alien
libscan: scanning eraseblock 122: alien
libscan: scanning eraseblock 123: alien
libscan: scanning eraseblock 124: alien
libscan: scanning eraseblock 125: alien
libscan: scanning eraseblock 126: alien
libscan: scanning eraseblock 127: alien
libscan: scanning eraseblock 128: alien
libscan: scanning eraseblock 129: alien
libscan: scanning eraseblock 130: alien
libscan: scanning eraseblock 131: alien
libscan: scanning eraseblock 132: alien
libscan: scanning eraseblock 133: alien
libscan: scanning eraseblock 134: alien
libscan: scanning eraseblock 135: alien
libscan: scanning eraseblock 136: alien
libscan: scanning eraseblock 137: alien
libscan: scanning eraseblock 138: alien
libscan: scanning eraseblock 139: alien
libscan: scanning eraseblock 140: alien
libscan: scanning eraseblock 141: alien
libscan: scanning eraseblock 142: alien
libscan: scanning eraseblock 143: alien
libscan: finished, mean EC 0, 0 OK, 0 corrupted, 0 empty, 144 alien, bad 0
ubiformat: warning!: 144 of 144 eraseblocks contain non-UBI data
ubiformat: warning!: only 0 of 144 eraseblocks have valid erase counter
ubiformat: erase counter 0 will be used for all eraseblocks
ubiformat: note, arbitrary erase counter value may be specified using -e option
ubiformat: use erase counter 0 for all eraseblocks
ubiformat: eraseblock 0: erase, do not write EC, leave for vtbl
ubiformat: eraseblock 1: erase, do not write EC, leave for vtbl
ubiformat: eraseblock 2: erase, write EC 0
ubiformat: eraseblock 3: erase, write EC 0
ubiformat: eraseblock 4: erase, write EC 0
ubiformat: eraseblock 5: erase, write EC 0
ubiformat: eraseblock 6: erase, write EC 0
ubiformat: eraseblock 7: erase, write EC 0
ubiformat: eraseblock 8: erase, write EC 0
ubiformat: eraseblock 9: erase, write EC 0
ubiformat: eraseblock 10: erase, write EC 0
ubiformat: eraseblock 11: erase, write EC 0
ubiformat: eraseblock 12: erase, write EC 0
ubiformat: eraseblock 13: erase, write EC 0
ubiformat: eraseblock 14: erase, write EC 0
ubiformat: eraseblock 15: erase, write EC 0
ubiformat: eraseblock 16: erase, write EC 0
ubiformat: eraseblock 17: erase, write EC 0
ubiformat: eraseblock 18: erase, write EC 0
ubiformat: eraseblock 19: erase, write EC 0
ubiformat: eraseblock 20: erase, write EC 0
ubiformat: eraseblock 21: erase, write EC 0
ubiformat: eraseblock 22: erase, write EC 0
ubiformat: eraseblock 23: erase, write EC 0
ubiformat: eraseblock 24: erase, write EC 0
ubiformat: eraseblock 25: erase, write EC 0
ubiformat: eraseblock 26: erase, write EC 0
ubiformat: eraseblock 27: erase, write EC 0
ubiformat: eraseblock 28: erase, write EC 0
ubiformat: eraseblock 29: erase, write EC 0
ubiformat: eraseblock 30: erase, write EC 0
ubiformat: eraseblock 31: erase, write EC 0
ubiformat: eraseblock 32: erase, write EC 0
ubiformat: eraseblock 33: erase, write EC 0
ubiformat: eraseblock 34: erase, write EC 0
ubiformat: eraseblock 35: erase, write EC 0
ubiformat: eraseblock 36: erase, write EC 0
ubiformat: eraseblock 37: erase, write EC 0
ubiformat: eraseblock 38: erase, write EC 0
ubiformat: eraseblock 39: erase, write EC 0
ubiformat: eraseblock 40: erase, write EC 0
ubiformat: eraseblock 41: erase, write EC 0
ubiformat: eraseblock 42: erase, write EC 0
ubiformat: eraseblock 43: erase, write EC 0
ubiformat: eraseblock 44: erase, write EC 0
ubiformat: eraseblock 45: erase, write EC 0
ubiformat: eraseblock 46: erase, write EC 0
ubiformat: eraseblock 47: erase, write EC 0
ubiformat: eraseblock 48: erase, write EC 0
ubiformat: eraseblock 49: erase, write EC 0
ubiformat: eraseblock 50: erase, write EC 0
ubiformat: eraseblock 51: erase, write EC 0
ubiformat: eraseblock 52: erase, write EC 0
ubiformat: eraseblock 53: erase, write EC 0
ubiformat: eraseblock 54: erase, write EC 0
ubiformat: eraseblock 55: erase, write EC 0
ubiformat: eraseblock 56: erase, write EC 0
ubiformat: eraseblock 57: erase, write EC 0
ubiformat: eraseblock 58: erase, write EC 0
ubiformat: eraseblock 59: erase, write EC 0
ubiformat: eraseblock 60: erase, write EC 0
ubiformat: eraseblock 61: erase, write EC 0
ubiformat: eraseblock 62: erase, write EC 0
ubiformat: eraseblock 63: erase, write EC 0
ubiformat: eraseblock 64: erase, write EC 0
ubiformat: eraseblock 65: erase, write EC 0
ubiformat: eraseblock 66: erase, write EC 0
ubiformat: eraseblock 67: erase, write EC 0
ubiformat: eraseblock 68: erase, write EC 0
ubiformat: eraseblock 69: erase, write EC 0
ubiformat: eraseblock 70: erase, write EC 0
ubiformat: eraseblock 71: erase, write EC 0
ubiformat: eraseblock 72: erase, write EC 0
ubiformat: eraseblock 73: erase, write EC 0
ubiformat: eraseblock 74: erase, write EC 0
ubiformat: eraseblock 75: erase, write EC 0
ubiformat: eraseblock 76: erase, write EC 0
ubiformat: eraseblock 77: erase, write EC 0
ubiformat: eraseblock 78: erase, write EC 0
ubiformat: eraseblock 79: erase, write EC 0
ubiformat: eraseblock 80: erase, write EC 0
ubiformat: eraseblock 81: erase, write EC 0
ubiformat: eraseblock 82: erase, write EC 0
ubiformat: eraseblock 83: erase, write EC 0
ubiformat: eraseblock 84: erase, write EC 0
ubiformat: eraseblock 85: erase, write EC 0
ubiformat: eraseblock 86: erase, write EC 0
ubiformat: eraseblock 87: erase, write EC 0
ubiformat: eraseblock 88: erase, write EC 0
ubiformat: eraseblock 89: erase, write EC 0
ubiformat: eraseblock 90: erase, write EC 0
ubiformat: eraseblock 91: erase, write EC 0
ubiformat: eraseblock 92: erase, write EC 0
ubiformat: eraseblock 93: erase, write EC 0
ubiformat: eraseblock 94: erase, write EC 0
ubiformat: eraseblock 95: erase, write EC 0
ubiformat: eraseblock 96: erase, write EC 0
ubiformat: eraseblock 97: erase, write EC 0
ubiformat: eraseblock 98: erase, write EC 0
ubiformat: eraseblock 99: erase, write EC 0
ubiformat: eraseblock 100: erase, write EC 0
ubiformat: eraseblock 101: erase, write EC 0
ubiformat: eraseblock 102: erase, write EC 0
ubiformat: eraseblock 103: erase, write EC 0
ubiformat: eraseblock 104: erase, write EC 0
ubiformat: eraseblock 105: erase, write EC 0
ubiformat: eraseblock 106: erase, write EC 0
ubiformat: eraseblock 107: erase, write EC 0
ubiformat: eraseblock 108: erase, write EC 0
ubiformat: eraseblock 109: erase, write EC 0
ubiformat: eraseblock 110: erase, write EC 0
ubiformat: eraseblock 111: erase, write EC 0
ubiformat: eraseblock 112: erase, write EC 0
ubiformat: eraseblock 113: erase, write EC 0
ubiformat: eraseblock 114: erase, write EC 0
ubiformat: eraseblock 115: erase, write EC 0
ubiformat: eraseblock 116: erase, write EC 0
ubiformat: eraseblock 117: erase, write EC 0
ubiformat: eraseblock 118: erase, write EC 0
ubiformat: eraseblock 119: erase, write EC 0
ubiformat: eraseblock 120: erase, write EC 0
ubiformat: eraseblock 121: erase, write EC 0
ubiformat: eraseblock 122: erase, write EC 0
ubiformat: eraseblock 123: erase, write EC 0
ubiformat: eraseblock 124: erase, write EC 0
ubiformat: eraseblock 125: erase, write EC 0
ubiformat: eraseblock 126: erase, write EC 0
ubiformat: eraseblock 127: erase, write EC 0
ubiformat: eraseblock 128: erase, write EC 0
ubiformat: eraseblock 129: erase, write EC 0
ubiformat: eraseblock 130: erase, write EC 0
ubiformat: eraseblock 131: erase, write EC 0
ubiformat: eraseblock 132: erase, write EC 0
ubiformat: eraseblock 133: erase, write EC 0
ubiformat: eraseblock 134: erase, write EC 0
ubiformat: eraseblock 135: erase, write EC 0
ubiformat: eraseblock 136: erase, write EC 0
ubiformat: eraseblock 137: erase, write EC 0
ubiformat: eraseblock 138: erase, write EC 0
ubiformat: eraseblock 139: erase, write EC 0
ubiformat: eraseblock 140: erase, write EC 0
ubiformat: eraseblock 141: erase, write EC 0
ubiformat: eraseblock 142: erase, write EC 0
ubiformat: eraseblock 143: erase, write EC 0
ubiformat: write volume table to eraseblocks 0 and 1
然后做了ubiattach
:
$ubiattach -m 3 -d 3
ubiattach: error!: cannot attach mtd3
error 22 (Invalid argument)
出现以下错误dmesg
:
$dmesg | tail
[84369.258395] ubi3 error: ubi_read_volume_table: the layout volume was not found
[84369.258402] ubi3 error: ubi_attach_mtd_dev: failed to attach mtd3, error -22
不知道这个闪光灯有什么问题。
$mtdinfo -u /dev/mtd3
mtd3
Name: PLOG
Type: nor
Eraseblock size: 131072 bytes, 128.0 KiB
Amount of eraseblocks: 144 (18874368 bytes, 18.0 MiB)
Minimum input/output unit size: 1 byte
Sub-page size: 1 byte
Character device major/minor: 90:6
Bad blocks are allowed: false
Device is writable: true
Default UBI VID header offset: 64
Default UBI data offset: 128
Default UBI LEB size: 130944 bytes, 127.8 KiB
Maximum UBI volumes count: 128
$ubiattach -V
ubiattach (mtd-utils) 2.1.1
$ubiformat -V
ubiformat (mtd-utils) 2.1.1
有趣的是,当我恢复到旧内核3.14.23
时,它就可以正常工作了。这里可能出了什么问题?在工作情况下,日志ubiformat
如下:
libscan: scanning eraseblock 116: OK, erase counter 92
libscan: scanning eraseblock 117: OK, erase counter 2
libscan: scanning eraseblock 118: OK, erase counter 64
libscan: scanning eraseblock 119: OK, erase counter 92
libscan: scanning eraseblock 120: OK, erase counter 51
libscan: scanning eraseblock 121: OK, erase counter 48
这个擦除计数器是什么alien
?在失败的情况下是什么意思?