Skip to contentSkip to conversation

svn commit: trunk/buildroot/package: lm-sensors

Buildroot aldot at uclibc.org 4 participants 8 messages Sep 1, 2007 – Sep 14, 2007

lore
Share & tools
lore
#0 lore raw

Author: aldot
Date: 2007-09-01 11:01:08 -0700 (Sat, 01 Sep 2007) New Revision: 19756

Log:
- add lm-sensors package

Added:
trunk/buildroot/package/lm-sensors/ trunk/buildroot/package/lm-sensors/Config.in trunk/buildroot/package/lm-sensors/lm-sensors.mk

Modified:
trunk/buildroot/package/Config.in

Changeset:
Modified: trunk/buildroot/package/Config.in
===================================================================

buildroot/package/Config.in +1 -0
@@ -221,6 +221,7 @@
 source "package/libaio/Config.in"
 source "package/libraw1394/Config.in"
 source "package/libusb/Config.in"
+source "package/lm-sensors/Config.in"
 source "package/lvm2/Config.in"
 source "package/mdadm/Config.in"
 source "package/memtester/Config.in"

Added: trunk/buildroot/package/lm-sensors/Config.in
===================================================================

buildroot/package/lm-sensors/Config.in +12 -0
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_LM_SENSORS
+	bool "lm-sensors"
+	select BR2_PACKAGE_LIBSYSFS
+	default n
+	help
+	  Lm-sensors is a hardware health monitoring package for
+	  Linux. It allows you to access information from
+	  temperature, voltage, and fan speed sensors. It
+	  works with most newer systems.
+
+	  http://www.lm-sensors.org/
+

Added: trunk/buildroot/package/lm-sensors/lm-sensors.mk
===================================================================

buildroot/package/lm-sensors/lm-sensors.mk +59 -0

59 lines not on this page · raw message

#1 lore raw

Hi aldot,

make mklibs fails for lm-sensors because of missing lib libsensors.so.3.
When i searched i actually found it in $(LM_SENSORS_DIR)/lib/ folder symbolically linked to libsensors.so.3.1.4. so i think we need to copy it from here to root/usr/lib directory as the sensors binary is placed there.

Regards
Gururaja

Quoted 132 lines · aldot

Author: aldot
Date: 2007-09-01 11:01:08 -0700 (Sat, 01 Sep 2007) New Revision: 19756

Log:
- add lm-sensors package

Added:
trunk/buildroot/package/lm-sensors/ trunk/buildroot/package/lm-sensors/Config.in trunk/buildroot/package/lm-sensors/lm-sensors.mk

Modified:
trunk/buildroot/package/Config.in

Changeset:
Modified: trunk/buildroot/package/Config.in
===================================================================

buildroot/package/Config.in +1 -0
@@ -221,6 +221,7 @@
 source "package/libaio/Config.in"
 source "package/libraw1394/Config.in"
 source "package/libusb/Config.in"
+source "package/lm-sensors/Config.in"
 source "package/lvm2/Config.in"
 source "package/mdadm/Config.in"
 source "package/memtester/Config.in"

Added: trunk/buildroot/package/lm-sensors/Config.in
===================================================================
--- trunk/buildroot/package/lm-sensors/Config.in (rev 0)
+++ trunk/buildroot/package/lm-sensors/Config.in 2007-09-01 18:01:08 UTC
(rev 19756)

buildroot/package/Config.in +12 -0
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_LM_SENSORS
+	bool "lm-sensors"
+	select BR2_PACKAGE_LIBSYSFS
+	default n
+	help
+	  Lm-sensors is a hardware health monitoring package for
+	  Linux. It allows you to access information from
+	  temperature, voltage, and fan speed sensors. It
+	  works with most newer systems.
+
+	  http://www.lm-sensors.org/
+

