AnsweredAssumed Answered

Best practices for in-field update.

Question asked by halm on Mar 12, 2012
Latest reply on Mar 12, 2012 by Aaronwu

We have 4 partitions:

  1. "safe" Linux which we plan to never change (/dev/mtd1)
  2. jffs2 filesystem for "safe" Linux (/dev/mtd2 ... ideally mounted ro)
  3. "main" linux which we may occasionally field update (/dev/mtd3)
  4. jffs2 filesystem for the "main" Linux (/dev/mtd4)

 

If "something bad" happens and our "main" Linux won't boot, or if we need to upgrade our application (in the "main" Linux filesystem) or the "main" Linux itself, then our device will boot into the "safe" Linux.  An application in that "safe" Linux will receive the necessary updates for the "main" Linux and/or filesystem and it wants to install these on the proper partitions.  The Linux is delivered as a new vmImage file, and the filesystem is received as a new rootfs.jffs2 file.

 

My question(s):

  1. is there a better way to approach this in common practice?
  2. once received, how should the files be copied?  I've tried "flashcp vmImage /dev/mtd1", and while the copy appears to succeed the image won't boot.  When I "flashcp" the rootfs.jffs2, then that won't boot because there is "no init".  ... so flashcp seems incapable of copying whole partitions.  I've tried "dd if=<file> of=</dev/mtdN>" with similar result.  I am able to "mount -t jffs2 /dev/mtd4 /mnt; cd /mnt; tar xvf <fs tarball>;cd;umount /mnt" ... but that requires me to generate a tarball of the filesystem.

 

This must be a fairly common requirement and so I'm wondering how people generally approach it.

Thanks.

Outcomes