brintos

brintos / linux-shallow public Read only

0
0
Text · 5.1 KiB · e28a3af Raw
130 lines · plain
1# SPDX-License-Identifier: GPL-2.0-only2menuconfig MTD_UBI3	tristate "Enable UBI - Unsorted block images"4	select CRC325	help6	  UBI is a software layer above MTD layer which admits use of LVM-like7	  logical volumes on top of MTD devices, hides some complexities of8	  flash chips like wear and bad blocks and provides some other useful9	  capabilities. Please, consult the MTD web site for more details10	  (www.linux-mtd.infradead.org).11 12if MTD_UBI13 14config MTD_UBI_WL_THRESHOLD15	int "UBI wear-leveling threshold"16	default 409617	range 2 6553618	help19	  This parameter defines the maximum difference between the highest20	  erase counter value and the lowest erase counter value of eraseblocks21	  of UBI devices. When this threshold is exceeded, UBI starts performing22	  wear leveling by means of moving data from eraseblock with low erase23	  counter to eraseblocks with high erase counter.24 25	  The default value should be OK for SLC NAND flashes, NOR flashes and26	  other flashes which have eraseblock life-cycle 100000 or more.27	  However, in case of MLC NAND flashes which typically have eraseblock28	  life-cycle less than 10000, the threshold should be lessened (e.g.,29	  to 128 or 256, although it does not have to be power of 2).30 31config MTD_UBI_BEB_LIMIT32	int "Maximum expected bad eraseblock count per 1024 eraseblocks"33	default 2034	range 0 76835	help36	  This option specifies the maximum bad physical eraseblocks UBI37	  expects on the MTD device (per 1024 eraseblocks). If the underlying38	  flash does not admit of bad eraseblocks (e.g. NOR flash), this value39	  is ignored.40 41	  NAND datasheets often specify the minimum and maximum NVM (Number of42	  Valid Blocks) for the flashes' endurance lifetime. The maximum43	  expected bad eraseblocks per 1024 eraseblocks then can be calculated44	  as "1024 * (1 - MinNVB / MaxNVB)", which gives 20 for most NANDs45	  (MaxNVB is basically the total count of eraseblocks on the chip).46 47	  To put it differently, if this value is 20, UBI will try to reserve48	  about 1.9% of physical eraseblocks for bad blocks handling. And that49	  will be 1.9% of eraseblocks on the entire NAND chip, not just the MTD50	  partition UBI attaches. This means that if you have, say, a NAND51	  flash chip admits maximum 40 bad eraseblocks, and it is split on two52	  MTD partitions of the same size, UBI will reserve 40 eraseblocks when53	  attaching a partition.54 55	  This option can be overridden by the "mtd=" UBI module parameter or56	  by the "attach" ioctl.57 58	  Leave the default value if unsure.59 60config MTD_UBI_FASTMAP61	bool "UBI Fastmap (Experimental feature)"62	default n63	help64	   Important: this feature is experimental so far and the on-flash65	   format for fastmap may change in the next kernel versions66 67	   Fastmap is a mechanism which allows attaching an UBI device68	   in nearly constant time. Instead of scanning the whole MTD device it69	   only has to locate a checkpoint (called fastmap) on the device.70	   The on-flash fastmap contains all information needed to attach71	   the device. Using fastmap makes only sense on large devices where72	   attaching by scanning takes long. UBI will not automatically install73	   a fastmap on old images, but you can set the UBI module parameter74	   fm_autoconvert to 1 if you want so. Please note that fastmap-enabled75	   images are still usable with UBI implementations without76	   fastmap support. On typical flash devices the whole fastmap fits77	   into one PEB. UBI will reserve PEBs to hold two fastmaps.78 79	   If in doubt, say "N".80 81config MTD_UBI_GLUEBI82	tristate "MTD devices emulation driver (gluebi)"83	help84	   This option enables gluebi - an additional driver which emulates MTD85	   devices on top of UBI volumes: for each UBI volumes an MTD device is86	   created, and all I/O to this MTD device is redirected to the UBI87	   volume. This is handy to make MTD-oriented software (like JFFS2)88	   work on top of UBI. Do not enable this unless you use legacy89	   software.90 91config MTD_UBI_BLOCK92	bool "Read-only block devices on top of UBI volumes"93	default n94	depends on BLOCK95	help96	   This option enables read-only UBI block devices support. UBI block97	   devices will be layered on top of UBI volumes, which means that the98	   UBI driver will transparently handle things like bad eraseblocks and99	   bit-flips. You can put any block-oriented file system on top of UBI100	   volumes in read-only mode (e.g., ext4), but it is probably most101	   practical for read-only file systems, like squashfs.102 103	   When selected, this feature will be built in the UBI driver.104 105	   If in doubt, say "N".106 107config MTD_UBI_FAULT_INJECTION108	bool "Fault injection capability of UBI device"109	default n110	depends on FAULT_INJECTION_DEBUG_FS111	help112	   This option enables fault-injection support for UBI devices for113	   testing purposes.114 115	   If in doubt, say "N".116 117config MTD_UBI_NVMEM118	tristate "UBI virtual NVMEM"119	default n120	depends on NVMEM121	help122	   This option enabled an additional driver exposing UBI volumes as NVMEM123	   providers, intended for platforms where UBI is part of the firmware124	   specification and used to store also e.g. MAC addresses or board-125	   specific Wi-Fi calibration data.126 127	   If in doubt, say "N".128 129endif # MTD_UBI130