* UBI bad image sequence number error
@ 2011-05-11 14:56 Alex Levin
2011-05-12 7:05 ` Ricard Wanderlof
2011-05-12 12:09 ` Artem Bityutskiy
0 siblings, 2 replies; 4+ messages in thread
From: Alex Levin @ 2011-05-11 14:56 UTC (permalink / raw)
To: linux-mtd
Hi,
I am working on a mips embedded system, and I'm trying to do is to
read a ubifs image(that went through mkfs and ubinize) from ram - the
CPU that linux runs on doesn't aware that its not from the NAND - I
have changed the NAND access API implementation.
I use a 6 MB static volume (when ubinizing) and I use a 10MiB ram, and
that is the size I pass to the mtd device.
After trying to attach I get the following error:
UBI: attaching mtd0 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 126976 bytes
UBI: smallest flash I/O unit: 2048
UBI: VID header offset: 2048 (aligned 2048)
UBI: data offset: 4096
UBI error: process_eb: bad image sequence number 1726164069 in PEB 47,
expected 648536469
UBI error: ubi_init: cannot attach mtd0
UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
Please help.
Thanks,
Alex.
P.S- if even more information is needed I'd be happy to provide it.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: UBI bad image sequence number error
2011-05-11 14:56 UBI bad image sequence number error Alex Levin
@ 2011-05-12 7:05 ` Ricard Wanderlof
2011-05-12 13:55 ` Artem Bityutskiy
2011-05-12 12:09 ` Artem Bityutskiy
1 sibling, 1 reply; 4+ messages in thread
From: Ricard Wanderlof @ 2011-05-12 7:05 UTC (permalink / raw)
To: linux-mtd@lists.infradead.org
On Wed, 11 May 2011, Alex Levin wrote:
> UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
(Not actually a response to Alex, more of a general comment on the code:)
I see a lot of these 'error -SOMETHING' in UBI error reports, is there not
a way for the driver to convert the error numbers to text strings? I
suspect the actual values can vary between architectures so the numbers
are sortof meaningless once you've left the system that generated them.
/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: UBI bad image sequence number error
2011-05-11 14:56 UBI bad image sequence number error Alex Levin
2011-05-12 7:05 ` Ricard Wanderlof
@ 2011-05-12 12:09 ` Artem Bityutskiy
1 sibling, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2011-05-12 12:09 UTC (permalink / raw)
To: Alex Levin; +Cc: linux-mtd
On Wed, 2011-05-11 at 17:56 +0300, Alex Levin wrote:
> Hi,
>
> I am working on a mips embedded system, and I'm trying to do is to
> read a ubifs image(that went through mkfs and ubinize) from ram - the
> CPU that linux runs on doesn't aware that its not from the NAND - I
> have changed the NAND access API implementation.
> I use a 6 MB static volume (when ubinizing) and I use a 10MiB ram, and
> that is the size I pass to the mtd device.
Did not understand this, sorry.
> After trying to attach I get the following error:
> UBI: attaching mtd0 to ubi0
> UBI: physical eraseblock size: 131072 bytes (128 KiB)
> UBI: logical eraseblock size: 126976 bytes
> UBI: smallest flash I/O unit: 2048
> UBI: VID header offset: 2048 (aligned 2048)
> UBI: data offset: 4096
> UBI error: process_eb: bad image sequence number 1726164069 in PEB 47,
> expected 648536469
> UBI error: ubi_init: cannot attach mtd0
> UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
This error means that the flash or whatever you feed to UBI contains
more than one UBI image. It is easier to explain why we added this image
sequence number thing. We had subtle bugs because of the following:
1. flash is contains UBI and used for some time.
2. you flash a new image incorrectly - you do not erase _whole_ flash
3. you flash a new image - by erasing only the erase blocks where you
write, but not erasing the rest of eraseblock.
Result is - you have your new image, and then pieces of the old image.
UBI thinks that the pieces of the old image are parte of your new image
and you get various nasty effects.
The image sequence number makes UBI notice that situation and complain.
Use ubiformat to flash your images - it will get things right:
http://www.linux-mtd.infradead.org/faq/ubi.html#L_flash_img
Or use 'flash_eraseall' before writing your image.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: UBI bad image sequence number error
2011-05-12 7:05 ` Ricard Wanderlof
@ 2011-05-12 13:55 ` Artem Bityutskiy
0 siblings, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2011-05-12 13:55 UTC (permalink / raw)
To: Ricard Wanderlof; +Cc: linux-mtd@lists.infradead.org
On Thu, 2011-05-12 at 09:05 +0200, Ricard Wanderlof wrote:
> On Wed, 11 May 2011, Alex Levin wrote:
>
> > UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
>
> (Not actually a response to Alex, more of a general comment on the code:)
>
> I see a lot of these 'error -SOMETHING' in UBI error reports, is there not
> a way for the driver to convert the error numbers to text strings?
I do not know such a way.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-05-12 13:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-11 14:56 UBI bad image sequence number error Alex Levin
2011-05-12 7:05 ` Ricard Wanderlof
2011-05-12 13:55 ` Artem Bityutskiy
2011-05-12 12:09 ` Artem Bityutskiy
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).