* [Buildroot] [PATCH 1/1] package/hddtemp: new package
@ 2022-12-11 11:28 Bernd Kuhls
2022-12-11 17:47 ` Yann E. MORIN
0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2022-12-11 11:28 UTC (permalink / raw
To: buildroot; +Cc: Gilles Chanteperdrix, Thomas Petazzoni
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
[Bernd:
- switched to actively maintained fork
- package/Config.in: moved to "Hardware handling" (Peter)
- added toolchain dependencies (Thomas)
- added license hash
- fixed build errors related to iconv and execinfo (Peter)
- removed hook HDDTEMP_REMOVE_MAN (Thomas)
- install hddtemp.db to target
- added build/install _CMDS due to
https://github.com/vitlav/hddtemp/issues/5]
---
Imho this package is still relevant despite the fact that is was removed
from Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1002484
The drivetemp kernel module is only available since kernel 5.6 and nvme
support was added to the current hddtemp fork:
https://github.com/vitlav/hddtemp/commit/edcb4db5acd806010925ccf7bf58f1968cf54df3
Building this defconfig
BR2_PACKAGE_HDDTEMP=y
finished without errors:
arm-aarch64 [ 1/44]: OK
bootlin-aarch64-glibc [ 2/44]: OK
bootlin-arcle-hs38-uclibc [ 3/44]: OK
bootlin-armv5-uclibc [ 4/44]: OK
bootlin-armv7-glibc [ 5/44]: OK
bootlin-armv7m-uclibc [ 6/44]: SKIPPED
bootlin-armv7-musl [ 7/44]: OK
bootlin-m68k-5208-uclibc [ 8/44]: SKIPPED
bootlin-m68k-68040-uclibc [ 9/44]: OK
bootlin-microblazeel-uclibc [10/44]: OK
bootlin-mipsel32r6-glibc [11/44]: OK
bootlin-mipsel-uclibc [12/44]: OK
bootlin-nios2-glibc [13/44]: OK
bootlin-openrisc-uclibc [14/44]: OK
bootlin-powerpc64le-power8-glibc [15/44]: OK
bootlin-powerpc-e500mc-uclibc [16/44]: OK
bootlin-riscv32-glibc [17/44]: OK
bootlin-riscv64-glibc [18/44]: OK
bootlin-riscv64-musl [19/44]: OK
bootlin-sh4-uclibc [20/44]: OK
bootlin-sparc64-glibc [21/44]: OK
bootlin-sparc-uclibc [22/44]: OK
bootlin-x86-64-glibc [23/44]: OK
bootlin-x86-64-musl [24/44]: OK
bootlin-x86-64-uclibc [25/44]: OK
bootlin-xtensa-uclibc [26/44]: OK
br-arm-basic [27/44]: OK
br-arm-full-nothread [28/44]: OK
br-arm-full-static [29/44]: SKIPPED
br-i386-pentium4-full [30/44]: OK
br-i386-pentium-mmx-musl [31/44]: OK
br-mips64-n64-full [32/44]: OK
br-mips64r6-el-hf-glibc [33/44]: OK
br-powerpc-603e-basic-cpp [34/44]: OK
br-powerpc64-power7-glibc [35/44]: OK
linaro-aarch64-be [36/44]: OK
linaro-aarch64 [37/44]: OK
linaro-arm [38/44]: OK
sourcery-arm-armv4t [39/44]: OK
sourcery-arm [40/44]: OK
sourcery-arm-thumb2 [41/44]: OK
sourcery-mips64 [42/44]: OK
sourcery-mips [43/44]: OK
sourcery-nios2 [44/44]: OK
44 builds, 3 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
DEVELOPERS | 1 +
package/Config.in | 1 +
package/hddtemp/Config.in | 17 ++++++++++++++
package/hddtemp/hddtemp.hash | 3 +++
package/hddtemp/hddtemp.mk | 44 ++++++++++++++++++++++++++++++++++++
5 files changed, 66 insertions(+)
create mode 100644 package/hddtemp/Config.in
create mode 100644 package/hddtemp/hddtemp.hash
create mode 100644 package/hddtemp/hddtemp.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 6e30f50472..03ff139128 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -345,6 +345,7 @@ F: package/glmark2/
F: package/gpsd/
F: package/gptfdisk/
F: package/hdparm/
+F: package/hddtemp/
F: package/inih/
F: package/intel-gmmlib/
F: package/intel-mediadriver/
diff --git a/package/Config.in b/package/Config.in
index bf3ee3cc7c..cc240bf7cd 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -508,6 +508,7 @@ endmenu
source "package/gpsd/Config.in"
source "package/gptfdisk/Config.in"
source "package/gvfs/Config.in"
+ source "package/hddtemp/Config.in"
source "package/hdparm/Config.in"
source "package/hwdata/Config.in"
source "package/hwloc/Config.in"
diff --git a/package/hddtemp/Config.in b/package/hddtemp/Config.in
new file mode 100644
index 0000000000..0e02252461
--- /dev/null
+++ b/package/hddtemp/Config.in
@@ -0,0 +1,17 @@
+config BR2_PACKAGE_HDDTEMP
+ bool "hddtemp"
+ depends on BR2_USE_MMU # fork()
+ depends on !BR2_STATIC_LIBS
+ select BR2_PACKAGE_LIBEXECINFO if !BR2_TOOLCHAIN_USES_GLIBC
+ select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
+ help
+ hddtemp is a small utility that gives you the temperature of
+ your hard drive by reading S.M.A.R.T. informations, for drives
+ that support this feature.
+
+ https://github.com/vitlav/hddtemp
+ http://www.guzu.net/linux/hddtemp.php
+
+comment "hddtemp needs dynamic library"
+ depends on BR2_USE_MMU
+ depends on BR2_STATIC_LIBS
diff --git a/package/hddtemp/hddtemp.hash b/package/hddtemp/hddtemp.hash
new file mode 100644
index 0000000000..cd82d7f89b
--- /dev/null
+++ b/package/hddtemp/hddtemp.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 592322c64f0d5f035132249e3d051b752f5d24867514522a17285d5e72d21075 hddtemp-0.4.3.tar.gz
+sha256 e6d6a009505e345fe949e1310334fcb0747f28dae2856759de102ab66b722cb4 GPL-2
diff --git a/package/hddtemp/hddtemp.mk b/package/hddtemp/hddtemp.mk
new file mode 100644
index 0000000000..ac93a4ed25
--- /dev/null
+++ b/package/hddtemp/hddtemp.mk
@@ -0,0 +1,44 @@
+################################################################################
+#
+# hddtemp
+#
+################################################################################
+
+HDDTEMP_VERSION = 0.4.3
+HDDTEMP_SITE = $(call github,vitlav,hddtemp,v$(HDDTEMP_VERSION))
+HDDTEMP_LICENSE = GPLv2
+HDDTEMP_LICENSE_FILES = GPL-2
+# Fetched from Github with no configure script
+HDDTEMP_AUTORECONF = YES
+# needed for autoreconf
+HDDTEMP_DEPENDENCIES = host-gettext
+HDDTEMP_CONF_ENV = LIBS="$(HDDTEMP_LIBS)"
+
+ifeq ($(BR2_PACKAGE_LIBEXECINFO),y)
+HDDTEMP_DEPENDENCIES += libexecinfo
+HDDTEMP_LIBS += -lexecinfo
+endif
+
+ifeq ($(BR2_PACKAGE_LIBICONV),y)
+HDDTEMP_DEPENDENCIES += libiconv
+HDDTEMP_LIBS += -liconv
+endif
+
+# prevent loop in po/ while building
+define HDDTEMP_BUILD_CMDS
+ cd $(@D)/src; \
+ $(TARGET_MAKE_ENV) $(MAKE)
+endef
+
+# prevent loop in po/ while building
+define HDDTEMP_INSTALL_TARGET_CMDS
+ cd $(@D)/src; \
+ $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) install
+endef
+
+define HDDTEMP_INSTALL_HDDTEMP_DB
+ $(INSTALL) -D $(@D)/data/hddtemp.db $(TARGET_DIR)/usr/share/misc/hddtemp.db
+endef
+HDDTEMP_POST_INSTALL_TARGET_HOOKS += HDDTEMP_INSTALL_HDDTEMP_DB
+
+$(eval $(autotools-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/hddtemp: new package
2022-12-11 11:28 [Buildroot] [PATCH 1/1] package/hddtemp: new package Bernd Kuhls
@ 2022-12-11 17:47 ` Yann E. MORIN
0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2022-12-11 17:47 UTC (permalink / raw
To: Bernd Kuhls; +Cc: Thomas Petazzoni, buildroot
Bernd, All,
On 2022-12-11 12:28 +0100, Bernd Kuhls spake thusly:
> From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Unfortunately, Gilles will never be able to reply:
https://source.denx.de/Xenomai/xenomai/-/wikis/Gilles_Chanteperdrix
so I dropped it from the list of Cc...
Still, it was nice of you to keep authorship to him, and so did I.
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> [Bernd:
> - switched to actively maintained fork
> - package/Config.in: moved to "Hardware handling" (Peter)
> - added toolchain dependencies (Thomas)
> - added license hash
> - fixed build errors related to iconv and execinfo (Peter)
> - removed hook HDDTEMP_REMOVE_MAN (Thomas)
> - install hddtemp.db to target
> - added build/install _CMDS due to
> https://github.com/vitlav/hddtemp/issues/5]
I've done quite a few more changes to actually fix the gettext issue
in the po/ subdir:
- use GETTEXTIZE=YES, drop host-gettext from _DEPENDENCIES
- drop custom build and install commands now that we gettextize
- explicitly specify the DB path, introduce HDDTEMP_DB_PATH
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> Imho this package is still relevant despite the fact that is was removed
> from Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1002484
> The drivetemp kernel module is only available since kernel 5.6 and nvme
> support was added to the current hddtemp fork:
> https://github.com/vitlav/hddtemp/commit/edcb4db5acd806010925ccf7bf58f1968cf54df3
>
> Building this defconfig
>
> BR2_PACKAGE_HDDTEMP=y
>
> finished without errors:
>
> arm-aarch64 [ 1/44]: OK
> bootlin-aarch64-glibc [ 2/44]: OK
> bootlin-arcle-hs38-uclibc [ 3/44]: OK
> bootlin-armv5-uclibc [ 4/44]: OK
> bootlin-armv7-glibc [ 5/44]: OK
> bootlin-armv7m-uclibc [ 6/44]: SKIPPED
> bootlin-armv7-musl [ 7/44]: OK
> bootlin-m68k-5208-uclibc [ 8/44]: SKIPPED
> bootlin-m68k-68040-uclibc [ 9/44]: OK
> bootlin-microblazeel-uclibc [10/44]: OK
> bootlin-mipsel32r6-glibc [11/44]: OK
> bootlin-mipsel-uclibc [12/44]: OK
> bootlin-nios2-glibc [13/44]: OK
> bootlin-openrisc-uclibc [14/44]: OK
> bootlin-powerpc64le-power8-glibc [15/44]: OK
> bootlin-powerpc-e500mc-uclibc [16/44]: OK
> bootlin-riscv32-glibc [17/44]: OK
> bootlin-riscv64-glibc [18/44]: OK
> bootlin-riscv64-musl [19/44]: OK
> bootlin-sh4-uclibc [20/44]: OK
> bootlin-sparc64-glibc [21/44]: OK
> bootlin-sparc-uclibc [22/44]: OK
> bootlin-x86-64-glibc [23/44]: OK
> bootlin-x86-64-musl [24/44]: OK
> bootlin-x86-64-uclibc [25/44]: OK
> bootlin-xtensa-uclibc [26/44]: OK
> br-arm-basic [27/44]: OK
> br-arm-full-nothread [28/44]: OK
> br-arm-full-static [29/44]: SKIPPED
> br-i386-pentium4-full [30/44]: OK
> br-i386-pentium-mmx-musl [31/44]: OK
> br-mips64-n64-full [32/44]: OK
> br-mips64r6-el-hf-glibc [33/44]: OK
> br-powerpc-603e-basic-cpp [34/44]: OK
> br-powerpc64-power7-glibc [35/44]: OK
> linaro-aarch64-be [36/44]: OK
> linaro-aarch64 [37/44]: OK
> linaro-arm [38/44]: OK
> sourcery-arm-armv4t [39/44]: OK
> sourcery-arm [40/44]: OK
> sourcery-arm-thumb2 [41/44]: OK
> sourcery-mips64 [42/44]: OK
> sourcery-mips [43/44]: OK
> sourcery-nios2 [44/44]: OK
> 44 builds, 3 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
>
> DEVELOPERS | 1 +
> package/Config.in | 1 +
> package/hddtemp/Config.in | 17 ++++++++++++++
> package/hddtemp/hddtemp.hash | 3 +++
> package/hddtemp/hddtemp.mk | 44 ++++++++++++++++++++++++++++++++++++
> 5 files changed, 66 insertions(+)
> create mode 100644 package/hddtemp/Config.in
> create mode 100644 package/hddtemp/hddtemp.hash
> create mode 100644 package/hddtemp/hddtemp.mk
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 6e30f50472..03ff139128 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -345,6 +345,7 @@ F: package/glmark2/
> F: package/gpsd/
> F: package/gptfdisk/
> F: package/hdparm/
> +F: package/hddtemp/
> F: package/inih/
> F: package/intel-gmmlib/
> F: package/intel-mediadriver/
> diff --git a/package/Config.in b/package/Config.in
> index bf3ee3cc7c..cc240bf7cd 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -508,6 +508,7 @@ endmenu
> source "package/gpsd/Config.in"
> source "package/gptfdisk/Config.in"
> source "package/gvfs/Config.in"
> + source "package/hddtemp/Config.in"
> source "package/hdparm/Config.in"
> source "package/hwdata/Config.in"
> source "package/hwloc/Config.in"
> diff --git a/package/hddtemp/Config.in b/package/hddtemp/Config.in
> new file mode 100644
> index 0000000000..0e02252461
> --- /dev/null
> +++ b/package/hddtemp/Config.in
> @@ -0,0 +1,17 @@
> +config BR2_PACKAGE_HDDTEMP
> + bool "hddtemp"
> + depends on BR2_USE_MMU # fork()
> + depends on !BR2_STATIC_LIBS
> + select BR2_PACKAGE_LIBEXECINFO if !BR2_TOOLCHAIN_USES_GLIBC
> + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
> + help
> + hddtemp is a small utility that gives you the temperature of
> + your hard drive by reading S.M.A.R.T. informations, for drives
> + that support this feature.
> +
> + https://github.com/vitlav/hddtemp
> + http://www.guzu.net/linux/hddtemp.php
> +
> +comment "hddtemp needs dynamic library"
> + depends on BR2_USE_MMU
> + depends on BR2_STATIC_LIBS
> diff --git a/package/hddtemp/hddtemp.hash b/package/hddtemp/hddtemp.hash
> new file mode 100644
> index 0000000000..cd82d7f89b
> --- /dev/null
> +++ b/package/hddtemp/hddtemp.hash
> @@ -0,0 +1,3 @@
> +# Locally calculated
> +sha256 592322c64f0d5f035132249e3d051b752f5d24867514522a17285d5e72d21075 hddtemp-0.4.3.tar.gz
> +sha256 e6d6a009505e345fe949e1310334fcb0747f28dae2856759de102ab66b722cb4 GPL-2
> diff --git a/package/hddtemp/hddtemp.mk b/package/hddtemp/hddtemp.mk
> new file mode 100644
> index 0000000000..ac93a4ed25
> --- /dev/null
> +++ b/package/hddtemp/hddtemp.mk
> @@ -0,0 +1,44 @@
> +################################################################################
> +#
> +# hddtemp
> +#
> +################################################################################
> +
> +HDDTEMP_VERSION = 0.4.3
> +HDDTEMP_SITE = $(call github,vitlav,hddtemp,v$(HDDTEMP_VERSION))
> +HDDTEMP_LICENSE = GPLv2
> +HDDTEMP_LICENSE_FILES = GPL-2
> +# Fetched from Github with no configure script
> +HDDTEMP_AUTORECONF = YES
> +# needed for autoreconf
> +HDDTEMP_DEPENDENCIES = host-gettext
> +HDDTEMP_CONF_ENV = LIBS="$(HDDTEMP_LIBS)"
> +
> +ifeq ($(BR2_PACKAGE_LIBEXECINFO),y)
> +HDDTEMP_DEPENDENCIES += libexecinfo
> +HDDTEMP_LIBS += -lexecinfo
> +endif
> +
> +ifeq ($(BR2_PACKAGE_LIBICONV),y)
> +HDDTEMP_DEPENDENCIES += libiconv
> +HDDTEMP_LIBS += -liconv
> +endif
> +
> +# prevent loop in po/ while building
> +define HDDTEMP_BUILD_CMDS
> + cd $(@D)/src; \
> + $(TARGET_MAKE_ENV) $(MAKE)
> +endef
> +
> +# prevent loop in po/ while building
> +define HDDTEMP_INSTALL_TARGET_CMDS
> + cd $(@D)/src; \
> + $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) install
> +endef
> +
> +define HDDTEMP_INSTALL_HDDTEMP_DB
> + $(INSTALL) -D $(@D)/data/hddtemp.db $(TARGET_DIR)/usr/share/misc/hddtemp.db
> +endef
> +HDDTEMP_POST_INSTALL_TARGET_HOOKS += HDDTEMP_INSTALL_HDDTEMP_DB
> +
> +$(eval $(autotools-package))
> --
> 2.34.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-11 17:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-11 11:28 [Buildroot] [PATCH 1/1] package/hddtemp: new package Bernd Kuhls
2022-12-11 17:47 ` Yann E. MORIN
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.