Linux Driver Code to print machine name, system name, release and Version

init_uts_ns(init/version.c) variable in Linux Kernel contains the information about:
  • Operating system name (e.g., "Linux")
  • Operating system release (e.g., "2.6.28")
  • Operating system version
  • Hardware identifier

When you run 'uname' command from user space, values from above structure are retrieved.

Code




Output:


Comments

Popular posts from this blog

bb.utils.contains yocto

Difference between RDEPENDS and DEPENDS in Yocto

PR, PN and PV Variable in Yocto