From patchwork Tue Dec 18 07:52:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 207038 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 0F3502C0092 for ; Tue, 18 Dec 2012 18:53:14 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B260FA0247; Tue, 18 Dec 2012 07:53:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kMU8nwMLVYDp; Tue, 18 Dec 2012 07:53:03 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 2500FA01DD; Tue, 18 Dec 2012 07:52:59 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 7AECB8F75B for ; Tue, 18 Dec 2012 07:53:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id DE2D78C837 for ; Tue, 18 Dec 2012 07:52:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id M2YykypaIq6u for ; Tue, 18 Dec 2012 07:52:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from viper.mind.be (132.79-246-81.adsl-static.isp.belgacom.be [81.246.79.132]) by whitealder.osuosl.org (Postfix) with ESMTPS id C1B828C95F for ; Tue, 18 Dec 2012 07:52:48 +0000 (UTC) Received: from [172.16.2.6] (helo=vandecaa-laptop) by viper.mind.be with esmtp (Exim 4.69) (envelope-from ) id 1Tkryo-0003mf-Kq; Tue, 18 Dec 2012 08:52:46 +0100 Received: from arnout by vandecaa-laptop with local (Exim 4.80) (envelope-from ) id 1Tkryp-0003te-B0; Tue, 18 Dec 2012 08:52:47 +0100 From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@busybox.net Date: Tue, 18 Dec 2012 08:52:46 +0100 Message-Id: <1355817167-10100-1-git-send-email-arnout@mind.be> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <50D013FC.7040503@mind.be> References: <50D013FC.7040503@mind.be> Subject: [Buildroot] [PATCH RESEND 1/2] wpa-supplicant: add options to enable the new DBus interface X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net From: Sven Neumann Allow to configure the DBus interfaces that the wpa_supplicant binary should support (old or new or both). Also allow to enable introspection support on the new DBus interface. Signed-off-by: Sven Neumann Signed-off-by: Arnout Vandecappelle (Essensium/Mind) Acked-by: Arnout Vandecappelle (Essensium/Mind) Tested-by: Arnout Vandecappelle (Essensium/Mind) (build-test with all features enabled) --- package/wpa_supplicant/Config.in | 19 ++++++++++++++ package/wpa_supplicant/wpa_supplicant.mk | 42 ++++++++++++++++++++++++++---- 2 files changed, 56 insertions(+), 5 deletions(-) diff --git a/package/wpa_supplicant/Config.in b/package/wpa_supplicant/Config.in index d7cefe3..8b0b366 100644 --- a/package/wpa_supplicant/Config.in +++ b/package/wpa_supplicant/Config.in @@ -30,6 +30,25 @@ config BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT (optionally, with WPS); this links in parts of hostapd functionality into wpa_supplicant. +config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_OLD + bool "Enable support for old DBus control interface" + depends on BR2_PACKAGE_DBUS + help + Enable support for old DBus control interface + (fi.epitest.hostap.WPASupplicant). + +config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW + bool "Enable support for new DBus control interface" + depends on BR2_PACKAGE_DBUS + help + Enable support for new DBus control interface (fi.w1.wpa_supplicant1). + +config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_INTROSPECTION + bool "Introspection support" + depends on BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW + help + Add introspection support for new DBus control interface. + config BR2_PACKAGE_WPA_SUPPLICANT_WPS bool "Enable support for WPS" help diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk index 71be11f..3118913 100644 --- a/package/wpa_supplicant/wpa_supplicant.mk +++ b/package/wpa_supplicant/wpa_supplicant.mk @@ -10,7 +10,8 @@ WPA_SUPPLICANT_LICENSE = GPLv2/BSD-3c WPA_SUPPLICANT_LICENSE_FILES = README WPA_SUPPLICANT_CONFIG = $(WPA_SUPPLICANT_DIR)/wpa_supplicant/.config WPA_SUPPLICANT_SUBDIR = wpa_supplicant -WPA_SUPPLICANT_DBUS_SERVICE = fi.epitest.hostap.WPASupplicant +WPA_SUPPLICANT_DBUS_OLD_SERVICE = fi.epitest.hostap.WPASupplicant +WPA_SUPPLICANT_DBUS_NEW_SERVICE = fi.w1.wpa_supplicant1 WPA_SUPPLICANT_CFLAGS = $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/libnl3/ WPA_SUPPLICANT_LDFLAGS = $(TARGET_LDFLAGS) @@ -84,9 +85,41 @@ ifeq ($(BR2_PACKAGE_DBUS),y) WPA_SUPPLICANT_MAKE_ENV = \ PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \ PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" -define WPA_SUPPLICANT_DBUS_CONFIG + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_OLD),y) +define WPA_SUPPLICANT_DBUS_OLD_CONFIG $(SED) 's/\(#\)\(CONFIG_CTRL_IFACE_DBUS=\)/\2/' $(WPA_SUPPLICANT_CONFIG) endef +define WPA_SUPPLICANT_INSTALL_DBUS_OLD + $(INSTALL) -D \ + $(@D)/wpa_supplicant/dbus/$(WPA_SUPPLICANT_DBUS_OLD_SERVICE).service \ + $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_OLD_SERVICE).service +endef +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW),y) +define WPA_SUPPLICANT_DBUS_NEW_CONFIG + $(SED) 's/\(#\)\(CONFIG_CTRL_IFACE_DBUS_NEW=\)/\2/' $(WPA_SUPPLICANT_CONFIG) +endef +define WPA_SUPPLICANT_INSTALL_DBUS_NEW + $(INSTALL) -D \ + $(@D)/wpa_supplicant/dbus/$(WPA_SUPPLICANT_DBUS_NEW_SERVICE).service \ + $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_NEW_SERVICE).service +endef +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_INTROSPECTION),y) +define WPA_SUPPLICANT_DBUS_INTROSPECTION_CONFIG + $(SED) 's/\(#\)\(CONFIG_CTRL_IFACE_DBUS_INTRO=\)/\2/' $(WPA_SUPPLICANT_CONFIG) +endef +endif + +define WPA_SUPPLICANT_DBUS_CONFIG + $(WPA_SUPPLICANT_DBUS_OLD_CONFIG) + $(WPA_SUPPLICANT_DBUS_NEW_CONFIG) + $(WPA_SUPPLICANT_DBUS_INTROSPECTION_CONFIG) +endef + endif define WPA_SUPPLICANT_CONFIGURE_CMDS @@ -131,9 +164,8 @@ define WPA_SUPPLICANT_INSTALL_DBUS $(INSTALL) -D \ $(@D)/wpa_supplicant/dbus/dbus-wpa_supplicant.conf \ $(TARGET_DIR)/etc/dbus-1/system.d/wpa_supplicant.conf - $(INSTALL) -D \ - $(@D)/wpa_supplicant/dbus/$(WPA_SUPPLICANT_DBUS_SERVICE).service \ - $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_SERVICE).service + $(WPA_SUPPLICANT_INSTALL_DBUS_OLD) + $(WPA_SUPPLICANT_INSTALL_DBUS_NEW) endef endif