summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-bsp
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-bsp')
-rw-r--r--meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-lm-sensors-fix-sensors-detect-can-t-read-the-cpu-inf.patch74
-rw-r--r--meta-oe/recipes-bsp/lm_sensors/lmsensors_3.4.0.bb1
2 files changed, 75 insertions, 0 deletions
diff --git a/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-lm-sensors-fix-sensors-detect-can-t-read-the-cpu-inf.patch b/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-lm-sensors-fix-sensors-detect-can-t-read-the-cpu-inf.patch
new file mode 100644
index 0000000000..2d5709f3f5
--- /dev/null
+++ b/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-lm-sensors-fix-sensors-detect-can-t-read-the-cpu-inf.patch
@@ -0,0 +1,74 @@
1From dd9b40c54f160a44f1d78e5946d4cd00a8852802 Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Wed, 21 Sep 2016 03:17:32 -0400
4Subject: [PATCH] lm-sensors: fix sensors-detect can't read the cpu information
5 on fsl-t4xxx
6
7This is because two reasons:
8
91. The sensors-detect program in lm-sensors depends on the file '/proc/cpuinfo',
10 different arch write different infomation to it. That program supports x86
11 and x86-64 well, but weak on ppc and arm.
12
132. The sensors-detect program show the cpu information just design for intel's
14 cpu, when meets other arch, it can't output the correct information.
15
16So we need to add the ppc and arm support for this program:
17
181. add the ppc cpu information field 'cpu' in initialize_cpu_list function.
19
202. add the correspond case of ppc and arm when print cpu information in
21 print_cpu_info function.
22
23Upstream-Status: Pending
24
25Signed-off-by: Dengke Du <dengke.du@windriver.com>
26---
27 prog/detect/sensors-detect | 11 ++++++++++-
28 1 file changed, 10 insertions(+), 1 deletion(-)
29
30diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect
31index 5f62405..ae4def1 100755
32--- a/prog/detect/sensors-detect
33+++ b/prog/detect/sensors-detect
34@@ -2833,6 +2833,7 @@ sub kernel_version_at_least
35 # model name and stepping, directly taken from /proc/cpuinfo.
36 use vars qw(@cpu);
37
38+# The added field 'cpu' is for support the ppc.
39 sub initialize_cpu_list
40 {
41 local $_;
42@@ -2848,7 +2849,7 @@ sub initialize_cpu_list
43 };
44 next;
45 }
46- if (m/^(vendor_id|cpu family|model|model name|stepping|cpuid level)\s*:\s*(.+)$/) {
47+ if (m/^(vendor_id|cpu family|model|model name|stepping|cpuid level|cpu|revision)\s*:\s*(.+)$/) {
48 my $k = $1;
49 my $v = $2;
50 $v =~ s/\s+/ /g; # Merge multiple spaces
51@@ -2861,12 +2862,20 @@ sub initialize_cpu_list
52 push @cpu, $entry if scalar keys(%{$entry}); # Last entry
53 }
54
55+# The field 'model name' is for ARM.
56+# The field 'cpu' is for ppc.
57 sub print_cpu_info
58 {
59 my $cpu = $cpu[0];
60 if ( $cpu->{'model name'} && $cpu->{'cpu family'} && $cpu->{model} && $cpu->{stepping} ) {
61 print "# Processor: $cpu->{'model name'} ($cpu->{'cpu family'}/$cpu->{model}/$cpu->{stepping})\n";
62 }
63+ elsif ( $cpu->{'model name'} ) {
64+ print "# Processor: $cpu->{'model name'}\n";
65+ }
66+ elsif ( $cpu->{'cpu'} && $cpu->{'revision'} ) {
67+ print "# Processor: $cpu->{'cpu'} $cpu->{'revision'}\n";
68+ }
69 else {
70 print "# Processor: There isn't enough cpu info for this arch!!!\n";
71 }
72--
732.8.1
74
diff --git a/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.4.0.bb b/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.4.0.bb
index ffab5d6bf4..4dbef73b9f 100644
--- a/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.4.0.bb
+++ b/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.4.0.bb
@@ -12,6 +12,7 @@ SRC_URI = "https://github.com/groeck/lm-sensors/archive/V3-4-0.tar.gz \
12 file://sensord.init \ 12 file://sensord.init \
13 file://0001-lmsensors-sensors-detect-print-a-special-message-whe.patch \ 13 file://0001-lmsensors-sensors-detect-print-a-special-message-whe.patch \
14 file://0001-prog-Do-not-limit-sys-io.h-header-include-to-just-gl.patch \ 14 file://0001-prog-Do-not-limit-sys-io.h-header-include-to-just-gl.patch \
15 file://0001-lm-sensors-fix-sensors-detect-can-t-read-the-cpu-inf.patch \
15" 16"
16SRC_URI[md5sum] = "1e9f117cbfa11be1955adc96df71eadb" 17SRC_URI[md5sum] = "1e9f117cbfa11be1955adc96df71eadb"
17SRC_URI[sha256sum] = "e334c1c2b06f7290e3e66bdae330a5d36054701ffd47a5dde7a06f9a7402cb4e" 18SRC_URI[sha256sum] = "e334c1c2b06f7290e3e66bdae330a5d36054701ffd47a5dde7a06f9a7402cb4e"