View topic - Create partition FAT in NAND

Page 1 of 2

Create partition FAT in NAND

PostPosted: Wed May 25, 2016 7:50 pm
by cleitonbueno
Hello,

I have the following difficulty.

My project:

MyBoard (microSD and Memory NAND)
                                               `---> MLO -> u-boot.img -> uEnv.txt -> go 0x80100000;

I'm using my IFS in NAND memory.

But now you need to access other areas of the NAND memory, or even create a FAT partition to map dev and access, any suggestions?

Re: Create partition FAT in NAND

PostPosted: Thu May 26, 2016 6:53 am
by nico04
HI,

You can't use FAT with NAND memory.
If you want to use FAT with µSD card :
I assume raw SD card is mounted in /dev/hd0
- umount /dev/hd0
- fdisk /dev/hd0 delete -a (delete all partitions on the SD card)
- fdisk /dev/hd0 add -t 12 -s 1 (add partition 1 as FAT32)
- mount -e /dev/hd0
- mkdosfs /dev/hd0t12 (format FAT32 partition)

Of course, some filesystem libraries have to be present in your IFS for this to be working.

Nicolas

Re: Create partition FAT in NAND

PostPosted: Fri May 27, 2016 4:53 pm
by cleitonbueno
Yes, uSD I managed to work!

I thought about using something like Linux MTD but using QNX and own .IFS and a FAT partition with MTD in the same NAND Flash.

Worst case, have to handle a "piece" NAND Flash "read, erase, write" with the QNX.

Re: Create partition FAT in NAND

PostPosted: Sun May 29, 2016 3:24 pm
by denkelly
>>>Worst case, have to handle a "piece" NAND Flash "read, erase, write" with the QNX.

See etfs. Divides flash into a "raw" portion (where you put your boot image(s)) and a read/write filesystem (type etfs) in the remainder.

Re: Create partition FAT in NAND

PostPosted: Thu Jun 02, 2016 2:14 am
by cleitonbueno
I did not find a guide on QNX to handle etfs as you mentioned. You would have something to show me the document/guideline about etfs?

Re: Create partition FAT in NAND

PostPosted: Thu Jun 02, 2016 6:34 am
by nico04
Here are link of interest to you :
- http://www.qnx.com/developers/docs/660/ ... _ETFS.html
- http://www.qnx.com/developers/docs/660/ ... =1_4_5_5_7
- http://www.qnx.com/developers/docs/660/ ... 22mketf%22

For all this to work, you need a FLASH driver of type devf-xxx
This driver should be in your BSP.

You can get additional information on how to use it here :
- http://www.qnx.com/developers/docs/660/ ... neric.html

You can play with this one (FLASH filesystem simulator) :
http://www.qnx.com/developers/docs/660/ ... 1_4_5_4_41

Re: Create partition FAT in NAND

PostPosted: Thu Jun 02, 2016 2:17 pm
by cleitonbueno
Had used the devf-ram, it works perfectly, however, the data is lost when you restart.

I'm having trouble to create a "partition" raw for ETFS with mkefs, it must be correct empty?
I used the example of mkfs, but as I "access" it or mount through the ifs?

Re: Create partition FAT in NAND

PostPosted: Thu Jun 02, 2016 2:49 pm
by nico04
cleitonbueno wrote:Had used the devf-ram, it works perfectly, however, the data is lost when you restart.


As its name tells it, file system managed by devf-ram is in RAM. So its content vanishes when powering off/restarting.

Re: Create partition FAT in NAND

PostPosted: Thu Jun 02, 2016 5:24 pm
by cleitonbueno
Yeah! I use almost similar to Linux tmpfs.
Does using a .IFS image I can "mount" a recorded .etfs in NAND?

Re: Create partition FAT in NAND

PostPosted: Fri Jun 03, 2016 6:28 am
by nico04
Why do you want to mount an IFS in NAND FLASH ?

You can mount an IFS where you want with mount_ifs : http://www.qnx.com/developers/docs/660/ ... _4_5_13_26

Re: Create partition FAT in NAND

PostPosted: Fri Jun 03, 2016 1:56 pm
by cleitonbueno
Thank you Nico.
What I want is actually through the QNX IFS to mount something to read-write using NAND Memory.

As the attached image.

My boot is in Memory NAND with QNX IFS in read-only.
Must persist some configuration files that can be changed.

Re: Create partition FAT in NAND

PostPosted: Fri Jun 03, 2016 6:12 pm
by cleitonbueno
I'm trying to use the Combine Image to work with IFS and EFS (rw).

Re: Create partition FAT in NAND

PostPosted: Mon Jun 06, 2016 8:30 am
by nico04
Unless U-boot can read ETFS, your IFS has to be in raw FLASH memory section. The ETFS section will be mapped further.

Re: Create partition FAT in NAND

PostPosted: Mon Jun 06, 2016 1:59 pm
by cleitonbueno
Right!
U-boot does not understand EFS / ETFS.
I'm recording the IFS in format raw in the NAND memory.
I want the IFS access EFS / ETFS for rw, I saw the "Combine Image" but had no success, it seems to me a way out.

Re: Create partition FAT in NAND

PostPosted: Tue Jun 07, 2016 6:26 am
by nico04
You must mount the etfs from the IFS startup script (in your build file).