From 5c57d503ef5ed82577eb72c6141fb6655de90efc Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Fri, 21 Jun 2024 12:11:57 +0200 Subject: [PATCH] wpa-supplicant: use our custom defconfig A recent change in poky changed the configuration behavior of this package, using the defconfig in the source tree instead of the one provided in Yocto (which we overwrite in meta-digi). Since our ccmp1 builds have a lot of patches specific to the platforms' wifi chip, using the default defconfig results in linking errors. Restore the ability to use custom defconfigs to be able to use the ones defined in our layer per platform. https://onedigi.atlassian.net/browse/DEL-9011 Signed-off-by: Gabriel Valcazar --- .../wpa-supplicant/wpa-supplicant_%.bbappend | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant_%.bbappend b/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant_%.bbappend index eb6782d41..28252a9c4 100644 --- a/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant_%.bbappend +++ b/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant_%.bbappend @@ -8,6 +8,7 @@ SRC_URI += " \ file://0001-wpa_supplicant-enable-control-socket-interface-when-.patch \ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'file://0002-wpa_supplicant-systemd-enable-control-socket-interfa.patch', '', d)} \ file://wpa_supplicant_p2p.conf \ + file://defconfig \ " # Patch series from Murata release @@ -77,6 +78,27 @@ MURATA_COMMON_PATCHES = " \ SRC_URI:append:ccimx6sbc = " file://wpa_supplicant_p2p.conf_atheros" SRC_URI:append:stm32mpcommon = " ${MURATA_COMMON_PATCHES}" +# Re-define do_configure() to be able to use our own defconfig while +# maintaining the logic of the original recipe. This is the exact same as it is +# in poky, but using our custom defconfig instead of the one in the +# wpa-supplicant tree. +do_configure () { + ${MAKE} -C wpa_supplicant clean + #sed -e '/^CONFIG_TLS=/d' wpa_supplicant/.config + sed -e '/^CONFIG_TLS=/d' <${WORKDIR}/defconfig >wpa_supplicant/.config + + if ${@ bb.utils.contains('PACKAGECONFIG', 'openssl', 'true', 'false', d) }; then + echo 'CONFIG_TLS=openssl' >>wpa_supplicant/.config + elif ${@ bb.utils.contains('PACKAGECONFIG', 'gnutls', 'true', 'false', d) }; then + echo 'CONFIG_TLS=gnutls' >>wpa_supplicant/.config + sed -i -e 's/\(^CONFIG_DPP=\)/#\1/' \ + -e 's/\(^CONFIG_EAP_PWD=\)/#\1/' \ + -e 's/\(^CONFIG_SAE=\)/#\1/' wpa_supplicant/.config + fi + + # For rebuild + rm -f wpa_supplicant/*.d wpa_supplicant/dbus/*.d +} do_install:append() { install -m 600 ${WORKDIR}/wpa_supplicant_p2p.conf ${D}${sysconfdir}/wpa_supplicant_p2p.conf sed -i -e "s,##WLAN_P2P_DEVICE_NAME##,${WLAN_P2P_DEVICE_NAME},g" \