Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/wireless_tools: add option to build ifrename
@ 2023-10-19 20:33 Brandon Maier via buildroot
  2023-10-22 18:47 ` Yann E. MORIN
  2023-10-24 18:48 ` [Buildroot] [PATCH v2 1/2] package/wireless_tools: make 'iwconfig' tool optional Brandon Maier via buildroot
  0 siblings, 2 replies; 7+ messages in thread
From: Brandon Maier via buildroot @ 2023-10-19 20:33 UTC (permalink / raw)
  To: buildroot; +Cc: Bernd Kuhls, Brandon Maier, Neal J. Buchmeyer

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.

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
 
 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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-11-04 18:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox