Kconfig 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. menu "UBI support"
  2. config CONFIG_UBI_SILENCE_MSG
  3. bool "UBI silence verbose messages"
  4. default ENV_IS_IN_UBI
  5. help
  6. Make the verbose messages from UBI stop printing. This leaves
  7. warnings and errors enabled.
  8. config MTD_UBI
  9. bool "Enable UBI - Unsorted block images"
  10. select CRC32
  11. select RBTREE
  12. select MTD_PARTITIONS
  13. help
  14. UBI is a software layer above MTD layer which admits of LVM-like
  15. logical volumes on top of MTD devices, hides some complexities of
  16. flash chips like wear and bad blocks and provides some other useful
  17. capabilities. Please, consult the MTD web site for more details
  18. (www.linux-mtd.infradead.org).
  19. if MTD_UBI
  20. config MTD_UBI_WL_THRESHOLD
  21. int "UBI wear-leveling threshold"
  22. default 4096
  23. range 2 65536
  24. help
  25. This parameter defines the maximum difference between the highest
  26. erase counter value and the lowest erase counter value of eraseblocks
  27. of UBI devices. When this threshold is exceeded, UBI starts performing
  28. wear leveling by means of moving data from eraseblock with low erase
  29. counter to eraseblocks with high erase counter.
  30. The default value should be OK for SLC NAND flashes, NOR flashes and
  31. other flashes which have eraseblock life-cycle 100000 or more.
  32. However, in case of MLC NAND flashes which typically have eraseblock
  33. life-cycle less than 10000, the threshold should be lessened (e.g.,
  34. to 128 or 256, although it does not have to be power of 2).
  35. config MTD_UBI_BEB_LIMIT
  36. int "Maximum expected bad eraseblock count per 1024 eraseblocks"
  37. default 20
  38. range 0 768
  39. help
  40. This option specifies the maximum bad physical eraseblocks UBI
  41. expects on the MTD device (per 1024 eraseblocks). If the underlying
  42. flash does not admit of bad eraseblocks (e.g. NOR flash), this value
  43. is ignored.
  44. NAND datasheets often specify the minimum and maximum NVM (Number of
  45. Valid Blocks) for the flashes' endurance lifetime. The maximum
  46. expected bad eraseblocks per 1024 eraseblocks then can be calculated
  47. as "1024 * (1 - MinNVB / MaxNVB)", which gives 20 for most NANDs
  48. (MaxNVB is basically the total count of eraseblocks on the chip).
  49. To put it differently, if this value is 20, UBI will try to reserve
  50. about 1.9% of physical eraseblocks for bad blocks handling. And that
  51. will be 1.9% of eraseblocks on the entire NAND chip, not just the MTD
  52. partition UBI attaches. This means that if you have, say, a NAND
  53. flash chip admits maximum 40 bad eraseblocks, and it is split on two
  54. MTD partitions of the same size, UBI will reserve 40 eraseblocks when
  55. attaching a partition.
  56. This option can be overridden by the "mtd=" UBI module parameter or
  57. by the "attach" ioctl.
  58. Leave the default value if unsure.
  59. config MTD_UBI_FASTMAP
  60. bool "UBI Fastmap (Experimental feature)"
  61. default n
  62. help
  63. Important: this feature is experimental so far and the on-flash
  64. format for fastmap may change in the next kernel versions
  65. Fastmap is a mechanism which allows attaching an UBI device
  66. in nearly constant time. Instead of scanning the whole MTD device it
  67. only has to locate a checkpoint (called fastmap) on the device.
  68. The on-flash fastmap contains all information needed to attach
  69. the device. Using fastmap makes only sense on large devices where
  70. attaching by scanning takes long. UBI will not automatically install
  71. a fastmap on old images, but you can set the UBI module parameter
  72. fm_autoconvert to 1 if you want so. Please note that fastmap-enabled
  73. images are still usable with UBI implementations without
  74. fastmap support. On typical flash devices the whole fastmap fits
  75. into one PEB. UBI will reserve PEBs to hold two fastmaps.
  76. If in doubt, say "N".
  77. config MTD_UBI_FASTMAP_AUTOCONVERT
  78. int "enable UBI Fastmap autoconvert"
  79. depends on MTD_UBI_FASTMAP
  80. default 0
  81. help
  82. Set this parameter to enable fastmap automatically on images
  83. without a fastmap.
  84. config MTD_UBI_FM_DEBUG
  85. int "Enable UBI fastmap debug"
  86. depends on MTD_UBI_FASTMAP
  87. default 0
  88. help
  89. Enable UBI fastmap debug
  90. endif # MTD_UBI
  91. endmenu # "Enable UBI - Unsorted block images"