* [Buildroot] [PATCH v3] package/mdio-tools: new package
@ 2022-10-27 8:56 Robert Marko
2022-10-27 9:55 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 3+ messages in thread
From: Robert Marko @ 2022-10-27 8:56 UTC (permalink / raw)
To: yann.morin.1998, thomas.petazzoni, buildroot, angelo; +Cc: Robert Marko
mdio-tools are kernel module and accompanying tools for low-level
debugging of devices attached on MDIO bus like PHY-s, switches etc.
Userspace tools provide C22 or C45 reads and writes, benchmarking
and even dedicated Marvell Link Street tools via the included
kernel module.
Signed-off-by: Robert Marko <robimarko@gmail.com>
---
Changes in v3:
* Add dependecy on 5.1 headers
Changes in v2:
* Correct license
* Add host-pkgconf to DEPENDENCIES
* Add minimal required kernel config options
---
package/Config.in | 1 +
package/mdio-tools/Config.in | 10 ++++++++++
package/mdio-tools/mdio-tools.hash | 3 +++
package/mdio-tools/mdio-tools.mk | 20 ++++++++++++++++++++
4 files changed, 34 insertions(+)
create mode 100644 package/mdio-tools/Config.in
create mode 100644 package/mdio-tools/mdio-tools.hash
create mode 100644 package/mdio-tools/mdio-tools.mk
diff --git a/package/Config.in b/package/Config.in
index e3a34d6e97..ed41e8bdd4 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -536,6 +536,7 @@ endmenu
source "package/mbpfan/Config.in"
source "package/mdadm/Config.in"
source "package/mdevd/Config.in"
+ source "package/mdio-tools/Config.in"
source "package/memtest86/Config.in"
source "package/memtester/Config.in"
source "package/memtool/Config.in"
diff --git a/package/mdio-tools/Config.in b/package/mdio-tools/Config.in
new file mode 100644
index 0000000000..8a09bf19a7
--- /dev/null
+++ b/package/mdio-tools/Config.in
@@ -0,0 +1,10 @@
+comment "mdio-tools needs a Linux kernel to be built"
+ depends on !BR2_LINUX_KERNEL
+
+config BR2_PACKAGE_MDIO_TOOLS
+ bool "mdio-tools"
+ depends on BR2_LINUX_KERNEL
+ depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
+ select BR2_PACKAGE_LIBMNL
+ help
+ Low-level debug tools for MDIO devices
diff --git a/package/mdio-tools/mdio-tools.hash b/package/mdio-tools/mdio-tools.hash
new file mode 100644
index 0000000000..0111165f27
--- /dev/null
+++ b/package/mdio-tools/mdio-tools.hash
@@ -0,0 +1,3 @@
+# Locally computed
+sha256 c5e17431c62392f6c1da1ba4fb0a6f5918521509a377af74485851f93ff2a106 mdio-tools-1.2.0.tar.gz
+sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
diff --git a/package/mdio-tools/mdio-tools.mk b/package/mdio-tools/mdio-tools.mk
new file mode 100644
index 0000000000..308a23824b
--- /dev/null
+++ b/package/mdio-tools/mdio-tools.mk
@@ -0,0 +1,20 @@
+################################################################################
+#
+# mdio-tools
+#
+################################################################################
+
+MDIO_TOOLS_VERSION = 1.2.0
+MDIO_TOOLS_SITE = https://github.com/wkz/mdio-tools/releases/download/$(MDIO_TOOLS_VERSION)
+MDIO_TOOLS_LICENSE = GPL-2.0
+MDIO_TOOLS_LICENSE_FILES = COPYING
+MDIO_TOOLS_DEPENDENCIES = host-pkgconf libmnl
+
+MDIO_TOOLS_MODULE_SUBDIRS = kernel
+define MDIO_TOOLS_LINUX_CONFIG_FIXUPS
+ $(call KCONFIG_ENABLE_OPT,CONFIG_NET)
+ $(call KCONFIG_ENABLE_OPT,CONFIG_MDIO_DEVICE)
+endef
+
+$(eval $(kernel-module))
+$(eval $(autotools-package))
--
2.37.3
_______________________________________________
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 v3] package/mdio-tools: new package
2022-10-27 8:56 [Buildroot] [PATCH v3] package/mdio-tools: new package Robert Marko
@ 2022-10-27 9:55 ` Thomas Petazzoni via buildroot
2022-10-27 9:58 ` Robert Marko
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-10-27 9:55 UTC (permalink / raw)
To: Robert Marko; +Cc: angelo, yann.morin.1998, buildroot
Hello Robert,
On Thu, 27 Oct 2022 10:56:28 +0200
Robert Marko <robimarko@gmail.com> wrote:
> mdio-tools are kernel module and accompanying tools for low-level
> debugging of devices attached on MDIO bus like PHY-s, switches etc.
>
> Userspace tools provide C22 or C45 reads and writes, benchmarking
> and even dedicated Marvell Link Street tools via the included
> kernel module.
>
> Signed-off-by: Robert Marko <robimarko@gmail.com>
Thanks, I have applied your patch, with two small changes. See below.
> package/Config.in | 1 +
> package/mdio-tools/Config.in | 10 ++++++++++
> package/mdio-tools/mdio-tools.hash | 3 +++
> package/mdio-tools/mdio-tools.mk | 20 ++++++++++++++++++++
> 4 files changed, 34 insertions(+)
The entry in the DEVELOPERS file was missing, so I've added it.
> diff --git a/package/mdio-tools/Config.in b/package/mdio-tools/Config.in
> new file mode 100644
> index 0000000000..8a09bf19a7
> --- /dev/null
> +++ b/package/mdio-tools/Config.in
> @@ -0,0 +1,10 @@
> +comment "mdio-tools needs a Linux kernel to be built"
> + depends on !BR2_LINUX_KERNEL
> +
> +config BR2_PACKAGE_MDIO_TOOLS
> + bool "mdio-tools"
> + depends on BR2_LINUX_KERNEL
> + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
We like to have a Config.in comment corresponding to this dependency,
so I've added it:
+comment "mdio-tools needs a toolchain w/ headers >= 5.1"
+ depends on !BR2_LINUX_KERNEL
+ depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
And I know I realize that the depends on !BR2_LINUX_KERNEL should have
been a depends on BR2_LINUX_KERNEL. I will fix that up.
Thanks for the contribution!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
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 v3] package/mdio-tools: new package
2022-10-27 9:55 ` Thomas Petazzoni via buildroot
@ 2022-10-27 9:58 ` Robert Marko
0 siblings, 0 replies; 3+ messages in thread
From: Robert Marko @ 2022-10-27 9:58 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: angelo, yann.morin.1998, buildroot
On Thu, 27 Oct 2022 at 11:55, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello Robert,
>
> On Thu, 27 Oct 2022 10:56:28 +0200
> Robert Marko <robimarko@gmail.com> wrote:
>
> > mdio-tools are kernel module and accompanying tools for low-level
> > debugging of devices attached on MDIO bus like PHY-s, switches etc.
> >
> > Userspace tools provide C22 or C45 reads and writes, benchmarking
> > and even dedicated Marvell Link Street tools via the included
> > kernel module.
> >
> > Signed-off-by: Robert Marko <robimarko@gmail.com>
>
> Thanks, I have applied your patch, with two small changes. See below.
>
> > package/Config.in | 1 +
> > package/mdio-tools/Config.in | 10 ++++++++++
> > package/mdio-tools/mdio-tools.hash | 3 +++
> > package/mdio-tools/mdio-tools.mk | 20 ++++++++++++++++++++
> > 4 files changed, 34 insertions(+)
>
> The entry in the DEVELOPERS file was missing, so I've added it.
>
> > diff --git a/package/mdio-tools/Config.in b/package/mdio-tools/Config.in
> > new file mode 100644
> > index 0000000000..8a09bf19a7
> > --- /dev/null
> > +++ b/package/mdio-tools/Config.in
> > @@ -0,0 +1,10 @@
> > +comment "mdio-tools needs a Linux kernel to be built"
> > + depends on !BR2_LINUX_KERNEL
> > +
> > +config BR2_PACKAGE_MDIO_TOOLS
> > + bool "mdio-tools"
> > + depends on BR2_LINUX_KERNEL
> > + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
>
> We like to have a Config.in comment corresponding to this dependency,
> so I've added it:
>
> +comment "mdio-tools needs a toolchain w/ headers >= 5.1"
> + depends on !BR2_LINUX_KERNEL
> + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
>
> And I know I realize that the depends on !BR2_LINUX_KERNEL should have
> been a depends on BR2_LINUX_KERNEL. I will fix that up.
Thanks for fixing it up, it is my first time contributing to Buildroot
so its all a bit
new to me.
Regards,
Robert
>
> Thanks for the contribution!
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
_______________________________________________
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:[~2022-10-27 9:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-27 8:56 [Buildroot] [PATCH v3] package/mdio-tools: new package Robert Marko
2022-10-27 9:55 ` Thomas Petazzoni via buildroot
2022-10-27 9:58 ` 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.