Quote:
Originally Posted by ixtab
Edit: it might even be possible to do it entirely from main, in an update script along the lines of
Code:
zcat kernel.img.gz | dd of=/dev/mmcblk0 seek=xxx bs=4K
zcat main.img.gz | dd of=/dev/mmcblk0p1 bs=4K
The rationale why the second line *might* work is that / is mounted ro anyway, so in principle nothing should attempt to write to the partition. And zcat and dd would already be loaded in memory at the time of execution. I may be terribly wrong though, so don't even attempt this unless you are sure that you can debrick the device
|
Second line
NO
That is writing to the device which is the backing store of a file system.
The VFS (virtual file system) layer of Linux has large portions of the file system and file system metadata in memory - - which represents what
WAS on the storage media under the file system.
The physical location of file inode 14xyz23 which might have been the start of an executable **before** the underlying content was changed might be anything **after** the change, heck, it might not even be an inode afterward.
There are only two choices:
Un-mount the file system before changing the backing store ; or,
Make all changes through the file system.