Skip to contentSkip to conversation

get mtd name and manufacturer from high level app

DISCUSSION Salvatore Frizzoli - IMS Italy 2 participants 2 messages Dec 2, 2009 – Dec 4, 2009 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hi all,

I am working on an application under a uClinux kernel.
This application would read name, manufacturer and id of the mtd flash device. I have seen that it is not possible to do this by ioctl, so I don't know how to do. I have also seen the get_mtd_device function, but i cannot know how to fill the mtd_info struct that get_mtd_device takes as input parameter.

Is there a way to get theese infos similar to ioctl?

Thank you all.
Bye.
Salvatore

Signature · 15 lines
Salvatore Frizzoli

Software Developer

Research & Development Department
IMS srl

Via Sagittario, 5
Fraz. Pontecchio Marconi
40037 Sasso Marconi (BO)
Italy
Tel. ++39 051 846851
Fax ++39 051 846856 

http://www.imsitaly.com
#1 lore raw
Quoted 7 lines · Salvatore Frizzoli - IMS Italy

Hi all,

I am working on an application under a uClinux kernel.
This application would read name, manufacturer and id of the mtd flash device.
I have seen that it is not possible to do this by ioctl, so I don't know how to do.

Take a look at the mtdinfo utility in mtd-utils/ubi-utils. It reads most of the data from sysfs.

Manufecturer ID is not available though, and you need to teach the kernel to export it.

Look inside of mtdinfo to find out how it does things. You can also extend it and send patches.

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