【问题标题】:Does anyone know where to define the hardware, revision and serial no. fields of /proc/cpuinfo?有谁知道在哪里定义硬件、版本和序列号。 /proc/cpuinfo 的字段?
【发布时间】:2013-05-31 21:40:28
【问题描述】:

我想确保我的 /proc/cpuinfo 准确无误。它目前输出

硬件:am335xevm 修订: 0000 序列号:0000000000000000

我可以在代码中的哪个位置更改它以提供实际值?

【问题讨论】:

    标签: linux linux-kernel kernel customization


    【解决方案1】:

    这取决于 Linux 的版本和处理器架构。由于这是 TI ARM,您可以从:arch/arm/kernel/setup.c 开始。

    寻找static int c_show()

    RevisionSerial 值使用ATAG_REVISION and ATAG_SERIAL 设置,因此适当的boot loader 可以将它们传递给Linux。通常,您不会在代码中设置这些,而是​​将它们用作条件来处理在运行时无法在机器文件或驱动程序中检测到的硬件变化。

    【讨论】:

    • @artless_noise 谢谢 artless。
    猜你喜欢
    • 2023-04-07
    • 1970-01-01
    • 2017-11-22
    • 2023-03-25
    • 1970-01-01
    • 2012-06-27
    • 1970-01-01
    • 1970-01-01
    • 2015-04-19
    相关资源
    最近更新 更多