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