read-only problem with mtd
Peter Jolasson
peter.jolasson at gmail.com
Tue Nov 18 04:40:23 EST 2008
Hello,
I have a tricky problem that I really could need some input on.
I have an "embedded linux" device which has a flash that are divided
into 4 mtd partitions
31:0 bootloader
31:1 kernel (ro)
31:2 upgrade root file system
31:3 normal root file system
The interesting parts of the cmdline that the bootloader passes to the
kernel at startup are:
root=31:3 rootfstype=jffs2
mtdparts=phys_mapped_flash:256k(boot),1280k(kernel)ro,4096k(upgrade_rfs),-(normal_rfs);
To make an upgrade of the normal root file system I make a pivot
_root() to my upgrader root file system and from there I can replace
the normal root file system. This works without problems and are
programatically done via network.
But now I need to upgrade the kernel, and as you can see the kernel
partition is read only.
I cannot find out any way to solve the problem that the kernel mtd
partition is read only. (I really do regret setting it to read only)
Is there some way to "undo" the (ro) that were specified on the cmdline?
(Something like reboot and specifying a new cmdline would be nice)
My problem is that I have a lot of devices at customer location, and I
would like to be able upgrade them via network.
Otherwise I have to send them an special RS232 cable and use the
builtin bootstrap in the ARM chip.
Regards
/Peter/
PS
I have no problems with replacing the whole root file system to be
able to upgrade the kernel partition
DS
More information about the linux-mtd
mailing list