diff options
author | Diego Ismirlian <dismirlian@gmail.com> | 2021-08-16 21:38:02 -0300 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2021-09-06 08:21:00 +0200 |
commit | f0b32c7ba5136151a961c3a43c8ff430b33d7c33 (patch) | |
tree | 18ed3ec66cdb3933e330c3de8788c626002f70f2 /ubi-utils/Makemodule.am | |
parent | 42ea7cd48d2b3c306d59bb6c530d79f8c25bf9f5 (diff) |
Add ubiscan utility
ubiscan will scan the PEBs in a specific MTD device and print a summary of
the PEB erase counters and (optionally) details about each PEB's status.
Example output:
# ./ubiscan /dev/mtd6
Summary
=========================================================
mtd : 6
type : nand
size : 110362624 bytes (105.2 MiB)
PEBs : 842
min I/O: 2048 bytes
PEB erase counters
=========================================================
valid : 834
empty : 0
corrupted: 0
alien : 0
bad : 8
Histogram
=========================================================
from to count min avg max
---------------------------------------------------------
0 .. 9: 55 1 4 9
10 .. 99: 174 10 48 99
100 .. 999: 514 103 287 987
1000 .. 9999: 91 1004 1880 2251
10000 .. 99999: 0 0 0 0
100000 .. inf: 0 0 0 0
---------------------------------------------------------
Total : 834 1 392 2251
If the --verbose switch is given, ubiscan will print PEB details:
# ./ubiscan --verbose /dev/mtd6
[... same output as before ...]
Details
=========================================================
PEB 0: 253
PEB 1: 1489
PEB 2: 1
PEB 3: 1
PEB 4: 1
PEB 5: 1
PEB 6: 1
PEB 7: 1
PEB 8: 1
PEB 9: 1
PEB 10: 1
...
PEB 832: 1225
PEB 833: 252
PEB 834: 111
PEB 835: 298
PEB 836: 1264
PEB 837: 11
PEB 838: EB_BAD
PEB 839: EB_BAD
PEB 840: EB_BAD
PEB 841: EB_BAD
Signed-off-by: Diego Ismirlian <dismirlian@gmail.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'ubi-utils/Makemodule.am')
-rw-r--r-- | ubi-utils/Makemodule.am | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ubi-utils/Makemodule.am b/ubi-utils/Makemodule.am index 7491a8a..7183ec3 100644 --- a/ubi-utils/Makemodule.am +++ b/ubi-utils/Makemodule.am @@ -25,6 +25,9 @@ ubinize_LDADD = libubi.a libubigen.a libmtd.a libiniparser.a ubiformat_SOURCES = ubi-utils/ubiformat.c include/mtd_swab.h ubiformat_LDADD = libubi.a libubigen.a libmtd.a libscan.a +ubiscan_SOURCES = ubi-utils/ubiscan.c include/mtd_swab.h +ubiscan_LDADD = libubi.a libubigen.a libscan.a libmtd.a + ubirename_SOURCES = ubi-utils/ubirename.c ubirename_LDADD = libmtd.a libubi.a @@ -44,7 +47,7 @@ endif sbin_PROGRAMS += \ ubiupdatevol ubimkvol ubirmvol ubicrc32 ubinfo ubiattach \ - ubidetach ubinize ubiformat ubirename mtdinfo ubirsvol ubiblock + ubidetach ubinize ubiformat ubirename mtdinfo ubirsvol ubiblock ubiscan if WITH_GETRANDOM sbin_PROGRAMS += ubihealthd |