我正在尝试弄清楚如何在 ubuntu 上使用 c 语言读取、写入和更新 pci 网卡上 eeprom 的内存地址。
有人能给我指出正确的入门方向吗?谢谢
最佳答案
经过一些研究,它出现了ethtool
可用于读取和写入 eeprom ( http://manpages.ubuntu.com/manpages/hardy/en/man8/ethtool.8.html ):
ethtool -d|--register-dump ethX [raw on|off] [hex on|off] [file name]
ethtool -e|--eeprom-dump ethX [raw on|off] [offset N] [length N]
ethtool -E|--change-eeprom ethX [magic N] [offset N] [value N]
要转储eeprom,你可以做ethtool -e ethX raw <on|off> offset <N> length <N>
.
关于c - 在 ubuntu 上读取、写入、更新 pci 卡上的 eeprom,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22491157/