[Buildroot] [PATCH v2 2/2] package/wireless_tools: add option to build ifrename
Brandon Maier
brandon.maier at collins.com
Tue Oct 24 18:48:35 UTC 2023
From: "Neal J. Buchmeyer" <neal.buchmeyer at collins.com>
The ifrename tool is separate from iwconfig and is not being built. The
upstream does not have an install target for ifrename either, so we must
manually install it.
Signed-off-by: Neal J. Buchmeyer <neal.buchmeyer at collins.com>
Signed-off-by: Brandon Maier <brandon.maier at collins.com>
---
package/wireless_tools/Config.in | 6 ++++++
package/wireless_tools/wireless_tools.mk | 11 +++++++++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/package/wireless_tools/Config.in b/package/wireless_tools/Config.in
index f676e33b57..d7f2ed2381 100644
--- a/package/wireless_tools/Config.in
+++ b/package/wireless_tools/Config.in
@@ -1,6 +1,7 @@
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
help
A collection of tools to configure wireless lan cards.
@@ -15,6 +16,11 @@ config BR2_PACKAGE_WIRELESS_TOOLS_IWCONFIG
Build and install the iwconfig, iwlist, iwspy, iwpriv, and
iwgetid tools.
+config BR2_PACKAGE_WIRELESS_TOOLS_IFRENAME
+ bool "Add ifrename"
+ help
+ Build and install the ifrename tool
+
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 3e55eda600..619df3deaf 100644
--- a/package/wireless_tools/wireless_tools.mk
+++ b/package/wireless_tools/wireless_tools.mk
@@ -19,6 +19,10 @@ WIRELESS_TOOLS_BUILD_TARGETS = iwmulticall
WIRELESS_TOOLS_INSTALL_TARGETS = install-iwmulticall
endif
+ifeq ($(BR2_PACKAGE_WIRELESS_TOOLS_IFRENAME),y)
+WIRELESS_TOOLS_BUILD_TARGETS += ifrename
+endif
+
ifeq ($(BR2_PACKAGE_WIRELESS_TOOLS_LIB),y)
WIRELESS_TOOLS_BUILD_TARGETS += libiw.so.$(WIRELESS_TOOLS_VERSION_MAJOR)
WIRELESS_TOOLS_INSTALL_TARGETS += install-dynamic
@@ -37,8 +41,11 @@ define WIRELESS_TOOLS_BUILD_CMDS
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
More information about the buildroot
mailing list