How do I Update FLASH Filesystem

Mike Wilson mikew at tonecommander.com
Fri Nov 9 21:46:38 UTC 2007


Hello, and thanks for reading this query.

I am trying to determine the best way to upgrade software on my target. For development we can a use the command line shell of our bootloader program, but we need the unit to auto-update in the production version. Currently, we TFTP the 2 files (kernel and filesystem) to ram, and then copy the ram files to the MTDs in flash. A reboot then brings us up on the new filesystem.

Apparently, the kernel and filesystem is expanded on-the-fly as needed by program operations into ram. So this is where I (think) I am running into a problem. Sometimes during the erase and programming of the MTDs, the target locks up; sometimes I get no warnings, sometimes I get 

    "Error -3 while decompressing!
    94241eda(1899)->94657000(4096)"

To minimize the risk of loading code from the filesystem, I kill off the majority of the processes, although I am sure there are more I can kill. I don't think this is the answer to my problem.

I am developing with a MIPS processor with MMU, Linux 2.6.10 kernel, compiled with UClibc, and BusyBox v1.2.2.
My kernel is in mtd0, and mtd1 contains the filesystem, as CRAMFS.

1.) What is the "right" way to update my file system and kernel?
2.) Can I use switch_root or pivot_root to help this situation?

Thank you for your expert advice.

 - Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20071109/b6473ad8/attachment-0002.htm 


More information about the busybox mailing list