From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Brandon Maier <brandon.maier@collins.com>
Cc: Bernd Kuhls <bernd@kuhls.net>,
"Neal J. Buchmeyer" <neal.buchmeyer@collins.com>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/wireless_tools: add option to build ifrename
Date: Sun, 22 Oct 2023 20:47:39 +0200 [thread overview]
Message-ID: <20231022184739.GU2607@scaer> (raw)
In-Reply-To: <20231019203338.6450-1-brandon.maier@collins.com>
Brandon, Neal, All,
On 2023-10-19 20:33 +0000, Brandon Maier via buildroot spake thusly:
> From: "Neal J. Buchmeyer" <neal.buchmeyer@collins.com>
>
> Add option to select ifrename tool which is part of the wireless_tools
> suite. Also add an option to disable iwconfig for targets that only want
> the library or ifrename.
Those are two semantically disjoint changes, so they should be two
patches, preferably in this order:
1. one to allow only building the library (and make iwconfig optional)
2. one to add ifrename
Plus, see below...
> Signed-off-by: Neal J. Buchmeyer <neal.buchmeyer@collins.com>
> Signed-off-by: Brandon Maier <brandon.maier@collins.com>
> ---
> package/wireless_tools/Config.in | 12 ++++++++++++
> package/wireless_tools/wireless_tools.mk | 22 ++++++++++++++++------
> 2 files changed, 28 insertions(+), 6 deletions(-)
>
> diff --git a/package/wireless_tools/Config.in b/package/wireless_tools/Config.in
> index 349908dbde..ad1c2e8e82 100644
> --- a/package/wireless_tools/Config.in
> +++ b/package/wireless_tools/Config.in
> @@ -7,6 +7,18 @@ config BR2_PACKAGE_WIRELESS_TOOLS
>
> if BR2_PACKAGE_WIRELESS_TOOLS
>
> +config BR2_PACKAGE_WIRELESS_TOOLS_IFRENAME
> + bool "Add ifrename"
> + help
> + Build and install the ifrename tool
> +
> +config BR2_PACKAGE_WIRELESS_TOOLS_IWCONFIG
> + bool "Add iwconfig"
> + default y
> + help
> + Build and install the iwconfig, iwlist, iwspy, iwpriv, and
> + iwgetid tools.
> +
> config BR2_PACKAGE_WIRELESS_TOOLS_LIB
> bool "Install shared library"
> depends on !BR2_STATIC_LIBS
> diff --git a/package/wireless_tools/wireless_tools.mk b/package/wireless_tools/wireless_tools.mk
> index 1d29c3b102..210d8aa51a 100644
> --- a/package/wireless_tools/wireless_tools.mk
> +++ b/package/wireless_tools/wireless_tools.mk
> @@ -14,8 +14,14 @@ WIRELESS_TOOLS_CPE_ID_VERSION = $(WIRELESS_TOOLS_VERSION_MAJOR)
> WIRELESS_TOOLS_CPE_ID_UPDATE = pre9
> WIRELESS_TOOLS_INSTALL_STAGING = YES
>
> -WIRELESS_TOOLS_BUILD_TARGETS = iwmulticall
> -WIRELESS_TOOLS_INSTALL_TARGETS = install-iwmulticall
> +ifeq ($(BR2_PACKAGE_WIRELESS_TOOLS_IFRENAME),y)
> +WIRELESS_TOOLS_BUILD_TARGETS += ifrename
> +endif
> +
> +ifeq ($(BR2_PACKAGE_WIRELESS_TOOLS_IWCONFIG),y)
> +WIRELESS_TOOLS_BUILD_TARGETS += iwmulticall
> +WIRELESS_TOOLS_INSTALL_TARGETS += install-iwmulticall
> +endif
>
> ifeq ($(BR2_PACKAGE_WIRELESS_TOOLS_LIB),y)
> WIRELESS_TOOLS_BUILD_TARGETS += libiw.so.$(WIRELESS_TOOLS_VERSION_MAJOR)
> @@ -30,13 +36,17 @@ endef
> endif
>
> define WIRELESS_TOOLS_BUILD_CMDS
> - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
> - $(WIRELESS_TOOLS_BUILD_TARGETS)
> + $(if $(WIRELESS_TOOLS_BUILD_TARGETS),
> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CC="$(TARGET_CC)" \
> + CFLAGS="$(TARGET_CFLAGS)" $(WIRELESS_TOOLS_BUILD_TARGETS))
> endef
So, if none of ifrename, iwconfig, or the library is enabled, then there
is nothjing to build (or to install, below). In this case, it does not
make sense to enable the package altogether.
I think we must ensure that at least one of those are enabled, and
iwconfig looks like the obvious candidate. So (elided for the sake of
example):
config BR2_PACKAGE_WIRELESS_TOOLS
bool "wireless tools"
select BR2_PACKAGE_WIRELESS_TOOLS_IWCONFIG if \
!BR2_PACKAGE_WIRELESS_TOOLS_IFRENAME && \
!BR2_PACKAGE_WIRELESS_TOOLS_LIB
Of course, in the first patch, only BR2_PACKAGE_WIRELESS_TOOLS_LIB would
be needed in the condition, with BR2_PACKAGE_WIRELESS_TOOLS_IFRENAME
added in patch 2.
Regards,
Yann E. MORIN.
> define WIRELESS_TOOLS_INSTALL_TARGET_CMDS
> - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) PREFIX="$(TARGET_DIR)" LDCONFIG=/bin/true \
> - $(WIRELESS_TOOLS_INSTALL_TARGETS)
> + $(if $(WIRELESS_TOOLS_INSTALL_TARGETS),
> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) PREFIX="$(TARGET_DIR)" \
> + LDCONFIG=/bin/true $(WIRELESS_TOOLS_INSTALL_TARGETS))
> + $(if $(BR2_PACKAGE_WIRELESS_TOOLS_IFRENAME),
> + $(INSTALL) -D -m 755 $(@D)/ifrename $(TARGET_DIR)/sbin/ifrename)
> endef
>
> $(eval $(generic-package))
> --
> 2.41.0
>
> _______________________________________________
> 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
next prev parent reply other threads:[~2023-10-22 18:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-19 20:33 [Buildroot] [PATCH 1/1] package/wireless_tools: add option to build ifrename Brandon Maier via buildroot
2023-10-22 18:47 ` Yann E. MORIN [this message]
2023-10-24 18:52 ` Maier, Brandon L Collins via buildroot
2023-10-24 18:48 ` [Buildroot] [PATCH v2 1/2] package/wireless_tools: make 'iwconfig' tool optional Brandon Maier via buildroot
2023-10-24 18:48 ` [Buildroot] [PATCH v2 2/2] package/wireless_tools: add option to build ifrename Brandon Maier via buildroot
2023-11-04 18:18 ` Thomas Petazzoni via buildroot
2023-11-04 18:17 ` [Buildroot] [PATCH v2 1/2] package/wireless_tools: make 'iwconfig' tool optional Thomas Petazzoni via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231022184739.GU2607@scaer \
--to=yann.morin.1998@free.fr \
--cc=bernd@kuhls.net \
--cc=brandon.maier@collins.com \
--cc=buildroot@buildroot.org \
--cc=neal.buchmeyer@collins.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox