Skip navigation.
Home
The QNX Community Portal

View topic - Create partition FAT in NAND

Create partition FAT in NAND

anything that doesn't fit to other groups.

Create partition FAT in NAND

Postby cleitonbueno » Wed May 25, 2016 7:50 pm

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?
cleitonbueno
Active Member
 
Posts: 34
Joined: Thu Mar 10, 2016 1:21 pm

Re: Create partition FAT in NAND

Postby nico04 » Thu May 26, 2016 6:53 am

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
nico04
Active Member
 
Posts: 77
Joined: Wed Sep 29, 2010 9:59 am
Location: France

Re: Create partition FAT in NAND

Postby cleitonbueno » Fri May 27, 2016 4:53 pm

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.
cleitonbueno
Active Member
 
Posts: 34
Joined: Thu Mar 10, 2016 1:21 pm

Re: Create partition FAT in NAND

Postby denkelly » Sun May 29, 2016 3:24 pm

>>>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.
denkelly
Senior Member
 
Posts: 160
Joined: Sat Aug 02, 2008 3:27 pm

Re: Create partition FAT in NAND

Postby cleitonbueno » Thu Jun 02, 2016 2:14 am

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?
cleitonbueno
Active Member
 
Posts: 34
Joined: Thu Mar 10, 2016 1:21 pm

Re: Create partition FAT in NAND

Postby nico04 » Thu Jun 02, 2016 6:34 am

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
nico04
Active Member
 
Posts: 77
Joined: Wed Sep 29, 2010 9:59 am
Location: France

Re: Create partition FAT in NAND

Postby cleitonbueno » Thu Jun 02, 2016 2:17 pm

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?
cleitonbueno
Active Member
 
Posts: 34
Joined: Thu Mar 10, 2016 1:21 pm

Re: Create partition FAT in NAND

Postby nico04 » Thu Jun 02, 2016 2:49 pm

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.
nico04
Active Member
 
Posts: 77
Joined: Wed Sep 29, 2010 9:59 am
Location: France

Re: Create partition FAT in NAND

Postby cleitonbueno » Thu Jun 02, 2016 5:24 pm

Yeah! I use almost similar to Linux tmpfs.
Does using a .IFS image I can "mount" a recorded .etfs in NAND?
cleitonbueno
Active Member
 
Posts: 34
Joined: Thu Mar 10, 2016 1:21 pm

Re: Create partition FAT in NAND

Postby nico04 » Fri Jun 03, 2016 6:28 am

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
nico04
Active Member
 
Posts: 77
Joined: Wed Sep 29, 2010 9:59 am
Location: France

Re: Create partition FAT in NAND

Postby cleitonbueno » Fri Jun 03, 2016 1:56 pm

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.
Attachments
QNXIFS_read_write.png
QNXIFS with something to read+write
(18.03 KiB) Not downloaded yet
cleitonbueno
Active Member
 
Posts: 34
Joined: Thu Mar 10, 2016 1:21 pm

Re: Create partition FAT in NAND

Postby cleitonbueno » Fri Jun 03, 2016 6:12 pm

I'm trying to use the Combine Image to work with IFS and EFS (rw).
cleitonbueno
Active Member
 
Posts: 34
Joined: Thu Mar 10, 2016 1:21 pm

Re: Create partition FAT in NAND

Postby nico04 » Mon Jun 06, 2016 8:30 am

Unless U-boot can read ETFS, your IFS has to be in raw FLASH memory section. The ETFS section will be mapped further.
nico04
Active Member
 
Posts: 77
Joined: Wed Sep 29, 2010 9:59 am
Location: France

Re: Create partition FAT in NAND

Postby cleitonbueno » Mon Jun 06, 2016 1:59 pm

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.
cleitonbueno
Active Member
 
Posts: 34
Joined: Thu Mar 10, 2016 1:21 pm

Re: Create partition FAT in NAND

Postby nico04 » Tue Jun 07, 2016 6:26 am

You must mount the etfs from the IFS startup script (in your build file).
nico04
Active Member
 
Posts: 77
Joined: Wed Sep 29, 2010 9:59 am
Location: France

Next

Return to General Programming

Who is online

Users browsing this forum: No registered users and 4 guests