Re: accessing NAND flash directly from CE

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi Gary:
It seems you are nand-boot.
According to my understand to the MX21, The i.MX21 NAND flash
controller loads the first 2kB of the NAND flash contents to it's
internal ram buffers and executes automatically from the buffer start
address when set to boot from NAND. and eboot.nb0 is always the 256k,
which is started form next block. so u can update these fixed size
parts from the Windos CE. but you can not use the FMD drvier codes. you
must have to implement the codes by yourself and the NAND FLASH manual.
Now, our project is still use the Emulator to update these parts.
If successfully, it is very convenient.
But i dont think it is very necessary. Since the nk.bin also share
some code with eboot. if you have some necessary update on eboot, i
think it may be also needed to update nk.bin also.




"Anthony Pellerin 写道:
"
What you could do is :
- write a stream DLL driver that will link both your FMD (to access the
nandflash) and bootpart (to manage the partitions) such like your EBOOT
probably does. Your driver will then be able read/write in the partitions.
An IOCTL may offer an image update.
- write a stream DLL driver that will link your FMD to access the first
sectors to be able to update the bootloader.An IOCTL may offer a bootloader
update.
Note that the FMD I refer to will be the same in any case but it must be
able to manage offsets for accessing the NAND :
- a 0 sector offset to access the bootloader
- a X sectors offset for accessing the partitions

This is just some first ideas to help you, but you'll have to think a lot
about what you want to do. For instance, you may have to care about
robustness in firmware update (what happens if a power loss occurs while
updating the bootloader/image?).

HTH

--
--
--
----------------------------------------------------------------
Anthony Pellerin (eMVP)
ADENEO (ADESET)
Windows Embedded Consultant
<apellerin AT adeneo DOT adetelgroup DOT com>
http://www.adeneo.adetelgroup.com
Tél : +33 (0)4.72.18.57.77
Fax : +33 (0)4.72.18.57.78
----------------------------------------------------------------
"Gary Metalle" <GaryMetalle@xxxxxxxxxxxxxxxxxxxxxxxxx> a écrit dans le
message de news: 31C2BB55-6F29-4503-8838-65D9108B8D79@xxxxxxxxxxxxxxxx
There are a couple of threads along the lines of this subject, but it
doesn't
seem to be answered.
I have an iMX21/iMX31 CE5.0 system with NAND flash. I would like to be
able
to upgrade the kernel and eboot from CE. The kernel is stored in BINFS and
eboot is stored outside as an OEM reserved block along with the MBR,
NANDloader etc.

The FMD driver on the iMX21 (nandfcd.dll) only seems to export stream
driver
functions such as DSK_Init and DSK_Read etc, nothing useful like
FMD_ReadSector and so on.

I accept that normally it's better for eboot to do the upgrade as all the
code is there (bootpart etc), but from a user's point of view it will be
better if they can run an app from CE and see a pretty dialog box with a
progress bar showing a kernel upgrade. Is it not possible to access the
FMD
driver to call functions such as ReadSector() and so on so that
kernel/eboot
images could be upgraded in flash? If so, I am assuming that the BINFS and
FATFS partitions should be temporarily dismounted during this procedure so
that the OS didn't try using the flash? Is it easy to decode the contents
of
the MBR to find out where nk.bin is (block start, num blocks)?

.



Relevant Pages

  • re: Hive based Registry System bootup hangs
    ... Nand flash is STM 2Gb NAND flash. ... I followed MS "How to Develop a Flash Media Driver" guide to write my ... FMD driver. ... sector address for logical sector 0x00000000 ...
    (microsoft.public.windowsce.embedded)
  • Re: FMD Driver for NAND flash - urgent
    ... for FMD u need to implement a set of functions given in document ... what excactly do u want to do regarding Bad block management? ... about black info while loading the driver. ... >> I am building a Flash Media Driver for NAND flash. ...
    (microsoft.public.windowsce.embedded)
  • Re: Can I ignore the IOCTL_DISK_DELETE_SECTORS ?
    ... It depends on how your OS image is stored in NAND flash and how the FMD ... But if your OS image is loaded into SDRAM at beginning and the FMD driver do ...
    (microsoft.public.windowsce.platbuilder)
  • Re: WinCE5:Application to Detect Bad Blocks of NAND Flash
    ... Although that imply there is no official channel between application and flash driver to obtain the reading failure, you may still record this reading failure event in your FMD driver and export a driver specific IOCTL or other IPC mechanism to inform your application. ... Yesterday, I read the driver code, and the specification of the NAND Flash. ... > We want to write a WinCE5 application to test the bad blocks of NAND ...
    (microsoft.public.windowsce.platbuilder)
  • help on eboot from NAND flash
    ... My problem is the eboot cannot run. ... There is a buildin NAND flash controller in MX21, it can load first 1K of ... loader code from NAND flash. ...
    (microsoft.public.windowsce.platbuilder)