Kconfig 3.9 KB

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