public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: David Wuertele <dave-gnus@bfnet.com>
To: linux-mtd@lists.infradead.org
Subject: in situ MTD upgrade from userspace (kernel, CRAMFS, YAFFS)
Date: Fri, 05 Nov 2004 12:35:05 -0800	[thread overview]
Message-ID: <m33bzonifa.fsf@bfnet.com> (raw)

In my embedded system, I have previously been using the boot loader to
upgrade software (linux kernel, CRAMFS partition, YAFFS partition).
Now I want to add the feature of upgrading these partitions from
userspace so that this process can be controlled remotely.

I have two questions:

1.  There are many other processes running at the time of the upgrade.
    They are running out of CRAMFS.  As I overwrite the CRAMFS
    partition, is it possible that my write could get corrupted?
    Perhaps by crashing programs that inadvertently do weird syscalls?

2.  To simplify the write, I created a fourth partition that covers
    the whole MTD device.  That way, my program doesn't have to break
    the upgrade image up into different partitions.  Is there any
    problem with such an overlapping partition?

  static struct mtd_partition partition_info[] = {
          { name: "MTD NAND Boot partition",
            offset: 0,
            size: NAND_KERNEL_FS_SIZE},
          { name: "MTD NAND partition 1 - ROOT FS(cramfs)",
            offset: NAND_KERNEL_FS_SIZE,
            size: NAND_ROOT_FS_SIZE},
          { name: "MTD NAND partition 2 - usr fs (yaffs)",
            offset: NAND_ROOT_FS_SIZE+NAND_KERNEL_FS_SIZE,
            size: NAND_HOME_FS_SIZE },
          { name: "NAND part 3 - all parititions rewrite alias",
            offset: 0,
            size: NAND_TOTAL_SIZE }
  };

Thanks,
Dave

             reply	other threads:[~2004-11-05 20:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-05 20:35 David Wuertele [this message]
2004-11-05 22:59 ` in situ MTD upgrade from userspace (kernel, CRAMFS, YAFFS) David Wuertele
2004-11-08 12:58   ` Josh Boyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m33bzonifa.fsf@bfnet.com \
    --to=dave-gnus@bfnet.com \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox