You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Petro Karashchenko <pe...@gmail.com> on 2021/12/01 23:06:04 UTC
blockmtd device on top of /dev/null
Hello,
Is it possible to create a "fake" MTD device on top /dev/null?
In theory I think that should be possible. Does anyone see any drawbacks
with such approach?
Best regards,
Petro
Re: blockmtd device on top of /dev/null
Posted by Gregory Nutt <sp...@gmail.com>.
There is not too much to /dev/null. You could probably create a standalone
mtd_null.c driver.
Or maybe use the existing filemtd.c on /dev/null. That might work.
There is also a fake MTD flash device in arch/arm/sim//up_[q]spiflash.c
Those actually emulate flash devices and are great for testing.
On Wed, Dec 1, 2021 at 5:06 PM Petro Karashchenko <
petro.karashchenko@gmail.com> wrote:
> Hello,
>
> Is it possible to create a "fake" MTD device on top /dev/null?
>
> In theory I think that should be possible. Does anyone see any drawbacks
> with such approach?
>
> Best regards,
> Petro
>
Re: blockmtd device on top of /dev/null
Posted by Petro Karashchenko <pe...@gmail.com>.
Hello,
I've added MTD null support in
https://github.com/apache/incubator-nuttx/pull/4937
I will appreciate if you can take a look.
Best regards,
Petro
On 02/12/2021 09:49, Xiang Xiao wrote:
> If you want to test a new file system and want to isolate it from the
> potential MTD driver problem, you can try RAMMTD:
> https://github.com/apache/incubator-nuttx/blob/master/drivers/mtd/rammtd.c
>
> On Thu, Dec 2, 2021 at 7:06 AM Petro Karashchenko <
> petro.karashchenko@gmail.com> wrote:
>
>> Hello,
>>
>> Is it possible to create a "fake" MTD device on top /dev/null?
>>
>> In theory I think that should be possible. Does anyone see any drawbacks
>> with such approach?
>>
>> Best regards,
>> Petro
>>
Re: blockmtd device on top of /dev/null
Posted by Xiang Xiao <xi...@gmail.com>.
If you want to test a new file system and want to isolate it from the
potential MTD driver problem, you can try RAMMTD:
https://github.com/apache/incubator-nuttx/blob/master/drivers/mtd/rammtd.c
On Thu, Dec 2, 2021 at 7:06 AM Petro Karashchenko <
petro.karashchenko@gmail.com> wrote:
> Hello,
>
> Is it possible to create a "fake" MTD device on top /dev/null?
>
> In theory I think that should be possible. Does anyone see any drawbacks
> with such approach?
>
> Best regards,
> Petro
>