Added: trunk/buildroot/package/lm-sensors/lm-sensors.mk
===================================================================
--- trunk/buildroot/package/lm-sensors/lm-sensors.mk (rev 0)
+++ trunk/buildroot/package/lm-sensors/lm-sensors.mk 2007-09-01 18:01:08
UTC (rev 19756)

buildroot/package/Config.in +21 -0
@@ -0,0 +1,59 @@
+#############################################################
+#
+# lm-sensors
+#
+#############################################################
+LM_SENSORS_VERSION:=2.10.4
+LM_SENSORS_SOURCE:=lm-sensors_$(LM_SENSORS_VERSION).orig.tar.gz
+LM_SENSORS_PATCH:=lm-sensors_$(LM_SENSORS_VERSION)-1.diff.gz
+LM_SENSORS_SITE:=ftp://ftp.debian.org/debian/pool/main/l/lm-sensors/
+LM_SENSORS_DIR:=$(BUILD_DIR)/lm_sensors-$(LM_SENSORS_VERSION)
+LM_SENSORS_CAT:=$(ZCAT)
+LM_SENSORS_BINARY:=prog/sensors/sensors
+LM_SENSORS_TARGET_BINARY:=usr/bin/sensors
+
+$(DL_DIR)/$(LM_SENSORS_SOURCE):
+	$(WGET) -P $(DL_DIR) $(LM_SENSORS_SITE)/$(LM_SENSORS_SOURCE)
+
+$(DL_DIR)/$(LM_SENSORS_PATCH):
+	$(WGET) -P $(DL_DIR) $(LM_SENSORS_SITE)/$(LM_SENSORS_PATCH)
+
+lm-sensors-source: $(DL_DIR)/$(LM_SENSORS_SOURCE)

$(DL_DIR)/$(LM_SENSORS_PATCH)
+
+$(LM_SENSORS_DIR)/.unpacked: $(DL_DIR)/$(LM_SENSORS_SOURCE) $(DL_DIR)/$(LM_SENSORS_PATCH)

buildroot/package/Config.in +1 -0
+	$(LM_SENSORS_CAT) $(DL_DIR)/$(LM_SENSORS_SOURCE) | tar -C $(BUILD_DIR)

$(TAR_OPTIONS) -

buildroot/package/Config.in +1 -0
+	toolchain/patch-kernel.sh $(LM_SENSORS_DIR) package/lm-sensors/

lm-sensors\*.patch

buildroot/package/Config.in +2 -0
+ifneq ($(LM_SENSORS_PATCH),)
+	(cd $(LM_SENSORS_DIR) && $(LM_SENSORS_CAT) $(DL_DIR)/$(LM_SENSORS_PATCH)

| patch -p1)

buildroot/package/Config.in +2 -0
+	if [ -d $(LM_SENSORS_DIR)/debian/patches ]; then \
+		toolchain/patch-kernel.sh $(LM_SENSORS_DIR)

$(LM_SENSORS_DIR)/debian/patches \*.patch; \

buildroot/package/Config.in +11 -0
+	fi
+endif
+	touch $@
+
+$(LM_SENSORS_DIR)/$(LM_SENSORS_BINARY): $(LM_SENSORS_DIR)/.unpacked
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(LM_SENSORS_DIR) \
+		LINUX="$(LINUX_DIR)" KERNELVERSION=$(LINUX_HEADERS_VERSION) \
+		I2C_HEADERS=$(LINUX_DIR)/include \
+		DESTDIR=$(TARGET_DIR) user
+
+$(TARGET_DIR)/$(LM_SENSORS_TARGET_BINARY):

$(LM_SENSORS_DIR)/$(LM_SENSORS_BINARY)

