wpa_supplicant_s1g: (APP-3372, PR #800) make wpa_supplicant dbus optional

The intent here is to make it optional in the Makefile.

If we want to have it always on for ekh01, I'm fine with this, and we
can set it always enabled in the board config (and indeed matter
could have this as a dependency). However, I would prefer NOT to ship
this on Artini; it also blows out our 16mb image.


Approved-by: Sophronia Koilpillai
Approved-by: Evan Benn
This commit is contained in:
James Haggerty 2024-09-05 04:31:25 +00:00 committed by Arien Judge
parent fb738aa690
commit 0f1d8be588
2 changed files with 18 additions and 6 deletions

View File

@ -10,4 +10,9 @@ if PACKAGE_wpa_supplicant_s1g
default n
prompt "Enable Extensible Authentication Protocol (EAP) support"
config MORSE_WPA_SUPPLICANT_S1G_DBUS
bool
default n
prompt "Enable dbus support"
endif

View File

@ -50,7 +50,6 @@ MMWPA_SUPPLICANT_CONFIG_ENABLE = \
CONFIG_READLINE \
CONFIG_IEEE80211W \
CONFIG_INTERNAL_LIBTOMMATH_FAST \
CONFIG_CTRL_IFACE_DBUS_INTRO \
CONFIG_DEBUG_SYSLOG \
CONFIG_INTERWORKING \
CONFIG_HS20 \
@ -64,8 +63,6 @@ MMWPA_SUPPLICANT_CONFIG_ENABLE = \
CONFIG_TESTING_OPTIONS \
CONFIG_PMKSA_CACHE_EXTERNAL \
CONFIG_WNM \
CONFIG_CTRL_IFACE_DBUS_NEW \
CONFIG_CTRL_IFACE_DBUS_INTRO \
CONFIG_IPV6
MMWPA_SUPPLICANT_CONFIG_DISABLE = \
@ -90,12 +87,16 @@ ifeq ($(CONFIG_MORSE_WPA_SUPPLICANT_S1G_EAP),y)
CONFIG_EAP_PWD
endif
ifeq ($(CONFIG_MORSE_WPA_SUPPLICANT_S1G_DBUS),y)
MMWPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_CTRL_IFACE_DBUS_NEW
endif
define Package/wpa_supplicant_s1g
SECTION:=net
CATEGORY:=Network
SUBMENU:=WirelessAPD
TITLE:=Morse Micro HaLow wpa_supplicant
DEPENDS:= +kmod-morse +libnl +libopenssl +libubus +dbus +libdbus
DEPENDS:= +kmod-morse +libnl +libopenssl +libubus +MORSE_WPA_SUPPLICANT_S1G_DBUS:dbus +MORSE_WPA_SUPPLICANT_S1G_DBUS:libdbus
USERID:=network=101:network=101
PROVIDES:=wpa_supplicant_s1g
endef
@ -136,7 +137,10 @@ TARGET_CPPFLAGS := \
-D_GNU_SOURCE
TARGET_LDFLAGS += -lnl-3 -lnl-genl-3 -lnl-route-3
TARGET_LDFLAGS += -lm -lpthread -lcrypto -lssl -ldbus-1
TARGET_LDFLAGS += -lm -lpthread -lcrypto -lssl
ifeq ($(CONFIG_MORSE_WPA_SUPPLICANT_S1G_DBUS),y)
TARGET_LDFLAGS += -ldbus-1
endif
define Build/RunMake
CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
@ -159,10 +163,13 @@ endef
define Package/wpa_supplicant_s1g/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_DIR) $(1)/etc/dbus-1/system.d/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/wpa_supplicant/wpa_supplicant_s1g $(1)/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/wpa_supplicant/wpa_cli_s1g $(1)/sbin/
ifeq ($(CONFIG_MORSE_WPA_SUPPLICANT_S1G_DBUS),y)
$(INSTALL_DIR) $(1)/etc/dbus-1/system.d/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/wpa_supplicant/dbus/dbus-wpa_supplicant_s1g.conf $(1)/etc/dbus-1/system.d/wpa_supplicant_s1g.conf
endif
endef
define Package/libwpa_client/install