patch for writeable mtd-partitions.
Christian Magnusson
christian.magnusson at runaware.com
Tue Mar 9 03:36:20 EST 2004
Hi again...
(I sent this to uclinux-dev mailing list before, but I guess this list
should have a copy of it too.)
I added support for write-able mtd-partitions at minor boundary. The diff
could be found at this link:
http://home.mag.cx/uclinux/patches/linux-2.6.x/mtdpart.diff
(I've been working with the linux-2.6.2-uc0 kernel in
uClinux-dist-20040218.tar.gz)
Could somebody review the patch and add it to the CVS? It works for me, but
I guess somebody have comments on optimisation and coding style etc.
The patch will fix the problem when you have a flash with different erase
block sizes. In my case I have two AM79LV004T roms with This layout:
"Image" 0x000000-0x0F8000
"Config" 0x0F8000-0x100000
The erase size for the flash is:
0x000000-0x0E0000 (7 blocks a 0x20000)
0x0E0000-0x0F0000 (1 block a 0x10000)
0x0F0000-0x0F8000 (2 blocks a 0x04000)
0x0F8000-0x100000 (1 block a 0x08000)
Before it was impossible to get a writeable partition for "Image" since it
detected the erase size to 0x20000, and 0x0F8000%0x20000 is NOT zero.
With the patch a partition could start/end at 0x0F4000 too which wasn't
possible before.
/Christian
More information about the linux-mtd
mailing list