buildroot/package/Config.in +19 -0
+	cp -dpf $(LM_SENSORS_DIR)/$(LM_SENSORS_BINARY) $@
+	$(STRIP) $(STRIP_STRIP_ALL) $@
+
+lm-sensors: uclibc libsysfs $(TARGET_DIR)/$(LM_SENSORS_TARGET_BINARY)
+
+lm-sensors-clean:
+	-$(MAKE) -C $(LM_SENSORS_DIR) clean
+	rm -f $(TARGET_DIR)/$(LM_SENSORS_TARGET_BINARY)
+
+lm-sensors-dirclean:
+	rm -rf $(LM_SENSORS_DIR)
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_LM_SENSORS)),y)
+TARGETS+=lm-sensors
+endif

_______________________________________________
buildroot mailing list
buildroot at uclibc.org
http://busybox.net/mailman/listinfo/buildroot

Signature · 2 lines
View this message in context: http://www.nabble.com/svn-commit%3A-trunk-buildroot-package%3A--lm-sensors-tf4365242.html#a12670634
Sent from the BuildRoot mailing list archive at Nabble.com.
#2 lore raw
Quoted 2 lines · Hebbar

Hi aldot,

Hi Gururaja

Quoted 5 lines

make mklibs fails for lm-sensors because of missing lib libsensors.so.3.
When i searched i actually found it in $(LM_SENSORS_DIR)/lib/ folder symbolically linked to libsensors.so.3.1.4. so i think we need to copy it from here to root/usr/lib directory as the sensors binary is placed there.

Can you send a tested patch, please?

TIA,

#3 lore raw

Bernhard,

Meant to say thank you for adding this package. I managed to get it building with the following patch:

lm-sensors/lm-sensors.mk +0 -0
Index: package/lm-sensors/lm-sensors.mk
===================================================================
@@ -40,6 +40,10 @@
  $(TARGET_DIR)/$(LM_SENSORS_TARGET_BINARY): 

$(LM_SENSORS_DIR)/$(LM_SENSORS_BINARY)
cp -dpf $(LM_SENSORS_DIR)/$(LM_SENSORS_BINARY) $@ $(STRIP) $(STRIP_STRIP_ALL) $@
+ cp -dpf $(LM_SENSORS_DIR)/etc/sensors.conf.eg
$(TARGET_DIR)/etc/sensors.conf
+ cp -dpf $(LM_SENSORS_DIR)/lib/libsensors.so.3.1.4 $(TARGET_DIR)/lib
+ (cd $(TARGET_DIR)/lib && ln -s libsensors.so.3.1.4 libsensors.so.3)
+ (cd $(TARGET_DIR)/lib && ln -s libsensors.so.3 libsensors.so)

  lm-sensors: uclibc libsysfs $(TARGET_DIR)/$(LM_SENSORS_TARGET_BINARY)
Quoted 16 lines · Bernhard Fischer
Quoted 1 line · Hebbar

Hi aldot,

Hi Gururaja

Quoted 4 lines

make mklibs fails for lm-sensors because of missing lib libsensors.so.3.
When i searched i actually found it in $(LM_SENSORS_DIR)/lib/ folder symbolically linked to libsensors.so.3.1.4. so i think we need to copy it from here to root/usr/lib directory as the sensors binary is placed there.

Can you send a tested patch, please?

TIA,
_______________________________________________
buildroot mailing list
buildroot at uclibc.org
http://busybox.net/mailman/listinfo/buildroot

Signature · 5 lines
------------------------------------------------------------------------
Will Wagner                                     will_wagner at carallon.com
Senior Project Engineer                  Office Tel: +44 (0)20 7371 2032
Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA
------------------------------------------------------------------------
#4 lore raw
Quoted 3 lines · Will Wagner

Bernhard,

Meant to say thank you for adding this package. I managed to get it

welcome.

Quoted 13 lines

building with the following patch:

Index: package/lm-sensors/lm-sensors.mk
===================================================================

lm-sensors/lm-sensors.mk +1 -0
@@ -40,6 +40,10 @@
 $(TARGET_DIR)/$(LM_SENSORS_TARGET_BINARY): 
 $(LM_SENSORS_DIR)/$(LM_SENSORS_BINARY)
 	cp -dpf $(LM_SENSORS_DIR)/$(LM_SENSORS_BINARY) $@
 	$(STRIP) $(STRIP_STRIP_ALL) $@
