Kconfig 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. #
  2. # For a description of the syntax of this configuration file,
  3. # see the file kconfig-language.txt in the NuttX tools repository.
  4. #
  5. config FS_NXFFS
  6. bool "NXFFS file system"
  7. default n
  8. depends on !DISABLE_MOUNTPOINT
  9. select FS_READABLE
  10. select FS_WRITABLE
  11. ---help---
  12. Enable NuttX FLASH file system (NXFF) support.
  13. if FS_NXFFS
  14. config NXFFS_SCAN_VOLUME
  15. bool "Scan volume"
  16. default n
  17. ---help---
  18. Scan the media for bad blocks on start-up. If too many bad or
  19. unformatted blocks are found, then re-format the volume. Otherwise,
  20. the volume will be reformatted only if no NXFFS file system is
  21. found.
  22. Why might you want to do this? If too many bad blocks accumulate
  23. over time, then attempting to reformat my be the only way to
  24. recover. And what if you power down the device while formatting
  25. the FLASH so that you have only a partially formatted device?
  26. Scanning the volume can get you out of these situations.
  27. The down side is that scanning the volume can adversely affect
  28. your start-up time. An option is to just erase the FLASH and
  29. reboot in these cases. That can be done with MDIOC_BULKERASE
  30. IOCTL command.
  31. config NXFFS_NAND
  32. bool "Enable NAND support"
  33. default n
  34. depends on EXPERIMENTAL
  35. ---help---
  36. NAND differs from other other FLASH types several ways. For one
  37. thing, NAND requires error correction (ECC) bytes that must be set
  38. in order to work around bit failures. This affects NXFFS in two
  39. ways:
  40. First, write failures are not fatal. Rather, they should be tried by
  41. bad blocks and simply ignored. This is because unrecoverable bit
  42. failures will cause read failures when reading from NAND. Setting
  43. this option will enable this behavior.
  44. Secondly, NXFFS will write a block many times. It tries to keep
  45. bits in the erased state and assumes that it can overwrite those
  46. bits to change them from the erased to the non-erased state. This
  47. works will with NOR-like FLASH. NAND behaves this way too. But the
  48. problem with NAND is that the ECC bits cannot be re-written in this
  49. way. So once a block has been written, it cannot be modified. This
  50. behavior has NOT been fixed in NXFFS. Currently, NXFFS will attempt
  51. to re-write the ECC bits causing the ECC to become corrupted because
  52. the ECC bits cannot be overwritten without erasing the entire block.
  53. This may prohibit NXFFS from ever being used with NAND.
  54. config NXFFS_REFORMAT_THRESH
  55. int "Reformat percentage"
  56. default 20
  57. range 0 100
  58. depends on NXFFS_SCAN_VOLUME
  59. ---help---
  60. This defines the threshold for re-formatting. Is less than this
  61. percentage of good blocks are found, then the volume is re-
  62. formatted.
  63. config NXFFS_PREALLOCATED
  64. bool "Single, preallocated volume"
  65. default y
  66. ---help---
  67. If CONFIG_NXFSS_PREALLOCATED is defined, then this is the single, pre-
  68. allocated NXFFS volume instance. Currently required because full,
  69. dynamic allocation of NXFFS volumes in not yet supported.
  70. config NXFFS_ERASEDSTATE
  71. hex "FLASH erased state"
  72. default 0xff
  73. ---help---
  74. The erased state of FLASH.
  75. This must have one of the values of 0xff or 0x00.
  76. Default: 0xff.
  77. config NXFFS_PACKTHRESHOLD
  78. int "Re-packing threshold"
  79. default 32
  80. ---help---
  81. When packing flash file data,
  82. don't both with file chunks smaller than this number of data bytes.
  83. Default: 32.
  84. config NXFFS_MAXNAMLEN
  85. int "Maximum file name length"
  86. default 255
  87. ---help---
  88. The maximum size of an NXFFS file name.
  89. Default: 255.
  90. config NXFFS_TAILTHRESHOLD
  91. int "Tail threshold"
  92. default 8192
  93. ---help---
  94. Clean-up can either mean packing files together toward the end of
  95. the file or, if files are deleted at the end of the file, clean up
  96. can simply mean erasing the end of FLASH memory so that it can be
  97. re-used again. However, doing this can also harm the life of the
  98. FLASH part because it can mean that the tail end of the FLASH is
  99. re-used too often. This threshold determines if/when it is worth
  100. erased the tail end of FLASH and making it available for re-use
  101. (and possible over-wear). Default: 8192.
  102. endif