How to get serial number or UUID from MTD device?

1

1

I have an embedded device with MTD device over NAND flash. Is it possible to get its serial number or UUID?

I thought there might be a solution similar to getting UUID of hard drive but I didn't find any.

wowofbob

Posted 2017-02-13T09:37:05.113

Reputation: 111

Answers

0

Probably not the answer you want - but I have been trying to do the same thing for the device ID (which is read down in the device driver layers). But tools like "mtdinfo" don't contain the information you are looking for :(

Try running mtdinfo -a, maybe there is other info in there that is useful to you?

I am looking into changes to mtdinfo code to see if I can get the device id out - if I can do this, then adding the serial number will be a similar change.

This does mean recompiling the kernel and installing it... a painful way to get a little bit more information :(

Hopefully someone has a better answer, but looking at the mtd code (unless I have old code and new features have been added) then I can't see how it would be done.

UPDATE: I have a simple code-based solution to this in this link. Using this method you will be able to get whatever information that you want... but you do have the re-build the kernel/driver.

code_fodder

Posted 2017-02-13T09:37:05.113

Reputation: 1 057