Re: blockmtd device on top of /dev/null

2021-12-01 Thread Xiang Xiao
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.karashche...@gmail.com> wrote: > Hello, > >

Re: blockmtd device on top of /dev/null

2021-12-01 Thread Gregory Nutt
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

RE: FS automount: callback when FS is mounted

2021-12-01 Thread Gregory Nutt
> But ai think that the approach with a signal will require turning automount into a complete file based driver with open/close/ioctl support. Yes, it would have to support a minimal character driver interfaces, one for each monitored volume. The are several characters drivers that just do IOCT

blockmtd device on top of /dev/null

2021-12-01 Thread Petro Karashchenko
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: FS automount: callback when FS is mounted

2021-12-01 Thread Petro Karashchenko
But ai think that the approach with a signal will require turning automount into a complete file based driver with open/close/ioctl support. What do you think? Best regards, Petro On Thu, Dec 2, 2021, 12:37 AM Petro Karashchenko < petro.karashche...@gmail.com> wrote: > Yes. Thank you for pointi

Re: FS automount: callback when FS is mounted

2021-12-01 Thread Petro Karashchenko
Yes. Thank you for pointing me out this. I was looking into SIGEV_THREAD with a callback posting a semaphore, but sigtimedwait() seems to be exactly what I'm looking for. Best regards, Petro On Thu, Dec 2, 2021, 12:20 AM Gregory Nutt wrote: > > Yeah, I used a wrong term when was asking about "

Re: FS automount: callback when FS is mounted

2021-12-01 Thread Gregory Nutt
> Yeah, I used a wrong term when was asking about "callback". Actually I need asynchronous notification, so I can pend a task on some primitive like a semaphore. Semaphore is not a good choice to OS/application signaling due to memory access issues in some build configurations. And semapores

Re: FS automount: callback when FS is mounted

2021-12-01 Thread Petro Karashchenko
Hi Greg, Yeah, I used a wrong term when was asking about "callback". Actually I need asynchronous notification, so I can pend a task on some primitive like a semaphore. Thank you for replying with an example. I will examine it. Best regards, Petro On Wed, Dec 1, 2021, 8:43 PM Gregory Nutt wro

Re: FS automount: callback when FS is mounted

2021-12-01 Thread Gregory Nutt
I have a question regarding FS automount functionality. Is there a way to get a callback when file system is mounted and ready to be accessed? Or the only way is to implement a polling loop like: while ( access( "/mnt/sdcard0", F_OK ) != 0 ) {   sleep(1); } No, there will never never be ca

Re: FUSB302

2021-12-01 Thread TimH
On 01/12/2021 18:08, Nathan Hartman wrote: On Wed, Dec 1, 2021 at 11:29 AM Tim wrote: OK, thanks - should have thought to check for any updates - sorry. Yes, still got the 10.1 tree I think it is, from 7 or 8 months. Will need to do whatever I need to do to get the latest but not a priority ri

Re: FUSB302

2021-12-01 Thread Nathan Hartman
On Wed, Dec 1, 2021 at 11:29 AM Tim wrote: > > OK, thanks - should have thought to check for any updates - sorry. > > Yes, still got the 10.1 tree I think it is, from 7 or 8 months. Will need to > do whatever I need to do to get the latest but not a priority right now: > GitHub still scares me!

RE: FUSB302

2021-12-01 Thread Tim
OK, thanks - should have thought to check for any updates - sorry. Yes, still got the 10.1 tree I think it is, from 7 or 8 months. Will need to do whatever I need to do to get the latest but not a priority right now: GitHub still scares me! >-Original Message- >From: Abdelatif Guettouch

Re: FUSB302

2021-12-01 Thread Abdelatif Guettouche
Haltian has submitted an SGA and we can convert their license. You must have an old tree since all their code now has the ASF header. https://github.com/apache/incubator-nuttx/pull/4831 https://github.com/apache/incubator-nuttx/blob/master/drivers/usbmisc/fusb301.c#L1-L19 On Wed, Dec 1, 2021 at 5

FUSB302

2021-12-01 Thread Tim
There are some drivers for the OnSemo USB C FUSB301 and FUSB303 devices available in the NuttX tree, and they will make a good basis for me to create a driver for the FUSB302 device I chose to use. But there's a copyright notice in each saying: * Copyright (C) 2019 Haltian Ltd. All rights reser

FS automount: callback when FS is mounted

2021-12-01 Thread Petro Karashchenko
Hello, I have a question regarding FS automount functionality. Is there a way to get a callback when file system is mounted and ready to be accessed? Or the only way is to implement a polling loop like: while ( access( "/mnt/sdcard0", F_OK ) != 0 ) {   sleep(1); } Best regards, Petro

Re: MTD device aggregation, questions for other developers

2021-12-01 Thread Sebastien Lorquet
Hello, Thanks for these ideas. I need aggregation at MTD layer, not at filesystem layer. No NuttX FS at that time was immune against tearing in the way we required it, so we wrote our own in app space (the fs layer could not accomodate a special append-only file type we require). I cant chang