* [Buildroot] [PATCH] package/mhz: add new package
@ 2023-07-31 10:40 Robert Marko
2023-07-31 10:45 ` Baruch Siach via buildroot
0 siblings, 1 reply; 3+ messages in thread
From: Robert Marko @ 2023-07-31 10:40 UTC (permalink / raw)
To: buildroot; +Cc: Robert Marko, Thomas Petazzoni
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 <robimarko@gmail.com>
---
package/Config.in | 1 +
package/mhz/Config.in | 6 ++++++
package/mhz/mhz.hash | 2 ++
package/mhz/mhz.mk | 21 +++++++++++++++++++++
4 files changed, 30 insertions(+)
create mode 100644 package/mhz/Config.in
create mode 100644 package/mhz/mhz.hash
create mode 100644 package/mhz/mhz.mk
diff --git a/package/Config.in b/package/Config.in
index a60a1a8858..b9b6dd2580 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/mhz/Config.in b/package/mhz/Config.in
new file mode 100644
index 0000000000..2f4af5026e
--- /dev/null
+++ b/package/mhz/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_MHZ
+ bool "mhz"
+ help
+ CPU frequency measurement utility.
+
+ https://github.com/wtarreau/mhz.git
diff --git a/package/mhz/mhz.hash b/package/mhz/mhz.hash
new file mode 100644
index 0000000000..6b39eb4bb7
--- /dev/null
+++ b/package/mhz/mhz.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 1e07bb0d455d63fd33fb87a24f65a803c7c2d920fde4e5b5378b8c1b07de3b47 mhz-11aac2399780a1f7ea9f007b14af0464797d5cf1-br1.tar.gz
diff --git a/package/mhz/mhz.mk b/package/mhz/mhz.mk
new file mode 100644
index 0000000000..c2485995cc
--- /dev/null
+++ b/package/mhz/mhz.mk
@@ -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_CC) $(TARGET_CFLAGS) -o $(@D)/mhz $(@D)/mhz.c
+endef
+
+define MHZ_INSTALL_TARGET_CMDS
+ $(INSTALL) $(@D)/mhz $(TARGET_DIR)/usr/bin/mhz
+endef
+
+$(eval $(generic-package))
--
2.41.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] package/mhz: add new package
2023-07-31 10:40 [Buildroot] [PATCH] package/mhz: add new package Robert Marko
@ 2023-07-31 10:45 ` Baruch Siach via buildroot
2023-07-31 11:18 ` Robert Marko
0 siblings, 1 reply; 3+ messages in thread
From: Baruch Siach via buildroot @ 2023-07-31 10:45 UTC (permalink / raw)
To: Robert Marko; +Cc: Thomas Petazzoni, buildroot
Hi Robert,
On Mon, Jul 31 2023, Robert Marko 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 <robimarko@gmail.com>
> ---
> package/Config.in | 1 +
> package/mhz/Config.in | 6 ++++++
> package/mhz/mhz.hash | 2 ++
> package/mhz/mhz.mk | 21 +++++++++++++++++++++
> 4 files changed, 30 insertions(+)
> create mode 100644 package/mhz/Config.in
> create mode 100644 package/mhz/mhz.hash
> create mode 100644 package/mhz/mhz.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index a60a1a8858..b9b6dd2580 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -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"
> diff --git a/package/mhz/Config.in b/package/mhz/Config.in
> new file mode 100644
> index 0000000000..2f4af5026e
> --- /dev/null
> +++ b/package/mhz/Config.in
> @@ -0,0 +1,6 @@
> +config BR2_PACKAGE_MHZ
> + bool "mhz"
> + help
> + CPU frequency measurement utility.
> +
> + https://github.com/wtarreau/mhz.git
> diff --git a/package/mhz/mhz.hash b/package/mhz/mhz.hash
> new file mode 100644
> index 0000000000..6b39eb4bb7
> --- /dev/null
> +++ b/package/mhz/mhz.hash
> @@ -0,0 +1,2 @@
> +# Locally calculated
> +sha256 1e07bb0d455d63fd33fb87a24f65a803c7c2d920fde4e5b5378b8c1b07de3b47 mhz-11aac2399780a1f7ea9f007b14af0464797d5cf1-br1.tar.gz
> diff --git a/package/mhz/mhz.mk b/package/mhz/mhz.mk
> new file mode 100644
> index 0000000000..c2485995cc
> --- /dev/null
> +++ b/package/mhz/mhz.mk
> @@ -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_CC) $(TARGET_CFLAGS) -o $(@D)/mhz $(@D)/mhz.c
Have you tried to use the package Makefile? It looks like you only need
to override the 'CC' and 'CFLAGS' variables.
baruch
> +endef
> +
> +define MHZ_INSTALL_TARGET_CMDS
> + $(INSTALL) $(@D)/mhz $(TARGET_DIR)/usr/bin/mhz
> +endef
> +
> +$(eval $(generic-package))
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] package/mhz: add new package
2023-07-31 10:45 ` Baruch Siach via buildroot
@ 2023-07-31 11:18 ` Robert Marko
0 siblings, 0 replies; 3+ messages in thread
From: Robert Marko @ 2023-07-31 11:18 UTC (permalink / raw)
To: Baruch Siach; +Cc: Thomas Petazzoni, buildroot
On Mon, 31 Jul 2023 at 12:48, Baruch Siach <baruch@tkos.co.il> wrote:
>
> Hi Robert,
>
> On Mon, Jul 31 2023, Robert Marko 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 <robimarko@gmail.com>
> > ---
> > package/Config.in | 1 +
> > package/mhz/Config.in | 6 ++++++
> > package/mhz/mhz.hash | 2 ++
> > package/mhz/mhz.mk | 21 +++++++++++++++++++++
> > 4 files changed, 30 insertions(+)
> > create mode 100644 package/mhz/Config.in
> > create mode 100644 package/mhz/mhz.hash
> > create mode 100644 package/mhz/mhz.mk
> >
> > diff --git a/package/Config.in b/package/Config.in
> > index a60a1a8858..b9b6dd2580 100644
> > --- a/package/Config.in
> > +++ b/package/Config.in
> > @@ -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"
> > diff --git a/package/mhz/Config.in b/package/mhz/Config.in
> > new file mode 100644
> > index 0000000000..2f4af5026e
> > --- /dev/null
> > +++ b/package/mhz/Config.in
> > @@ -0,0 +1,6 @@
> > +config BR2_PACKAGE_MHZ
> > + bool "mhz"
> > + help
> > + CPU frequency measurement utility.
> > +
> > + https://github.com/wtarreau/mhz.git
> > diff --git a/package/mhz/mhz.hash b/package/mhz/mhz.hash
> > new file mode 100644
> > index 0000000000..6b39eb4bb7
> > --- /dev/null
> > +++ b/package/mhz/mhz.hash
> > @@ -0,0 +1,2 @@
> > +# Locally calculated
> > +sha256 1e07bb0d455d63fd33fb87a24f65a803c7c2d920fde4e5b5378b8c1b07de3b47 mhz-11aac2399780a1f7ea9f007b14af0464797d5cf1-br1.tar.gz
> > diff --git a/package/mhz/mhz.mk b/package/mhz/mhz.mk
> > new file mode 100644
> > index 0000000000..c2485995cc
> > --- /dev/null
> > +++ b/package/mhz/mhz.mk
> > @@ -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_CC) $(TARGET_CFLAGS) -o $(@D)/mhz $(@D)/mhz.c
>
> Have you tried to use the package Makefile? It looks like you only need
> to override the 'CC' and 'CFLAGS' variables.
Actually no, I had this packaged locally for a long time before it
finally got a license.
Will move to it in v2 as that works fine.
Regards,
Robert
>
> baruch
>
> > +endef
> > +
> > +define MHZ_INSTALL_TARGET_CMDS
> > + $(INSTALL) $(@D)/mhz $(TARGET_DIR)/usr/bin/mhz
> > +endef
> > +
> > +$(eval $(generic-package))
>
>
> --
> ~. .~ Tk Open Systems
> =}------------------------------------------------ooO--U--Ooo------------{=
> - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-31 11:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-31 10:40 [Buildroot] [PATCH] package/mhz: add new package Robert Marko
2023-07-31 10:45 ` Baruch Siach via buildroot
2023-07-31 11:18 ` Robert Marko
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.