summaryrefslogtreecommitdiffstats
path: root/external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors')
-rw-r--r--external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config_1.0.bb23
-rw-r--r--external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch40
-rw-r--r--external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-prog-Do-not-limit-sys-io.h-header-include-to-just-gl.patch88
-rw-r--r--external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.6.0.bb (renamed from external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.4.0.bb)92
4 files changed, 70 insertions, 173 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config_1.0.bb b/external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config_1.0.bb
index b0091d65..b55bd516 100644
--- a/external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config_1.0.bb
+++ b/external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config_1.0.bb
@@ -14,6 +14,9 @@ SRC_URI = "file://fancontrol \
"
S = "${WORKDIR}"
+PACKAGECONFIG ??= "sensord"
+PACKAGECONFIG[sensord] = ",,"
+
RDEPENDS_${PN}-dev = ""
do_install() {
@@ -25,27 +28,29 @@ do_install() {
install -d ${D}${sysconfdir}/sensors.d
install -m 0644 ${WORKDIR}/sensors.conf ${D}${sysconfdir}/sensors.d
- # Install sensord configuration file
- install -m 0644 ${WORKDIR}/sensord.conf ${D}${sysconfdir}
+ if ${@bb.utils.contains('PACKAGECONFIG', 'sensord', 'true', 'false', d)}; then
+ # Install sensord configuration file
+ install -m 0644 ${WORKDIR}/sensord.conf ${D}${sysconfdir}
- # Install sensord.cgi script and create world-writable
- # web-accessible sensord directory
- install -d ${D}/www/pages/cgi-bin
- install -m 0755 ${WORKDIR}/sensord.cgi ${D}/www/pages/cgi-bin
- install -d -m a=rwxs ${D}/www/pages/sensord
+ # Install sensord.cgi script and create world-writable
+ # web-accessible sensord directory
+ install -d ${D}/www/pages/cgi-bin
+ install -m 0755 ${WORKDIR}/sensord.cgi ${D}/www/pages/cgi-bin
+ install -d -m a=rwxs ${D}/www/pages/sensord
+ fi
}
# libsensors configuration
PACKAGES =+ "${PN}-libsensors"
# sensord logging daemon configuration
-PACKAGES =+ "${PN}-sensord"
+PACKAGES =+ "${@bb.utils.contains('PACKAGECONFIG', 'sensord', '${PN}-sensord', '', d)}"
# fancontrol script configuration
PACKAGES =+ "${PN}-fancontrol"
# sensord web cgi support
-PACKAGES =+ "${PN}-cgi"
+PACKAGES =+ "${@bb.utils.contains('PACKAGECONFIG', 'sensord', '${PN}-cgi', '', d)}"
RRECOMMENDS_${PN}-cgi = "lighttpd lighttpd-module-cgi"
RDEPENDS_${PN}-cgi = "${PN}-sensord rrdtool"
FILES_${PN}-cgi = "/www/*"
diff --git a/external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch b/external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch
deleted file mode 100644
index abf6e752..00000000
--- a/external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From c4428260e7685ebaf5c26c6ecaae5a56849853e8 Mon Sep 17 00:00:00 2001
-From: Li Zhou <li.zhou@windriver.com>
-Date: Tue, 6 Sep 2016 14:04:29 +0800
-Subject: [PATCH] lmsensors: sensors-detect: print a special message when there
- isn't enough cpu info
-
-When running sensors-detect, if there isn't enough information in
-/proc/cpuinfo for this arch (e.g. ppc64), "Use of uninitialized value
-in concatenation (.) or string at /usr/sbin/sensors-detect line 2867"
-and incomplete "# Processor: (//)" will be printed.
-Here print out a prompt for such a case.
-
-Upstream-Status: Pending
-
-Signed-off-by: Li Zhou <li.zhou@windriver.com>
----
- prog/detect/sensors-detect | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect
-index 3c2b44f..5f62405 100755
---- a/prog/detect/sensors-detect
-+++ b/prog/detect/sensors-detect
-@@ -2864,7 +2864,12 @@ sub initialize_cpu_list
- sub print_cpu_info
- {
- my $cpu = $cpu[0];
-- print "# Processor: $cpu->{'model name'} ($cpu->{'cpu family'}/$cpu->{model}/$cpu->{stepping})\n";
-+ if ( $cpu->{'model name'} && $cpu->{'cpu family'} && $cpu->{model} && $cpu->{stepping} ) {
-+ print "# Processor: $cpu->{'model name'} ($cpu->{'cpu family'}/$cpu->{model}/$cpu->{stepping})\n";
-+ }
-+ else {
-+ print "# Processor: There isn't enough cpu info for this arch!!!\n";
-+ }
- }
-
- # @i2c_adapters is a list of references to hashes, one hash per I2C/SMBus
---
-1.9.1
-
diff --git a/external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-prog-Do-not-limit-sys-io.h-header-include-to-just-gl.patch b/external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-prog-Do-not-limit-sys-io.h-header-include-to-just-gl.patch
deleted file mode 100644
index fb3878dc..00000000
--- a/external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-prog-Do-not-limit-sys-io.h-header-include-to-just-gl.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From 727524453f115ddc05109e9bbb3d0e60a7db9185 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 16 Jul 2017 15:05:50 -0700
-Subject: [PATCH] prog: Do not limit sys/io.h header include to just glibc
-
-musl provides it too.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- prog/dump/isadump.c | 6 ------
- prog/dump/isaset.c | 6 ------
- prog/dump/superio.c | 5 -----
- prog/dump/util.c | 5 -----
- 4 files changed, 22 deletions(-)
-
-diff --git a/prog/dump/isadump.c b/prog/dump/isadump.c
-index e0e6f00..8794537 100644
---- a/prog/dump/isadump.c
-+++ b/prog/dump/isadump.c
-@@ -36,13 +36,7 @@
- #include "util.h"
- #include "superio.h"
-
--
--/* To keep glibc2 happy */
--#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0
- #include <sys/io.h>
--#else
--#include <asm/io.h>
--#endif
-
- #ifdef __powerpc__
- unsigned long isa_io_base = 0; /* XXX for now */
-diff --git a/prog/dump/isaset.c b/prog/dump/isaset.c
-index e743755..85a4f64 100644
---- a/prog/dump/isaset.c
-+++ b/prog/dump/isaset.c
-@@ -32,13 +32,7 @@
- #include <string.h>
- #include "util.h"
-
--
--/* To keep glibc2 happy */
--#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0
- #include <sys/io.h>
--#else
--#include <asm/io.h>
--#endif
-
- #ifdef __powerpc__
- unsigned long isa_io_base = 0; /* XXX for now */
-diff --git a/prog/dump/superio.c b/prog/dump/superio.c
-index 64ef27b..906fe55 100644
---- a/prog/dump/superio.c
-+++ b/prog/dump/superio.c
-@@ -20,12 +20,7 @@
- */
-
- #include <stdlib.h>
--
--#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0
- #include <sys/io.h>
--#else
--#include <asm/io.h>
--#endif
-
- #include "superio.h"
-
-diff --git a/prog/dump/util.c b/prog/dump/util.c
-index 874c1b9..197fa64 100644
---- a/prog/dump/util.c
-+++ b/prog/dump/util.c
-@@ -11,12 +11,7 @@
- #include <stdio.h>
- #include "util.h"
-
--/* To keep glibc2 happy */
--#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0
- #include <sys/io.h>
--#else
--#include <asm/io.h>
--#endif
-
- /* Return 1 if we should continue, 0 if we should abort */
- int user_ack(int def)
---
-2.13.3
-
diff --git a/external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.4.0.bb b/external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.6.0.bb
index ffab5d6b..890db55b 100644
--- a/external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.4.0.bb
+++ b/external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.6.0.bb
@@ -1,44 +1,48 @@
-SUMMARY = "lm_sensors"
-DESCRIPTION = "Hardware health monitoring applications"
-HOMEPAGE = "http://www.lm-sensors.org/"
+SUMMARY = "Hardware health monitoring applications"
+HOMEPAGE = "https://hwmon.wiki.kernel.org/"
LICENSE = "GPLv2+ & LGPLv2.1+"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c"
-DEPENDS = "sysfsutils virtual/libiconv bison-native flex-native rrdtool"
+DEPENDS = " \
+ bison-native \
+ flex-native \
+ virtual/libiconv \
+"
-SRC_URI = "https://github.com/groeck/lm-sensors/archive/V3-4-0.tar.gz \
+SRC_URI = "git://github.com/lm-sensors/lm-sensors.git;protocol=https \
file://fancontrol.init \
file://sensord.init \
- file://0001-lmsensors-sensors-detect-print-a-special-message-whe.patch \
- file://0001-prog-Do-not-limit-sys-io.h-header-include-to-just-gl.patch \
"
-SRC_URI[md5sum] = "1e9f117cbfa11be1955adc96df71eadb"
-SRC_URI[sha256sum] = "e334c1c2b06f7290e3e66bdae330a5d36054701ffd47a5dde7a06f9a7402cb4e"
-
-# It is using '-' but not '.' as delimiter for the version in the releases page,
-# which causes the version comparison unmatched.
-#UPSTREAM_CHECK_URI = "https://github.com/groeck/lm-sensors/releases"
-
-RECIPE_UPSTREAM_VERSION = "3.4.0"
-RECIPE_UPSTREAM_DATE = "Jun 25, 2015"
-CHECK_DATE = "May 28, 2018"
+SRCREV = "1667b850a1ce38151dae17156276f981be6fb557"
inherit update-rc.d systemd
RDEPENDS_${PN}-dev = ""
-INITSCRIPT_PACKAGES = "${PN}-fancontrol ${PN}-sensord"
+PACKAGECONFIG ??= "sensord"
+PACKAGECONFIG[sensord] = "sensord,,rrdtool"
+
+INITSCRIPT_PACKAGES = "\
+ ${PN}-fancontrol \
+ ${@bb.utils.contains('PACKAGECONFIG', 'sensord', '${PN}-sensord', '', d)} \
+ "
INITSCRIPT_NAME_${PN}-fancontrol = "fancontrol"
INITSCRIPT_NAME_${PN}-sensord = "sensord"
INITSCRIPT_PARAMS_${PN}-fancontrol = "defaults 66"
INITSCRIPT_PARAMS_${PN}-sensord = "defaults 67"
-SYSTEMD_PACKAGES = "${PN}-sensord"
-SYSTEMD_SERVICE_${PN}-sensord = "sensord.service lm_sensors.service fancontrol.service"
+SYSTEMD_PACKAGES = "\
+ ${PN} \
+ ${PN}-fancontrol \
+ ${@bb.utils.contains('PACKAGECONFIG', 'sensord', '${PN}-sensord', '', d)} \
+ "
+SYSTEMD_SERVICE_${PN} = "lm_sensors.service"
+SYSTEMD_SERVICE_${PN}-fancontrol = "fancontrol.service"
+SYSTEMD_SERVICE_${PN}-sensord = "sensord.service"
SYSTEMD_AUTO_ENABLE = "disable"
-S = "${WORKDIR}/lm-sensors-3-4-0"
+S = "${WORKDIR}/git"
EXTRA_OEMAKE = 'EXLDFLAGS="${LDFLAGS}" \
MACHINE=${TARGET_ARCH} PREFIX=${prefix} MANDIR=${mandir} \
@@ -51,33 +55,49 @@ do_compile() {
sed -i -e 's/\$(LIBDIR)$/\$(LIBDIR) \$(LDFLAGS)/g' ${S}/Makefile
sed -i -e 's/\$(LIBSHSONAME) -o/$(LIBSHSONAME) \$(LDFLAGS) -o/g' \
${S}/lib/Module.mk
- oe_runmake user PROG_EXTRA="sensors sensord"
+ oe_runmake user PROG_EXTRA="sensors ${PACKAGECONFIG_CONFARGS}"
}
do_install() {
oe_runmake user_install DESTDIR=${D}
- install -m 0755 ${S}/prog/sensord/sensord ${D}${sbindir}
- install -m 0644 ${S}/prog/sensord/sensord.8 ${D}${mandir}/man8
+ if ${@bb.utils.contains('PACKAGECONFIG', 'sensord', 'true', 'false', d)}; then
+ install -m 0755 ${S}/prog/sensord/sensord ${D}${sbindir}
+ install -m 0644 ${S}/prog/sensord/sensord.8 ${D}${mandir}/man8
+ fi
# Install directory
- install -d ${D}${sysconfdir}/init.d
+ install -d ${D}${INIT_D_DIR}
# Install fancontrol init script
- install -m 0755 ${WORKDIR}/fancontrol.init \
- ${D}${sysconfdir}/init.d/fancontrol
+ install -m 0755 ${WORKDIR}/fancontrol.init ${D}${INIT_D_DIR}/fancontrol
- # Install sensord init script
- install -m 0755 ${WORKDIR}/sensord.init ${D}${sysconfdir}/init.d/sensord
+ if ${@bb.utils.contains('PACKAGECONFIG', 'sensord', 'true', 'false', d)}; then
+ # Install sensord init script
+ install -m 0755 ${WORKDIR}/sensord.init ${D}${INIT_D_DIR}/sensord
+ fi
# Insall sensord service script
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${S}/prog/init/*.service ${D}${systemd_unitdir}/system
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${S}/prog/init/*.service ${D}${systemd_unitdir}/system
+ if ! ${@bb.utils.contains('PACKAGECONFIG', 'sensord', 'true', 'false', d)}; then
+ rm ${D}${systemd_system_unitdir}/sensord.service
fi
}
RPROVIDES_${PN}-dbg += "${PN}-libsensors-dbg ${PN}-sensors-dbg ${PN}-sensord-dbg ${PN}-isatools-dbg"
+ALLOW_EMPTY_${PN} = "1"
+RDEPENDS_${PN} += " \
+ ${PN}-libsensors \
+ ${PN}-sensors \
+ ${@bb.utils.contains('PACKAGECONFIG', 'sensord', '${PN}-sensord', '', d)} \
+ ${PN}-fancontrol \
+ ${PN}-sensorsdetect \
+ ${PN}-sensorsconfconvert \
+ ${PN}-pwmconfig \
+ ${PN}-isatools \
+"
+
# libsensors packages
PACKAGES =+ "${PN}-libsensors ${PN}-libsensors-dev ${PN}-libsensors-staticdev ${PN}-libsensors-doc"
@@ -85,7 +105,7 @@ PACKAGES =+ "${PN}-libsensors ${PN}-libsensors-dev ${PN}-libsensors-staticdev ${
PACKAGES =+ "${PN}-sensors ${PN}-sensors-doc"
# sensord logging daemon
-PACKAGES =+ "${PN}-sensord ${PN}-sensord-doc"
+PACKAGES =+ "${@bb.utils.contains('PACKAGECONFIG', 'sensord', '${PN}-sensord ${PN}-sensord-doc', '', d)}"
# fancontrol script
PACKAGES =+ "${PN}-fancontrol ${PN}-fancontrol-doc"
@@ -116,13 +136,13 @@ FILES_${PN}-sensors-doc = "${mandir}/man1 ${mandir}/man5"
RDEPENDS_${PN}-sensors = "${PN}-libsensors"
# sensord logging daemon
-FILES_${PN}-sensord = "${sbindir}/sensord ${sysconfdir}/init.d/sensord ${systemd_unitdir}/system/sensord.service"
+FILES_${PN}-sensord = "${sbindir}/sensord ${INIT_D_DIR}/sensord ${systemd_system_unitdir}/sensord.service"
FILES_${PN}-sensord-doc = "${mandir}/man8/sensord.8"
RDEPENDS_${PN}-sensord = "${PN}-sensors rrdtool"
RRECOMMENDS_${PN}-sensord = "lmsensors-config-sensord"
# fancontrol script files
-FILES_${PN}-fancontrol = "${sbindir}/fancontrol ${sysconfdir}/init.d/fancontrol"
+FILES_${PN}-fancontrol = "${sbindir}/fancontrol ${INIT_D_DIR}/fancontrol"
FILES_${PN}-fancontrol-doc = "${mandir}/man8/fancontrol.8"
RDEPENDS_${PN}-fancontrol = "bash"
RRECOMMENDS_${PN}-fancontrol = "lmsensors-config-fancontrol"
@@ -140,7 +160,7 @@ RDEPENDS_${PN}-sensorsconfconvert = "${PN}-sensors perl perl-modules"
# pwmconfig script files
FILES_${PN}-pwmconfig = "${sbindir}/pwmconfig"
FILES_${PN}-pwmconfig-doc = "${mandir}/man8/pwmconfig.8"
-RDEPENDS_${PN}-pwmconfig = "${PN}-fancontrol"
+RDEPENDS_${PN}-pwmconfig = "${PN}-fancontrol bash"
# isadump and isaset helper program files
FILES_${PN}-isatools = "${sbindir}/isa*"