* read-only problem with mtd
@ 2008-11-18 9:40 Peter Jolasson
2008-11-18 13:28 ` Bill Gatliff
0 siblings, 1 reply; 2+ messages in thread
From: Peter Jolasson @ 2008-11-18 9:40 UTC (permalink / raw)
To: linux-mtd
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: read-only problem with mtd
2008-11-18 9:40 read-only problem with mtd Peter Jolasson
@ 2008-11-18 13:28 ` Bill Gatliff
0 siblings, 0 replies; 2+ messages in thread
From: Bill Gatliff @ 2008-11-18 13:28 UTC (permalink / raw)
To: Peter Jolasson; +Cc: linux-mtd
Peter Jolasson wrote:
> (Something like reboot and specifying a new cmdline would be nice)
I suggest you reboot and specify a new command line. :)
But seriously, the trick to that might be finding the area in the
bootloader flash that corresponds to the kernel command line. But if
the target supports kexec, you might be able to just pass in a new
command line on the, er, command line... That would be equivalent to
the above, but without having to modify any flash.
Here is an alternative to consider, though. If you can modify the
rootfs, then could you add in a kernel module that, when loaded, would
undo the physmap for the kernel partition and replace it with one that
isn't read-only?
Note that I'm not sure that the "undo" part in the above is
technically possible. I'll leave that as an exercise to the
implementer. :)
b.g.
--
Bill Gatliff
bgat@billgatliff.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-18 13:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-18 9:40 read-only problem with mtd Peter Jolasson
2008-11-18 13:28 ` Bill Gatliff
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox