Skip to contentSkip to conversation

inappropriate ioctl when attaching

DISCUSSION David Wagner 3 participants 6 messages May 11, 2011 – May 12, 2011 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hi,

I put a ubi image on a sheevaplug but got those errors:
uncorrectable error :
UBI error: ubi_io_read: error -74 (ECC error) while reading 512 bytes from PEB 39:512, read 512 bytes

So I tried to use ubiformat and ubiattach but after a successful ubiformat, I got the following error:

# ubiattach -p /dev/mtd2
ubiattach: error!: cannot attach "/dev/mtd2"
           error 25 (Inappropriate ioctl for device)

I've never seen this and google doesn't help much. I could flash a jffs2 image w/o problem.

Does anybody have a pointer != NULL ?

Cheers,
David.

Signature · 4 lines
David Wagner, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#1 lore raw
Quoted 10 lines · David Wagner

Hi,

I put a ubi image on a sheevaplug but got those errors:
uncorrectable error :
UBI error: ubi_io_read: error -74 (ECC error) while reading 512 bytes from PEB 39:512, read 512 bytes

So I tried to use ubiformat and ubiattach but after a successful ubiformat, I got the following error:

Quoted 6 lines
# ubiattach -p /dev/mtd2
ubiattach: error!: cannot attach "/dev/mtd2"
          error 25 (Inappropriate ioctl for device)

I've never seen this and google doesn't help much. I could flash a jffs2 image w/o problem.

What happens if you do ubiattach -m 2 instead, i.e. specifying the mtd number rather than the complete device path?

/Ricard

Signature · 3 lines
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
#2 lore raw
Quoted 8 lines · Ricard Wanderlof
Quoted 4 lines · David Wagner
# ubiattach -p /dev/mtd2
ubiattach: error!: cannot attach "/dev/mtd2"
          error 25 (Inappropriate ioctl for device)

What happens if you do ubiattach -m 2 instead, i.e. specifying the mtd number rather than the complete device path?

I also tried
ubiattach /dev/ubi_ctrl -m 2
but it didn't change anything

David.

Signature · 4 lines
David Wagner, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#3 lore raw
In reply to David Wagner
Quoted 8 lines · David Wagner
# ubiattach -p /dev/mtd2
ubiattach: error!: cannot attach "/dev/mtd2"
           error 25 (Inappropriate ioctl for device)

I've never seen this and google doesn't help much. I could flash a jffs2 image w/o problem.

Does anybody have a pointer != NULL ?

This probably means you are using too kernel where UBI does not support this ioctl. Dynamic attach / detach were not part of the initial UBI which want into the kernel, AFAIR.

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
#4 lore raw
Quoted 1 line · Artem Bityutskiy

This probably means you are using too kernel where UBI does not support

Sorry, s/too kernel/too old kernel/

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Артём Битюцкий)