In our embedded Linux solution using uClinux, I have just added a larger flash device. I want to be able to query which device I have installed (hardware device).
The small and large device both have different device ID's which I can read in my device driver code.
What I don't know is how to get that information in "user land". I.e. in a shell/bash script.
I have looked at:
cat /proc/mtd - this gives information on the size of the partitions. But I can't tell from this, infact I will need to change the partition sizes based on which flash chip is installed.
mtd_debug info /dev/mtd0 - This is pretty close, it tells me about the sector size (erase size), the mtd type, etc... but since the two flash chips are the same type this also is not enough info.