1

Want to know if we can create a virtual MTD device or sort of simulate a MTD device on Linux to play with UBIFS.

I don't have one and I am exploring options to play with UBIFS.

jarvis1729
  • 147
  • 2
  • 8
  • Probably not, as UBI almost mandates a MTD device. OTOH, SPI flash chips are not hard to find. Or in the worst case use the MTDRAM, PHRAM, or BLOCK2MTD drivers. – Ignacio Vazquez-Abrams Jan 11 '16 at 08:23

1 Answers1

1

Yes, there are some. You can find them in driver/mtd/devices/Kconfig and MTDRAM may be the thing you are looking for which uses vmalloc memory for storage backup.

config MTD_SLRAM
        tristate "Uncached system RAM"
        help
          If your CPU cannot cache all of the physical memory in your machine,
          you can still use it for storage or swap by using this driver to
          present it to the system as a Memory Technology Device.

config MTD_PHRAM
        tristate "Physical system RAM"
        help
         config MTD_SLRAM
        tristate "Uncached system RAM"
        help
          If your CPU cannot cache all of the physical memory in your machine,
          you can still use it for storage or swap by using this driver to
          present it to the system as a Memory Technology Device.

config MTD_MTDRAM
    tristate "Test driver using RAM"
    help
      This enables a test MTD device driver which uses vmalloc() to
      provide storage.  You probably want to say 'N' unless you're
      testing stuff.
Chris Tsui
  • 452
  • 3
  • 10