linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Vladimir Khmelnitsky <vladimir@broadlight.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: simple ubi reader
Date: Sun, 28 Nov 2010 20:13:39 +0200	[thread overview]
Message-ID: <1290968019.2032.25.camel@koala> (raw)
In-Reply-To: <AFC5977FF9FA3E449BB7803E9BA754EF01D8AE25@mailsrv.broadlight.com>

On Sun, 2010-11-28 at 11:27 +0200, Vladimir Khmelnitsky wrote:
> Hi,
> 
> I need to write bootloader which should read its second stage binary
> from ubi volume.
> I wonder if there is some simple open source code I can use to implement
> ubi volume reader?

I know people doing small bootloader code (closed source) with 4KiB
constraint for whole code, and it supported UBI R/O. That was clever
code made by clever people though. But here are some points:

1. You do not have to read EC headers when scanning
2. You do not really need to read the volume table
3. If you can assume you need only one volume, say, with vol ID 0, this
simplifies things further.

Also, AFAIR, some people found that placing VID header at the very end
of the NAND page made ECC calculations easier and faster. This is
actually why UBI has 'vid_hdr_offs' option which is not widely used,
though.

Anyway, this is the original old design document, which may contain some
hints, but I'm not sure:

http://linux-mtd.infradead.org/doc/ubidesign/ubidesign.pdf

The doc is not up-to-date, but all the design principles are valid.

-- 
Best Regards,
Artem Bityutskiy (Битюцкий Артём)

  parent reply	other threads:[~2010-11-28 18:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-28  9:27 simple ubi reader Vladimir Khmelnitsky
2010-11-28 10:29 ` Marek Skuczynski
2010-11-28 12:37   ` Vladimir Khmelnitsky
2010-11-28 13:33     ` Marek Skuczynski
2010-11-28 18:13 ` Artem Bityutskiy [this message]
2010-11-29 12:53   ` Matthieu CASTET
2010-11-29  9:54 ` Peter Korsgaard

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=1290968019.2032.25.camel@koala \
    --to=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=vladimir@broadlight.com \
    /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;
as well as URLs for NNTP newsgroup(s).