how to write to an entire NOR Flash at once
Aras Vaichas
arasv at magellan-technology.com
Wed May 25 03:48:00 EDT 2005
Hello,
I need to remotely upgrade some old systems:
from:
* Kernel 2.2, NOR Flash, kernel and applications spread over several MTD
parititions using JFFS1, custom bootloader
to:
* Kernel 2.6, adding u-boot and using JFFS2 instead of JFFS1. I have the new
system up and running with no problems. The MTD partition map will change
radically from the old one.
The old systems have an upgrade mechanism in place where by TFTP'ing a file
into a directory and then rebooting will cause that file to be unpacked and
placed into the application directory and then executed. Therefore I can run
any script or file that I wish to on these systems and it will be run as root.
What I am thinking of doing is to take a copy of the entire NOR flash from the
new system and copy it into the NOR Flash on the old system and reboot. Since
the MTD parititions won't be aligned between the old and new system, I will
need to write the entire NOR Flash in one go - at which point the system will
lose its brains and will need to be reset and hopefully start a new life as a
2.6 system.
What is the best way to do this? Do I need to write a 2.2 kernel module that
will allow me raw access to the NOR Flash or can I do this from userspace?
regards,
Aras Vaichas
More information about the linux-mtd
mailing list