Re: Re: Filesystem in RTEMS

2017-10-23 Thread xuelin.t...@qkmtech.com
Sorry, I delete some parts of my code. The sectors of S25FL256S flash chip has a combination of 4KB and 64KB. Only the 64KB sectors will be used, for simplicity, and the beginning address of them is 0x0002. The "beginning" variable I use here is equal to offset plus 0x0002 (S25FL256S_B

Re: Re: Filesystem in RTEMS

2017-10-23 Thread xuelin.t...@qkmtech.com
Wow, that is so cool. I may not have enough time to do the porting :-) Best wishes, xuelin.t...@qkmtech.com From: jameszxj Date: 2017-10-23 17:26 To: xuelin.t...@qkmtech.com CC: rtems-us...@rtems.org Subject: Re: Re: Filesystem in RTEMS -- Original -- From

Re: Re: Filesystem in RTEMS

2017-10-23 Thread xuelin.t...@qkmtech.com
Could you please share your flash driver with me? In my code, my flash is accessed via a handler defined in Xilinx BSP. typedef struct { rtems_jffs2_flash_control super; XQspiPs *flash_instance; } flash_control; static flash_control *get_flash_control(rtems_jffs2_flash_control *super)

Re: Re: Filesystem in RTEMS

2017-10-23 Thread jameszxj
-- Original -- From: "xuelin.t...@qkmtech.com";; Date: Mon, Oct 23, 2017 03:30 PM To: "jameszxj";"users@rtems.org"; Subject: Re: Re: Filesystem in RTEMS > I use JFFS2 on Xilinx Zedboard, QSPI. > The flash I use has

Re: Re: Filesystem in RTEMS

2017-10-23 Thread xuelin.t...@qkmtech.com
I use JFFS2 on Xilinx Zedboard, QSPI. The flash I use has a hybrid combination of 4KB and 64KB sectors. I just ignored the 4KB sectors, and use 64KB sectors only. So, the size of block is 64KB same the size of sector in my case. I think it may be related to my device drivers... but, I am not s

Re: Re: Filesystem in RTEMS

2017-10-22 Thread xuelin.t...@qkmtech.com
Yes, Everything is going well, if I erase the flash before use. But, I need to store some files into flash, and reuse them when I restart my system. I can not erase the flash every time. Best wishes, xuelin.t...@qkmtech.com From: Chris Johns Date: 2017-10-23 07:01 To: xuelin.t...@qkmtech.c

Re: Re: Filesystem in RTEMS

2017-10-22 Thread xuelin.t...@qkmtech.com
I have mounted JFFS2 successfully, according to the return value. Yes, it takes some time to do the mounting work. But, when I downloaded a file like "test.txt" into flash via FTP and restarted the system, error came up. <5>JFFS2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01

Re: Re: Filesystem in RTEMS

2017-10-20 Thread xuelin.t...@qkmtech.com
> $ arm-rtems4.12-nm \ > /opt/rtems/4.12/arm-rtems4.12/xilinx_zynq_zc706/lib/libjffs2.a | \ > grep rtems_jffs2_compressor_zlib_compress > T rtems_jffs2_compressor_zlib_compress I checked the symbols, same result as yours. >> I also add this library - >> "additional_flags += >> ['

Re: Re: Filesystem in RTEMS

2017-10-20 Thread xuelin.t...@qkmtech.com
com From: xuelin.t...@qkmtech.com Date: 2017-10-21 09:34 To: Chris Johns; Sebastian Huber; users@rtems.org Subject: Re: Re: Filesystem in RTEMS Yeah, my code is mostly like yours. I have a handle of flash device, which can access flash hardware directly via QSPI. So, this means, my flash can wor

Re: Re: Filesystem in RTEMS

2017-10-20 Thread xuelin.t...@qkmtech.com
Yeah, my code is mostly like yours. I have a handle of flash device, which can access flash hardware directly via QSPI. So, this means, my flash can work with jffs2 without being registered into rtems? And, I still get these error... [1136/1145] Linking build/arm-rtems4.11-xilinx_zynq_zedboard/

Re: Re: Filesystem in RTEMS

2017-10-20 Thread xuelin.t...@qkmtech.com
I followed the example (testsuites/fstests/jffs2_support/fs_support.c), and some error came up, like "undefined reference to rtems_jffs2_initialize", "undefined reference to rtems_jffs2_compressor_zlib_compress", and "undefined reference to rtems_jffs2_compressor_zlib_decompress" I have no clue

Re: Re: Filesystem in RTEMS

2017-10-19 Thread xuelin.t...@qkmtech.com
Thanks for your explaination : ) Best wishes, xuelin.t...@qkmtech.com From: Chris Johns Date: 2017-10-20 05:15 To: xuelin.t...@qkmtech.com; Sebastian Huber; users@rtems.org Subject: Re: Filesystem in RTEMS On 19/10/2017 19:30, xuelin.t...@qkmtech.com wrote: > So, what is the RFS for, basically

Re: Re: Filesystem in RTEMS

2017-10-19 Thread xuelin.t...@qkmtech.com
Oh, I see. I just need to treat my flash as an array, not a block device. Thanks a lot. Best wishes, xuelin.t...@qkmtech.com From: Sebastian Huber Date: 2017-10-19 19:56 To: xuelin.t...@qkmtech.com; users@rtems.org Subject: Re: Filesystem in RTEMS On 19/10/17 13:49, xuelin.t...@qkmtech.com wr

Re: Re: Filesystem in RTEMS

2017-10-19 Thread xuelin.t...@qkmtech.com
Does RTEMS have the FTL(Flash Translation Layer) as Linux, that can map flash device into block device? How can I define the blocks used in JFFS2, according to NOR flash? I define the segments in my flash, but have no idea how this is related to the blocks defined in the JFFS2. const rtems_fdi

Re: Re: Filesystem in RTEMS

2017-10-19 Thread xuelin.t...@qkmtech.com
So, what is the RFS for, basically? Best wishes, xuelin.t...@qkmtech.com From: Sebastian Huber Date: 2017-10-19 16:14 To: xuelin.t...@qkmtech.com; users@rtems.org Subject: Re: Filesystem in RTEMS On 19/10/17 10:09, xuelin.t...@qkmtech.com wrote: > Dear all, > I got a little confused about the