Hi, NetBSD has a NAND flash file system (similar to JFFS2) that is BSD Licensed:
https://en.wikipedia.org/wiki/CHFS https://wiki.netbsd.org/tutorials/using_the_nand_emulator_and_chfs/ NetBSD CHFS source code on GitHub <https://github.com/NetBSD/src/tree/64b8a48e1288eb3902ed73113d157af50b2ec596/sys/ufs/chfs> Because of the license, might this be a better place to start? (I found this on the Wikipedia List of Flash File Systems <https://github.com/NetBSD/src/tree/64b8a48e1288eb3902ed73113d157af50b2ec596/sys/ufs/chfs> .) cheers adam On Tue, Mar 10, 2020 at 8:48 AM wangxinyu...@163.com <wangxinyu...@163.com> wrote: > hello > > I want to discuss about the nand flash and filesystem support. I turned > into nuttx because > I have a linux background and RTOS like freertos is most likely a bare OS > kernel ,porting > exist things is annoying such as filesystem and POSIX interface etc. > Some introduction of my situation and motivation: > I'm trying to do porting the Nuttx onto the alientek apollo STM32F429 > board. > It's their website: > http://www.alientek.com > Their development board is very hot here in China, but it's a pity the > website is in Chinese Language only. > I worked based onstm32f429i-disco and what I have done: > a.uart > b.external sdram > c.led > all works fine. Next step I want to get the Nand flash working with some > filesystem. Nand flash is Micron > MT29F4G08.I realized that nuttx have no filesystem for nand on the shelf > and the exist filesystem have to > do some changes to fit nand flash.I want a more mature filesystem which I > can think of from linux > is something based on mtd like jiffs2 or YAFFS2.Maybe ubifs is better but > It's not based on the mtd and more complex. > I choosed YAFFS2 In fact the porting to Nuttx is pretty easy after I > decided to port YAFFS2 with its direct mode. > Next step I configured the FMC and got the FMC talk to nand correctly. > Later I choose to use the driver file > mtd_nand.c later I find I have to implement the method in the nand_raw.h > for the lowest talking to nand in > order to get all filesystem software stack working. I have a pause here > and looking forward to your advice > for such topics: > a. Could I benefit from Linux as I don't want to reinvent the wheel ? what > can I do to minium the effort ? Can we have a better sturcture? > b. Should I put the raw_nand method drivers/mtd/ or the board specific > folder?I think I should put in the mtd folder for micron specific > c. license of YAFFS2 is GPL which would pollute the nuttx BSD license, > what is your advice? I have to link it with library format ? > d. does someone have other working solutions for nand flash filesystem ? > e. As I understand, the raw nand filesystem is always a big headache for > many rtos, if you don't choose linux you only have very > limited options for free use, FAT is a obvious option but you have to > working on the FTL level by yourself. It is meaningful to > choose raw nand for low cost electronic product other than sd-card > competitable storgage. > > What's your opinion ? > > > > Best > > -- Adam Feuer <a...@starcat.io>