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.
Look for static int c_show().
The Revision and Serial values are set with ATAG_REVISION and 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.
--------------------------------------------------
Hello all,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/Linuxcat /proc/cpuinfo returns:processor : 0model name : ARMv7 Processor rev 2 (v7l)BogoMIPS : 596.48Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tlsCPU implementer : 0x41CPU architecture: 7CPU variant : 0x3CPU part : 0xc08CPU revision : 2Hardware : Generic AM33XX (Flattened Device Tree)
Revision : 0000Serial : 0000000000000000I 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?