diff options
| -rw-r--r-- | meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch | 40 | ||||
| -rw-r--r-- | meta-oe/recipes-bsp/lm_sensors/lmsensors/0002-lm-sensors-fix-sensors-detect-can-t-read-the-cpu-inf.patch | 74 | ||||
| -rw-r--r-- | meta-oe/recipes-bsp/lm_sensors/lmsensors_3.6.0.bb (renamed from meta-oe/recipes-bsp/lm_sensors/lmsensors_3.5.0.bb) | 4 |
3 files changed, 1 insertions, 117 deletions
diff --git a/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch b/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch deleted file mode 100644 index 337fb11dd2..0000000000 --- a/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | From 05a4d54e2adc4caed507baca529089ec01f48340 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Li Zhou <li.zhou@windriver.com> | ||
| 3 | Date: Tue, 6 Sep 2016 14:04:29 +0800 | ||
| 4 | Subject: [PATCH 1/2] lmsensors: sensors-detect: print a special message when | ||
| 5 | there isn't enough cpu info | ||
| 6 | |||
| 7 | When running sensors-detect, if there isn't enough information in | ||
| 8 | /proc/cpuinfo for this arch (e.g. ppc64), "Use of uninitialized value | ||
| 9 | in concatenation (.) or string at /usr/sbin/sensors-detect line 2867" | ||
| 10 | and incomplete "# Processor: (//)" will be printed. | ||
| 11 | Here print out a prompt for such a case. | ||
| 12 | |||
| 13 | Upstream-Status: Pending | ||
| 14 | |||
| 15 | Signed-off-by: Li Zhou <li.zhou@windriver.com> | ||
| 16 | --- | ||
| 17 | prog/detect/sensors-detect | 7 ++++++- | ||
| 18 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
| 19 | |||
| 20 | diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect | ||
| 21 | index 0b3b0ff2..68594cd7 100755 | ||
| 22 | --- a/prog/detect/sensors-detect | ||
| 23 | +++ b/prog/detect/sensors-detect | ||
| 24 | @@ -3119,7 +3119,12 @@ sub initialize_cpu_list | ||
| 25 | sub print_cpu_info | ||
| 26 | { | ||
| 27 | my $cpu = $cpu[0]; | ||
| 28 | - print "# Processor: $cpu->{'model name'} ($cpu->{'cpu family'}/$cpu->{model}/$cpu->{stepping})\n"; | ||
| 29 | + if ( $cpu->{'model name'} && $cpu->{'cpu family'} && $cpu->{model} && $cpu->{stepping} ) { | ||
| 30 | + print "# Processor: $cpu->{'model name'} ($cpu->{'cpu family'}/$cpu->{model}/$cpu->{stepping})\n"; | ||
| 31 | + } | ||
| 32 | + else { | ||
| 33 | + print "# Processor: There isn't enough cpu info for this arch!!!\n"; | ||
| 34 | + } | ||
| 35 | } | ||
| 36 | |||
| 37 | # @i2c_adapters is a list of references to hashes, one hash per I2C/SMBus | ||
| 38 | -- | ||
| 39 | 2.21.0 | ||
| 40 | |||
diff --git a/meta-oe/recipes-bsp/lm_sensors/lmsensors/0002-lm-sensors-fix-sensors-detect-can-t-read-the-cpu-inf.patch b/meta-oe/recipes-bsp/lm_sensors/lmsensors/0002-lm-sensors-fix-sensors-detect-can-t-read-the-cpu-inf.patch deleted file mode 100644 index 68f51f5a67..0000000000 --- a/meta-oe/recipes-bsp/lm_sensors/lmsensors/0002-lm-sensors-fix-sensors-detect-can-t-read-the-cpu-inf.patch +++ /dev/null | |||
| @@ -1,74 +0,0 @@ | |||
| 1 | From 26742544bc9f136093b6be78259f4a891870aa3c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Dengke Du <dengke.du@windriver.com> | ||
| 3 | Date: Wed, 21 Sep 2016 03:17:32 -0400 | ||
| 4 | Subject: [PATCH 2/2] lm-sensors: fix sensors-detect can't read the cpu | ||
| 5 | information on fsl-t4xxx | ||
| 6 | |||
| 7 | This is because two reasons: | ||
| 8 | |||
| 9 | 1. 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 | |||
| 13 | 2. 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 | |||
| 16 | So we need to add the ppc and arm support for this program: | ||
| 17 | |||
| 18 | 1. add the ppc cpu information field 'cpu' in initialize_cpu_list function. | ||
| 19 | |||
| 20 | 2. add the correspond case of ppc and arm when print cpu information in | ||
| 21 | print_cpu_info function. | ||
| 22 | |||
| 23 | Upstream-Status: Pending | ||
| 24 | |||
| 25 | Signed-off-by: Dengke Du <dengke.du@windriver.com> | ||
| 26 | --- | ||
| 27 | prog/detect/sensors-detect | 11 ++++++++++- | ||
| 28 | 1 file changed, 10 insertions(+), 1 deletion(-) | ||
| 29 | |||
| 30 | diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect | ||
| 31 | index 68594cd7..efe2c1af 100755 | ||
| 32 | --- a/prog/detect/sensors-detect | ||
| 33 | +++ b/prog/detect/sensors-detect | ||
| 34 | @@ -3088,6 +3088,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 | @@ -3103,7 +3104,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 | @@ -3116,12 +3117,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 | -- | ||
| 73 | 2.21.0 | ||
| 74 | |||
diff --git a/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.5.0.bb b/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.6.0.bb index ffafd17f82..48490e8d83 100644 --- a/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.5.0.bb +++ b/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.6.0.bb | |||
| @@ -14,10 +14,8 @@ DEPENDS = " \ | |||
| 14 | SRC_URI = "git://github.com/lm-sensors/lm-sensors.git;protocol=https \ | 14 | SRC_URI = "git://github.com/lm-sensors/lm-sensors.git;protocol=https \ |
| 15 | file://fancontrol.init \ | 15 | file://fancontrol.init \ |
| 16 | file://sensord.init \ | 16 | file://sensord.init \ |
| 17 | file://0001-lmsensors-sensors-detect-print-a-special-message-whe.patch \ | ||
| 18 | file://0002-lm-sensors-fix-sensors-detect-can-t-read-the-cpu-inf.patch \ | ||
| 19 | " | 17 | " |
| 20 | SRCREV = "e8afbda10fba571c816abddcb5c8180afc435bba" | 18 | SRCREV = "1667b850a1ce38151dae17156276f981be6fb557" |
| 21 | 19 | ||
| 22 | inherit update-rc.d systemd | 20 | inherit update-rc.d systemd |
| 23 | 21 | ||
