From: "Kaius Häggblom" <kaius@oliotalo.fi>
To: linux-mtd@lists.infradead.org
Subject: Problem to attach NAND MTD-device to UBI
Date: Fri, 22 May 2009 15:44:06 +0300 [thread overview]
Message-ID: <4A169E16.6010305@oliotalo.fi> (raw)
Hi.
I'm developing on an embedded arm (AT91) platform, on which I have had
successfully Linux 2.6.22 and 2.6.25 kernels running for a long time in
production. As I have had some JFFS2 failures on NAND in the field and
I'm now updating to a 2.6.29 kernel I want to try ubifs on the NAND to
see if it would bring an improvement.
I have the kernel running and ubi-tools compiled and installed. I have
tested that NAND still works OK with JFFS2 with the new kernel. It's a
256MiB NAND in two partititions:
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 256MiB
3,3V 8-bit)
0x000000000000-0x000008000000 : "NAND_Flash 1"
0x000008000000-0x000010000000 : "NAND_Flash 2"
Now the problem is that I cannot get the mtd-devices attached to ubi.
The error is different depending on if I try to use ubiformat, or if I
try to attach an empty device directly.
WITH UBIFORMAT
=============
# flash_eraseall /dev/mtd5
Erasing 128 Kibyte @ 5aa0000 -- 70 % complete.
Skipping bad block at 0x05ac0000
Erasing 128 Kibyte @ 7fe0000 -- 99 % complete.
# ./ubiformat /dev/mtd5
ubiformat: mtd5 (NAND), size 134217728 bytes (128\x030 MiB), 131072
eraseblocks of 131072 bytes (128\x030 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 1023 -- 100 % complete
ubiformat: 1023 eraseblocks are supposedly empty
ubiformat: bad eraseblocks: 726
ubiformat: formatting eraseblock 1023 -- 100 % complete
# ubiattach /dev/ubi_ctrl -m 5
UBI: attaching mtd5 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
UBI error: validate_ec_hdr: bad VID header offset 2048, expected 512
UBI error: validate_ec_hdr: bad EC header
UBI error: ubi_io_read_ec_hdr: validation failed for PEB 0
ubiattach error: cannot attach mtd5
error 22 (Invalid argument)
DIRECTLY ATTACHING EMPTY DEVICE
===========================
# flash_eraseall /dev/mtd4
Erasing 128 Kibyte @ 380000 -- 2 % complete.
Skipping bad block at 0x003a0000
Erasing 128 Kibyte @ 71e0000 -- 88 % complete.
Skipping bad block at 0x07200000
Erasing 128 Kibyte @ 7bc0000 -- 96 % complete.
Skipping bad block at 0x07be0000
Erasing 128 Kibyte @ 7fe0000 -- 99 % complete.
# ubiattach /dev/ubi_ctrl -m 4
UBI: attaching mtd4 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
UBI: empty MTD device detected
UBI: create volume table (copy #1)
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 0:512,
written 0 bytes
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 1:512,
written 0 bytes
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 2:512,
written 0 bytes
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 3:512,
written 0 bytes
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 4:512,
written 0 bytes
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 5:512,
written 0 bytes
ubiattach error: cannot attach mtd4
error 5 (Input/output error)
Any suggestions or ideas anyone?
kind regards,
kaius
next reply other threads:[~2009-05-22 12:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-22 12:44 Kaius Häggblom [this message]
2009-05-22 13:11 ` Problem to attach NAND MTD-device to UBI Kaius Häggblom
2009-05-22 13:24 ` Artem Bityutskiy
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=4A169E16.6010305@oliotalo.fi \
--to=kaius@oliotalo.fi \
--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.