package/mhz: add new package
PATCH v3 1/1 package/mhz: add new package
mhz is a tool to mathematically calculate the real running CPU frequency and as such has proved as invaluable tool for developing CPUFreq and similar features in the kernel.
Its source finally got a license recently so it can be packaged.
---
Changes in v3:
* Add LICENSE file hash
* Simplify build command
Changes in v2:
* Use the Makefile from source and override CC and CFLAGS
--- package/Config.in | 1 + package/mhz/Config.in | 6 ++++++ package/mhz/mhz.hash | 3 +++ package/mhz/mhz.mk | 21 +++++++++++++++++++++ 4 files changed, 31 insertions(+) create mode 100644 package/mhz/Config.in create mode 100644 package/mhz/mhz.hash create mode 100644 package/mhz/mhz.mk
package/Config.in +1 -0
@@ -549,6 +549,7 @@ endmenu source "package/memtest86/Config.in" source "package/memtester/Config.in" source "package/memtool/Config.in" + source "package/mhz/Config.in" source "package/minicom/Config.in" source "package/msr-tools/Config.in" source "package/nanocom/Config.in"
package/mhz/Config.in new file +6 -0
@@ -0,0 +1,6 @@ +config BR2_PACKAGE_MHZ + bool "mhz" + help + CPU frequency measurement utility. + + https://github.com/wtarreau/mhz.git
package/mhz/mhz.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 1e07bb0d455d63fd33fb87a24f65a803c7c2d920fde4e5b5378b8c1b07de3b47 mhz-11aac2399780a1f7ea9f007b14af0464797d5cf1-br1.tar.gz +sha256 9449d373cad921620bb8f1e4f7b39f957e263163ded159c1efc8de27f8997099 LICENSE
package/mhz/mhz.mk new file +21 -0
@@ -0,0 +1,21 @@ +################################################################################ +# +# mhz +# +################################################################################ + +MHZ_VERSION = 11aac2399780a1f7ea9f007b14af0464797d5cf1 +MHZ_SITE = https://github.com/wtarreau/mhz.git +MHZ_SITE_METHOD = git +MHZ_LICENSE = MIT/X11 +MHZ_LICENSE_FILES = LICENSE + +define MHZ_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define MHZ_INSTALL_TARGET_CMDS + $(INSTALL) $(@D)/mhz $(TARGET_DIR)/usr/bin/mhz +endef + +$(eval $(generic-package))
Signature · 6 lines
2.41.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Robert,
Quoted 7 lines · On Mon, 31 Jul 2023 19:05:04 +0200 Robert Marko <[email protected]> wrote:
mhz is a tool to mathematically calculate the real running CPU frequency and as such has proved as invaluable tool for developing CPUFreq and similar features in the kernel.
Its source finally got a license recently so it can be packaged.
Signed-off-by Robert Marko <[email protected]>
I've applied your change, after making a number of tweaks. Many of them had already been pointed out to you in the review of the previous versions, but you did not take them into account.
Quoted 5 lines
package/Config.in | 1 + package/mhz/Config.in | 6 ++++++ package/mhz/mhz.hash | 3 +++ package/mhz/mhz.mk | 21 +++++++++++++++++++++ 4 files changed, 31 insertions(+)
Entry in the DEVELOPERS file was missing.
package/mhz/mhz.hash line 3
Quoted 10 lines
package/mhz/mhz.hash new file +3
-0@@ -0,0 +1,3 @@ +# Locally calculated +sha256 1e07bb0d455d63fd33fb87a24f65a803c7c2d920fde4e5b5378b8c1b07de3b47 mhz-11aac2399780a1f7ea9f007b14af0464797d5cf1-br1.tar.gz +sha256 9449d373cad921620bb8f1e4f7b39f957e263163ded159c1efc8de27f8997099 LICENSE
Missing newline here. This is reported by "make check-package", which verifies basic coding style details.
Quoted 6 lines
package/mhz/mhz.mk new file +0
-0
package/mhz/mhz.mk line 9
Quoted 9 lines
package/mhz/mhz.mk new file +9
-0@@ -0,0 +1,21 @@ +################################################################################ +# +# mhz +# +################################################################################ + +MHZ_VERSION = 11aac2399780a1f7ea9f007b14af0464797d5cf1 +MHZ_SITE = https://github.com/wtarreau/mhz.git +MHZ_SITE_METHOD = git
Switched to using the "github" helper to do an HTTP download instead.
package/mhz/mhz.mk line 10
Quoted 1 line
package/mhz/mhz.mk new file +1
-0+MHZ_LICENSE = MIT/X11
The license is just MIT. X11 is a slightly difference license, and MIT/X11 is not a valid SPDX identifier.
package/mhz/mhz.mk line 18
Quoted 8 lines
package/mhz/mhz.mk new file +8
-0+MHZ_LICENSE_FILES = LICENSE + +define MHZ_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define MHZ_INSTALL_TARGET_CMDS + $(INSTALL) $(@D)/mhz $(TARGET_DIR)/usr/bin/mhz
Missing -D -m 0755 options.
As said: I fixed those small details when applying.
Thanks for your contribution!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot