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