From: Matthew Lear <matt@bubblegen.co.uk>
To: dedekind1@gmail.com
Cc: linux-mtd@lists.infradead.org
Subject: Re: Obtaining start/end address of an MTD partition
Date: Wed, 28 Apr 2010 15:42:21 +0100 [thread overview]
Message-ID: <4BD8494D.2010505@bubblegen.co.uk> (raw)
In-Reply-To: <09f0d0f0a023583f67e63708121e31c2.squirrel@webmail.plus.net>
On 04/26/10 15:24, Matthew Lear wrote:
>> On Mon, 2010-04-26 at 12:05 +0100, Matthew Lear wrote:
>>> Hello all,
>>>
>>> Is it possible to obtain an MTD partition's starting address through
>>> usage
>>> of the MTD ioctls? I've had a very quick look and from what I can tell,
>>> this doesn't seem to be possible.
>>>
>>> To be clear, I'd like to obtain the addresses below (displayed by Linux
>>> when it detects the MTD partitions on boot).
>>>
>>> Creating 6 MTD partitions on "physmap-flash.0":
>>> 0x00000000-0x00120000 : "RedBoot"
>>> 0x00120000-0x01000000 : "foo"
>>> 0x01000000-0x01400000 : "bar"
>>
>> Did you try 'cat /proc/mtd' ?
>
> Yes, of course but the only way I could easily obtain the start address of
> a particular partition using /proc/mtd would be to increment the sizes of
> each previous partition. It's doable but just seems clunky...
Actually, it's worse than that. This will only work if each partition is
adjacent. If there is any gap (ie unpartitioned space on the device)
between partitions, this will not work at all.
Surely, I'm not the first person to try to obtain this info from MTD?
Any help appreciated...
-- Matt
next prev parent reply other threads:[~2010-04-28 14:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-26 11:05 Obtaining start/end address of an MTD partition Matthew Lear
2010-04-26 12:59 ` Artem Bityutskiy
2010-04-26 14:24 ` Matthew Lear
2010-04-28 14:42 ` Matthew Lear [this message]
[not found] ` <y2zfb0149a91004260523n8c61e72es6be68d5d7ea162e6@mail.gmail.com>
2010-04-26 14:20 ` Matthew Lear
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=4BD8494D.2010505@bubblegen.co.uk \
--to=matt@bubblegen.co.uk \
--cc=dedekind1@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.