[Buildroot] [git commit] package/wireless_tools: add option to build ifrename
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Sat Nov 4 18:21:30 UTC 2023
commit: https://git.buildroot.net/buildroot/commit/?id=d58f2677e5a46fc1d73b30ffa276a2a1bae777be
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
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>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.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 74786d883e..1d83cb5a5a 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.
@@ -16,6 +17,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 "Install 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..90c9286688 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))
More information about the buildroot
mailing list