采用的芯片是OMAP-138
上面有nand flash 256M 和spi flash 8M
其中nand flash 分区为mtd1-mtd10
spiflash 为mtd11-mtd14
root@d8135_brd:/# cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00020000 "UBOOT_ENV"
mtd1: 000a0000 00020000 "UBL"
mtd2: 000a0000 00020000 "UBOOT_M"
mtd3: 000a0000 00020000 "UBOOT_S"
mtd4: 00400000 00020000 "KERNEL_M"
mtd5: 00400000 00020000 "KERNEL_S"
mtd6: 03000000 00020000 "UBIFS_M"
mtd7: 03000000 00020000 "UBIFS_S"
mtd8: 00800000 00020000 "DATA_M"
mtd9: 00800000 00020000 "DATA_S"
mtd10: 08600000 00020000 "COMM"
mtd11: 00040000 00010000 "U-Boot"
mtd12: 00010000 00010000 "U-Boot Environment"
mtd13: 007b0000 00010000 "Linux"
mtd14: 00000000 00000000 "MAC Address"
root@d8135_brd:/#
/bin/ubiattach /dev/ubi_ctrl -m 10 -O 2048 -d 2
ubiattach nand flash都是正常的
UBI: attaching mtd10 to ubi2
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 126976 bytes
UBI: smallest flash I/O unit: 2048
UBI: VID header offset: 2048 (aligned 2048)
UBI: data offset: 4096
UBI: attached mtd10 to ubi2
UBI: MTD device name: "COMM"
UBI: MTD device size: 134 MiB
UBI: number of good PEBs: 1068
但是ubiattach spi flash 就出现报错
ubiattach /dev/ubi_ctrl -m 13 -O 2048 -d 4
UBI: attaching mtd13 to ubi4
UBI: physical eraseblock size: 65536 bytes (64 KiB)
UBI: logical eraseblock size: 63424 bytes
UBI: smallest flash I/O unit: 1
UBI: VID header offset: 2048 (aligned 2048)
UBI: data offset: 2112
UBI warning: ubi_scan: 123 PEBs are corrupted
corrupted PEBs are: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
UBI error: ubi_read_volume_table: the layout volume was not found
ubiattach: error!: cannot attach mtd13
error 22 (Invalid argument)
root@d8135_brd:/#
对于spi flash 为什么会出现ubiattach 失败的问题,应该如何处理,请帮忙看看