[Buildroot] [PATCH] package/mdio-tools: new package

Robert Marko robimarko at gmail.com
Sat Oct 1 19:05:36 UTC 2022


On Sat, 1 Oct 2022 at 20:51, Yann E. MORIN <yann.morin.1998 at free.fr> wrote:
>
> Robert, All,
>
> On 2022-09-28 21:23 +0200, Robert Marko spake thusly:
> > 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 at gmail.com>
> > ---
> [--SNIP--]
> > diff --git a/package/mdio-tools/mdio-tools.mk b/package/mdio-tools/mdio-tools.mk
> > new file mode 100644
> > index 0000000000..e4ea6f8224
> > --- /dev/null
> > +++ b/package/mdio-tools/mdio-tools.mk
> > @@ -0,0 +1,16 @@
> > +################################################################################
> > +#
> > +# 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-only
>
> We do not strictly follow the SPDX nomenclature (because we somewhat
> predate it), so for consistency, this should be just 'GPL-2.0'.

Hi,
I will change it, wasn't really sure what was appropriate so I went with SPDX.

>
> > +MDIO_TOOLS_LICENSE_FILES = COPYING
> > +MDIO_TOOLS_DEPENDENCIES = libmnl
>
> mdio-tools uses pkg-config to look for libmnl, so you also need to add
> host-pkgconf to the _DEPENDENCES.

Will fixup in v2.

>
> > +MDIO_TOOLS_MODULE_SUBDIRS = kernel
>
> I did not have a thorough look, but doesn't mdio-tools need some kernel
> options to always be enabled? IF so, you can do so with:
>
>     define MDIO_TOOLS_LINUX_CONFIG_FIXUPS
>         $(call KCONFIG_ENABLE_OPT,CONFIG_MDIO)
>     endef
>
> (given the package name, it should at least require that, I'd guess, but
> adapt as needed.)

Thanks for reminding me of this, haven't really though of that, but as far as
I can tell it basically needs generic netlink which gets compiled if CONFIG_NET
is set, that is minimum.

CONFIG_MDIO_DEVICE is then required so that mdio buses actually can
be used.

>
> If there had been only the license and host-pkgconf issues, I'd have
> fixed those when applying. But the kernel options are a bit more
> involved, and requie someone who actually knows and uses mdio-tools, to
> come up with the required options. Can you look into that, please?

Will fix this up v2, thanks for the review.
Regards,
Robert
>
> Regards,
> Yann E. MORIN.
>
> > +$(eval $(kernel-module))
> > +$(eval $(autotools-package))
> > --
> > 2.37.3
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot at 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.  |
> '------------------------------^-------^------------------^--------------------'



More information about the buildroot mailing list