Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to identify ARM board programmatically

Is there a way how to programmatically identify which arm board I'm currently running on? Either raspberry pi, cubieboard, or beagleboneblack? These 3 types are enough to differentiate. I was hoping to use cat /sys/devices/virtual/dmi/id/sys_vendor but this is not available on ARM ports of debian :-/

like image 235
sbunciak Avatar asked Aug 26 '26 13:08

sbunciak


1 Answers

You can read the MIDR register which will provide implementer, variant, architecutre, partnum, and revision that you might help to distinguish the boards on which you're running your code.

You can get that register using MRC p15, 0, <Rt>, c0, c0, 0

Reference: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0500f/BABFEABI.html

like image 177
Aif Avatar answered Aug 29 '26 21:08

Aif



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!