Re: accessing NAND flash directly from CE
- From: Gary Metalle <GaryMetalle@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 15 Jan 2007 20:24:01 -0800
Thanks for the reply guys.
Yeah I am going to try producing a driver based on the iMX31 NANDFMD code.
I will dedicate the first good block above 0 as a custom type of MBR not just
for BINFS but for all images in the flash. Thus the new driver doesn't have
to 'know' where any images such as eboot, nk.bin, etc reside, it can be found
out at runtime. I will also enhance eboot to update this new MBR if it does
any sort of upgrade.
Luckily I have experience with doing kernel upgrades and yes I totally agree
how important it is to get right. Fortunately kernel upgrades will be hardly
ever be done if at all for my product.
No upgrade should be performed unless there is wall power and if kernel
upgrades are likely then opt for a dual storage option where you store the
'new' kernel to a second area in flash and then instruct the bootloader to
load that at the next reboot (if the new OS fails for whatever reason you can
default to the original working kernel).
And don't upgrade the bootloader either. Bootloaders should always be
version 1.0.0 and if you have any special functionality such as selftest, ATE
etc then don't put this in the bootloader, put it in a separate app that the
bootloader can load if necessary. If your bootloader is screwed up because of
an incorrect upgrade then you normally just have an expensive paperweight!
"Titan" wrote:
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)?
- References:
- Re: accessing NAND flash directly from CE
- From: Anthony Pellerin
- Re: accessing NAND flash directly from CE
- From: Titan
- Re: accessing NAND flash directly from CE
- Prev by Date: bluetooth ag serivces and handset
- Next by Date: Windows CE compiling
- Previous by thread: Re: accessing NAND flash directly from CE
- Next by thread: Variable Tick scheduler for x86 emulator of windows CE 5.0
- Index(es):
Relevant Pages
|