ohady
Mon Jun 16 23:43:50 PDT 2008
On Jun 16, 5:45=A0pm, "Dean Ramsier" <ramsiernos...@nospam.com> wrote:
> Also keep in mind that since this is NAND flash you'll have to consider ba=
d
> block management in your save/restore routines. =A0Don't know what all you=
> intend to do, but it is not possible to do a direct block-block copy from
> one NAND flash part to another because of the existence of bad blocks.
>
> --
> Dean Ramsier - eMVP
> BSQUARE Corporation
>
> "Valter Minute" <v_a_l_t_e_r.m_i_n_u_t_e@g_m_a_i_l.com> wrote in message
>
> news:Xns9ABF62A0EC9B1VALTERMINUTE@207.46.248.16...
>
>
>
> > ohady <oh...@fourier-sys.com> wrote in
> > news:aad77762-a1a3-4854-b587-cfad54bc1e67
> > @d1g2000hsg.googlegroups.com
> > :
>
> >> Hi,
> >> I am looking for a way to create a binary file that will include
> >> the entire content of my NAND memory (BinFS and FAT partitions).
> >> The image file should be able to restore on a different system.
> >> The backup should basically read the NAND block by block and then
> >> stream them to a desktop through the USB connection while in
> >> bootloader mode. The backup image size should be the size of the
> >> entire NAND and should included empty blocks as well.
> >> Any idea on how to do that?
>
> > If you need to do that inside the bootloader you may use the USB
> > bootloader implementation used by some BSPs (mainstone III, for
> > example), this provide some basic IP connectivity and will allow you
> > to send blocks that you read from NAND flash to a software on the
> > remote PC that will re-assemble them in a single file.
> > I don't know if you can send data or a regular TCP/IP connection,
> > but you may able to implement a very simple UDP protocol or re-use
> > the TFTP implementation provided by BLCOMMON, at least to do the
> > restore part.
> > Having the USB RNDIS and the UDP layers available will make your
> > task simpler, but hawing a way to debug your loader (via jtag or
> > other debbuging features provided by you hardware) will be even more
> > valuable.
>
> > If you provide more information about your hardware someone may be
> > able to provide you a more detailed reply (check:
> >
http://guruce.com/blogpost/howtoaskquestionsonnewsgroupsfor a good
> > template for asking questions on this NG).
>
> > You may also consider the idea of implementing =A0the backup part
> > inside the OS. You can unmount the NAND flash partition and use the
> > NAND flash functions (usually implemented as a library linked to ms
> > provided code to build a block driver) to read it and backup it.
> > Being inside the OS give you the advantage of having all its
> > features available to store the image (USB, SD etc.) or send it
> > (even inside an e-mail, for example).
> > If your OS image is on the NAND flash you'll have to implement
> > restore inside the loader, if it isn't you may do the filesystem
> > restore operations inside the OS as well.
>
> > --
> > Valter Minute
> >www.fortechembeddedlabs.it
> > Training, support and development for Windows CE
> > (the reply address of this message is invalid)- Hide quoted text -
>
> - Show quoted text -
Thank you for the detailed reply.
The bad block is indeed a problem. We have to main partitions BinFS
and FAT. Are you aware of any sample that can can handle the FAT
partition operations? since we know how to deal with BinFS, this is
our main concern.