From: Artem Bityutskiy <dedekind1@gmail.com>
To: "Lluís Batlle i Rossell" <viriketo@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: block2mtd and ubi
Date: Mon, 22 Nov 2010 10:12:42 +0200 [thread overview]
Message-ID: <1290413562.2289.14.camel@localhost> (raw)
In-Reply-To: <20101121000145.GF9645@vicerveza.homeunix.net>
On Sun, 2010-11-21 at 01:01 +0100, Lluís Batlle i Rossell wrote:
> On Sat, Nov 20, 2010 at 06:58:56PM +0100, Lluís Batlle i Rossell wrote:
> > Hello,
> >
> > I'm trying to use the qemu mipsel malta board to boot an ubifs image, prepared
> > with 'ubinize', and using block2mtd on /dev/hda, where qemu receives the image
> > through -hda ubifs.img.
> >
> > The problem I have summarizes in this UBI complain while booting:
> > block2mtd: mtd0: [/dev/hda] erase_size = 512KiB [524288]
> > UBI: attaching mtd0 to ubi0
> > UBI: physical eraseblock size: 524288 bytes (512 KiB)
> > UBI: logical eraseblock size: 524160 bytes
> > UBI: smallest flash I/O unit: 1
> > UBI: VID header offset: 64 (aligned 64)
> > UBI: data offset: 128
> > UBI warning: check_what_we_have: 1008 PEBs are corrupted
> > corrupted PEBs are: 0 1 2 3 4 5 6 7 .....
> > UBI error: check_what_we_have: too many corrupted PEBs, refusing this device
> > UBI error: ubi_init: cannot attach mtd0
> Solved!
>
> The first PEBs were corrupt because I was using 'dd' wrong. Nevertheless,
> filling the rest of image with zeros gave corrupt PEBs on the rest. joer on #mtd
> (oftc irc) helped me suggesting maybe 0xff would work. And appending 0xff
> instead of 0x00 worked great.
>
> It's a pity that the same 'ubinize' cannot do that job automatically, and give
> an image filling all the memory blocks. That would easy down a lot the job for
> block2mtd.
Use ubiformat - it should get it right:
http://www.linux-mtd.infradead.org/faq/ubi.html#L_flash_img
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
next prev parent reply other threads:[~2010-11-22 8:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-20 17:58 block2mtd and ubi Lluís Batlle i Rossell
2010-11-21 0:01 ` Lluís Batlle i Rossell
2010-11-22 8:12 ` Artem Bityutskiy [this message]
2010-11-22 9:09 ` Lluís Batlle i Rossell
2010-11-22 9:32 ` Artem Bityutskiy
2010-11-22 10:00 ` Lluís Batlle i Rossell
2010-11-22 10:21 ` Artem Bityutskiy
2010-11-22 10:37 ` Lluís Batlle i Rossell
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=1290413562.2289.14.camel@localhost \
--to=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=viriketo@gmail.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