+	cp -dpf $(LM_SENSORS_DIR)/etc/sensors.conf.eg 

$(TARGET_DIR)/etc/sensors.conf

lm-sensors/lm-sensors.mk

Quoted 3 lines
lm-sensors/lm-sensors.mk +3 -0
+	cp -dpf $(LM_SENSORS_DIR)/lib/libsensors.so.3.1.4 $(TARGET_DIR)/lib
+	(cd $(TARGET_DIR)/lib && ln -s libsensors.so.3.1.4 libsensors.so.3)
+	(cd $(TARGET_DIR)/lib && ln -s libsensors.so.3 libsensors.so)

well, libsensors* should live in usr/lib. Try r19830. Ok now?

thanks,

#5 lore raw

Bernhard,

The only other thing is that the sensors executable needs the /etc/sensors.conf file otherwise it will fail to run. The default file is enormous but it does work.

Quoted 27 lines · Bernhard Fischer
Quoted 3 lines · Will Wagner

Bernhard,

Meant to say thank you for adding this package. I managed to get it

welcome.

Quoted 13 lines

building with the following patch:

Index: package/lm-sensors/lm-sensors.mk
===================================================================

lm-sensors/lm-sensors.mk +1 -0
@@ -40,6 +40,10 @@
 $(TARGET_DIR)/$(LM_SENSORS_TARGET_BINARY): 
 $(LM_SENSORS_DIR)/$(LM_SENSORS_BINARY)
 	cp -dpf $(LM_SENSORS_DIR)/$(LM_SENSORS_BINARY) $@
 	$(STRIP) $(STRIP_STRIP_ALL) $@
+	cp -dpf $(LM_SENSORS_DIR)/etc/sensors.conf.eg 

$(TARGET_DIR)/etc/sensors.conf

lm-sensors/lm-sensors.mk

Quoted 3 lines
lm-sensors/lm-sensors.mk +3 -0
+	cp -dpf $(LM_SENSORS_DIR)/lib/libsensors.so.3.1.4 $(TARGET_DIR)/lib
+	(cd $(TARGET_DIR)/lib && ln -s libsensors.so.3.1.4 libsensors.so.3)
+	(cd $(TARGET_DIR)/lib && ln -s libsensors.so.3 libsensors.so)

well, libsensors* should live in usr/lib. Try r19830. Ok now?

thanks,

Signature · 5 lines
------------------------------------------------------------------------
Will Wagner                                     will_wagner at carallon.com
Senior Project Engineer                  Office Tel: +44 (0)20 7371 2032
Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA
------------------------------------------------------------------------
#6 lore raw
Quoted 5 lines · Will Wagner

Bernhard,

The only other thing is that the sensors executable needs the /etc/sensors.conf file otherwise it will fail to run. The default file is enormous but it does work.

Since i never built it, can you tell me where the .conf lives? Something like this could perhaps strip it a bit (iff there defaults, of course..)

	cp -dpf $(LM_SENSORS_DIR)/the.conf $(TARGET_DIR)/the.conf
	$(SED) '/^#/d' -e "s/#.*//g" -e "/^$/d" $(TARGET_DIR)/the.conf
	# or something like this, perhaps. Manually customize it
	# otherwise, or provide your own, i'd say.

HTH,
Bernhard

#7 lore raw
Quoted 8 lines · Bernhard Fischer
Quoted 5 lines · Will Wagner

Bernhard,

The only other thing is that the sensors executable needs the /etc/sensors.conf file otherwise it will fail to run. The default file is enormous but it does work.

Since i never built it, can you tell me where the .conf lives?

alright. Now i remember that it was me who added it -- shame on me for forgetting to strip off -O2 and not copying the needed files.. fixed now. Sorry