Please advise how can I modify the revision and serial that /proc/cpuinfo returns?
I am using a BBB with an Ubuntu distro:
uname - a returns : Linux arm 3.8.13-bone43 #1 SMP Wed Mar 26 17:36:53 UTC 2014 armv7l armv7l armv7l GNU/Linux
cat /proc/cpuinfo returns:
processor : 0
model name : ARMv7 Processor rev 2 (v7l)
BogoMIPS : 596.48
Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x3
CPU part : 0xc08
CPU revision : 2
Hardware : Generic AM33XX (Flattened Device Tree)
Revision : 0000
Serial : 0000000000000000
I have found this info online, but it seems impractical to have to recompile the kernel for every board I ship out? A “proper” solution would be to write this values somewhere on EEPROM and have the rad at boot time?
Info found online:
It depends on the version of Linux and processor architecture. Since this is a TI ARM, you can start with:arch/arm/kernel/setup.c.
static int c_show().
The Revision and Serial values are set with
ATAG_SERIAL, so an appropriateboot loader can pass them to Linux. Typically you do not set these in the code but use them as conditionals to handle hardware variations that can not be detected at run time in a machine file or driver.