blob: 4581ef25fceafc60a58f180c06421aa07dcbdb91 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001From 8d40b4c286e005e82fa50b66fbbbde22b7e65e15 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Sun, 20 May 2012 21:35:34 +0200
4Subject: [PATCH 1/2] svg: add rudimentary support for ARM cpuinfo
5
6On ARM /proc/cpuinfo looks like this:
7
8root@beagleboneA3-0428:~# cat /proc/cpuinfo
9Processor : ARMv7 Processor rev 2 (v7l)
10BogoMIPS : 498.89
11Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls
12CPU implementer : 0x41
13CPU architecture: 7
14CPU variant : 0x3
15CPU part : 0xc08
16CPU revision : 2
17
18Hardware : am335xevm
19Revision : 0000
20Serial : 0000000000000000
21
22So no real way to get the actual SoC name, TI AM3359, but a lot better than 'Unknown'
23
24Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
25---
26
27Upstream-Status: submitted
28
29 svg.c | 4 ++++
30 1 file changed, 4 insertions(+)
31
32diff --git a/svg.c b/svg.c
33index 80e0292..53724b2 100644
34--- a/svg.c
35+++ b/svg.c
36@@ -178,6 +178,10 @@ void svg_title(void)
37 strncpy(cpu, &buf[13], 255);
38 break;
39 }
40+ if (strstr(buf, "Processor")) {
41+ strncpy(cpu, &buf[12], 255);
42+ break;
43+ }
44 }
45 fclose(f);
46 }
47--
481.7.10
49