Forum Topic - Creating an ETFS on NAND: (4 Items)
   
Creating an ETFS on NAND  
My customer is using an Atmel ARM G45 board (based on M10 BSP) using Neutrino 6.4.1 and  says/asks:

"
I've been successful at building an ETFS image using mketfs.
I then use etfs-ctrl to create the file system on the target unit.
 
I havn't been able to download the etfs image using the Atmel downloader called SAM-BA
The bad block markers are the same between QNX and SAM-BA, however, the ECC and other data in the spare area is not 
compatible.
 
The etfs has things like erasesig[2], fid, clusterhi, etc. in its spare data area where SAM-BA doesn't know anything 
about them.
SAM-BA only downloads the data area and creates the spare data area.
 
Questions:
Does the etfs image include the spare data area of each page?  (I might be able to download the spare data area).
Is it possible for me to create the spare data area?  I don't see how I would know the fid (file id) unless it's 
something simple.
 
My only other choices are:
Unsolder the NAND (after the etfs is loaded) and send it to the programming house to use for programming our parts.  (I 
don't think this will work because they probably are like Atmel's SAM-BA).
OR
Use the serial port to transfer the etfs image file and use a script to initialize the file system.
OR
Use the USB to transfer the etfs image file when production builds the units.  (Production doesn't have easy access to 
any port but the USB).

"

Any suggestions for how to write the ETFS image using something other than etfs-ctrl ?

Thanks !

Dave
Re: Creating an ETFS on NAND  
Dave Sarrazin would actually know the answers to your questions.  However he is on cruise on boat in the carribean.

Since I don't like boats, I'll try to answer:

The only way I know to write an ETFS boot image to nand is to
1. boot neutrino, say with a serial download
2. configure etfs with a raw partition (-r option)
3. use etfsctl to write the image to the raw partition

And yes, the etfs files have a spare area in every block, and it is non optional.

Note also that to boot an etfs image, your ipl needs to know how to skip bad nand blocks and ingore the spare areas of 
each block. (there are examples of such in the ipl code our our existing BSPs.)

-ad

Dave Bott wrote:
> My customer is using an Atmel ARM G45 board (based on M10 BSP) using Neutrino 6.4.1 and  says/asks:
> 
> "
> I've been successful at building an ETFS image using mketfs.
> I then use etfs-ctrl to create the file system on the target unit.
>  
> I havn't been able to download the etfs image using the Atmel downloader called SAM-BA
> The bad block markers are the same between QNX and SAM-BA, however, the ECC and other data in the spare area is not 
compatible.
>  
> The etfs has things like erasesig[2], fid, clusterhi, etc. in its spare data area where SAM-BA doesn't know anything 
about them.
> SAM-BA only downloads the data area and creates the spare data area.
>  
> Questions:
> Does the etfs image include the spare data area of each page?  (I might be able to download the spare data area).
> Is it possible for me to create the spare data area?  I don't see how I would know the fid (file id) unless it's 
something simple.
>  
> My only other choices are:
> Unsolder the NAND (after the etfs is loaded) and send it to the programming house to use for programming our parts.  
(I don't think this will work because they probably are like Atmel's SAM-BA).
> OR
> Use the serial port to transfer the etfs image file and use a script to initialize the file system.
> OR
> Use the USB to transfer the etfs image file when production builds the units.  (Production doesn't have easy access to
 any port but the USB).
> 
> "
> 
> Any suggestions for how to write the ETFS image using something other than etfs-ctrl ?
> 
> Thanks !
> 
> Dave
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post42973
> 

RE: Creating an ETFS on NAND  
Hi Attilla,
 
Thanks for the information - that seems to imply that there is no way for productization / mass production of an ETFS 
image on NAND devices. This seems like a problem for anyone trying to take a product to production - do we really force 
the customer to use Neutrino ? The customer wants an automated system, preferably populating the chips before they are 
soldered to the board...
 
Since this is NAND, I don't suppose a 'dd' of a good image will work, will it ?
 
Thanks anyway !
 
Dave

________________________________

From: Attilla Danko [mailto:community-noreply@qnx.com]
Sent: Tue 12/1/2009 10:16 AM
To: general-filesystems
Subject: Re: Creating an ETFS on NAND



Dave Sarrazin would actually know the answers to your questions.  However he is on cruise on boat in the carribean.

Since I don't like boats, I'll try to answer:

The only way I know to write an ETFS boot image to nand is to
1. boot neutrino, say with a serial download
2. configure etfs with a raw partition (-r option)
3. use etfsctl to write the image to the raw partition

And yes, the etfs files have a spare area in every block, and it is non optional.

Note also that to boot an etfs image, your ipl needs to know how to skip bad nand blocks and ingore the spare areas of
each block. (there are examples of such in the ipl code our our existing BSPs.)

-ad



Attachment: Text winmail.dat 4.16 KB
Re: RE: Creating an ETFS on NAND  
None of the IPL's for the PPC4xx BSP's I've seen (405ep, 440ep, 440epX, 460EX) supported booting ETFS 512 or 2048.  We 
did it ourselves.

Also, the mketfs utility does NOT create filler data for the spare area for each  NAND page (16bytes for 512, 64bytes 
for 2048).  The etfs image is just a set of transactions.  The fs-etfs-* driver generates the spare area contents during
 the page/transaction write.

As for generating an ETFS image suitable for a memory programmer, not to bad a task.  I will basically describe what I 
do for the raw partition since we are only interested in having the pre-programmed NAND devices boot the OS.  We do not 
need the formatted partition of the filesystem mounted yet.

Follow the previous instructions for getting the raw partition initially programmed with the desired OS image using the 
etfsctl utility.

The easiest way I found was to extend the fs-etfs-nand512/2048 drivers to take a command line option that would cause it
 to copy the required pages (512+16bytes/page or 2048+64bytes/page) to a temp file during initialization.  We then ftp 
this binary off the target and send it to the NAND programmer.

Touches can be limited to devio.c and chipio.c.  Since the copy is just iterating through all the pages, it can be done 
during initialization and be complete before you allow the driver to proceed with processing all the transactions and 
mounting the filesystem.

Use the information passed in with the -r option to determine how many pages you need to copy in the case of only 
wanting to get the bootable image out of the raw partion.  Otherwise, copy all the pages in the part.

Remember to skip all the pages in bad blocks.  I also skip pages that return DATAERR since these pages could not be 
recovered with the ECC.

Remember to config your NAND programmer not to calc new CRC's or ECC's since the temp file already contains the spare 
area data just as you would like it programmed.

Hope this helps.