LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-27-2015, 06:32 AM   #1
vjn_bki
LQ Newbie
 
Registered: Oct 2014
Posts: 8

Rep: Reputation: Disabled
How to read motherboard name for my raspberry pi


Hi,

I want to read the motherboard name for my raspberry pi running raspbian OS?
How to do that ?

Any system commands or C/C++ API's

On other linux machines, I can use the command 'cat /sys/devices/virtual/dmi/id/board_name' to get the board name. But I dont find any DMI data on my Raspberry Pi model B.

Any help is much appreciated.

Thanks
Vipin
 
Old 01-27-2015, 07:32 AM   #2
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
There's a few informative and device unique IDs in /proc/cpuinfo. Including a serial number. But I'm not sure if that's what you're wanting information wise. There doesn't seem to be any DMI stuffs in /proc/ or /sys/ on my model B running raspbian. (according to find)
 
Old 01-27-2015, 03:18 PM   #3
Bret W
Member
 
Registered: Jan 2015
Posts: 33

Rep: Reputation: Disabled
@ vjn_bki

This command requires you to be root to execute.

Code:
dmidecode --type baseboard

Or

sudo dmidecode --type baseboard
If your raspbian OS has this command, this will give all info and DMI types on the motherboard.

Here are other keywords to use with dmidecode --type <keyword>

bios
system
baseboard
chassis
processor
memory
cache
connector
slot

Last edited by Bret W; 01-27-2015 at 03:27 PM.
 
2 members found this post helpful.
Old 01-27-2015, 09:49 PM   #4
vjn_bki
LQ Newbie
 
Registered: Oct 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thanks Shadow_7 and Bret for your replies...

@Shadow_7 ... the data in /proc/cpuinfo does not give me the board details... it's only the cpu details I believe

@Bret .. there is no dmidecode or lshw commands in my Raspberry Pi, so any other options..

Or is there any C / C++ Api's to get these details

Thanks
Vipin
 
Old 01-27-2015, 11:03 PM   #5
Bret W
Member
 
Registered: Jan 2015
Posts: 33

Rep: Reputation: Disabled
Quote:
Originally Posted by vjn_bki View Post
Thanks Shadow_7 and Bret for your replies...

@Shadow_7 ... the data in /proc/cpuinfo does not give me the board details... it's only the cpu details I believe

@Bret .. there is no dmidecode or lshw commands in my Raspberry Pi, so any other options..
Sorry about that. I did some research and it appears that dmidecode is for x86 CPU's and not for ARM based CPU's.
 
Old 01-29-2015, 07:14 PM   #6
vjn_bki
LQ Newbie
 
Registered: Oct 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Got some help from other experts..

In order to get the board name for the Raspberry Pi, we have to first get the Revision number from /etc/cpuinfo and then
map it with the table given in the following wiki..

http://elinux.org/RPi_HardwareHistory

So on my Raspberry board

~# cat /proc/cpuinfo
processor : 0
model name : ARMv6-compatible processor rev 7 (v6l)
Features : swp half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7

Hardware : BCM2708
Revision : 000e

So checking for '000e' in the table, shows me that my board is B and Pcb revision is 2.0.

Thanks all for your inputs.
 
Old 01-29-2015, 08:04 PM   #7
Bret W
Member
 
Registered: Jan 2015
Posts: 33

Rep: Reputation: Disabled
@ vjn_bki

I was surprised that dmidecode wasn't ported for the ARM processors. Anyway, I'm glad you got it solved and for sharing the info. Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] 18sep14 image raspberry fail to read mmcblk0 frushiyama Slackware - ARM 2 09-27-2014 08:41 AM
[SOLVED] Raspberry Pi remount rootfs read-only kzo81 Linux - Embedded & Single-board computer 2 09-05-2014 12:37 PM
LXer: Raspberry Pi becomes Raspberry PC via Mini-ITX carrier LXer Syndicated Linux News 0 07-17-2013 01:20 PM
Mounting Raspberry Pi SD card read-only Completely Clueless Debian 1 03-17-2013 03:18 AM
LXer: Enter the element14 Pi Day ‚??Raspberry RoadTest‚?Ě Challenge for a chance to win a Raspberry Pi c LXer Syndicated Linux News 0 03-08-2012 06:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration