Re: UBI fixes

Artem Bityutskiy
2006-10-04T10:17:35Z

On Tue, 2006-10-03 at 18:20 +0300, Artem Bityutskiy wrote:
> There are many patches, so I don't attach them.
>
> You can find my quilt "patches" directory at
> http://www.infradead.org/~dedekind/fix_and_rewrite_gluebi_and_co/
>
> You can also find them in my git tree at
> git://git.infradead.org/~dedekind/public_git/dedekind-ubi-2.6.git
>
> or take a look in git-web at
> http://git.infradead.org/?p=users/dedekind/dedekind-ubi-2.6.git;a=summary
>

I've also solved your problem when UBI attach functions are called
*before* UBI is initialized.

The solution is trivial: dispense with the nasty idea to call UBI attach
functions from MTD drivers. Of course MTD drivers are initialized
*before* UBI, and then they call the ubi_attach_mtd_dev() function,
while UBI have *not* been initialized yet, and this causes problems.

Instead, use kernel boot arguments. Add a

ubi.mtd_devs=

argument and enjoy. Everything just works.

You can specify UBI device names and numbers there. For example:

ubi.mtd_devs=0,"storage","NOR_flash",6

means attach mtd0, mtd6, and MTD devices with names "storage" and
"NOR_flash".

The patches may be found at the same place. Please, try them on your
system.