Compare commits

...

10 Commits

Author SHA1 Message Date
7813951ca6 Enable EAP methods in wpa_supplicant configuration by uncommenting CONFIG_IEEE8021X_EAPOL, CONFIG_EAP_TLS, CONFIG_EAP_PEAP, and CONFIG_EAP_TTLS for enhanced authentication support. 2026-04-07 12:27:13 +03:00
60d5a08d4c Enhance build script to include strip tool verification and update wpa_supplicant configuration to enable stdout debug reduction for smaller binary size. 2026-04-06 16:44:29 +03:00
890cb816ea Enable CONFIG_SAE and CONFIG_OWE in wpa_supplicant configuration while disabling CONFIG_DRIVER_WEXT for improved driver compatibility. 2026-04-06 16:16:14 +03:00
f599ea1cac Update nla_get_s8 function signature to accept non-const struct nlattr pointer for improved compatibility 2026-04-06 15:36:06 +03:00
a46dc47ef9 Add support for signed 8-bit attribute helpers in nl80211 driver for compatibility with older libnl versions 2026-04-06 15:30:20 +03:00
f0f001dc43 Add build script for ARM toolchain and enable nl80211 driver in wpa_supplicant configuration 2026-04-06 15:27:24 +03:00
b23c7677c2 All configuration parameters are commented out except for critical ones 2025-10-13 09:53:48 +03:00
fd7cd67f74 Fixed an error when reporting no drivers 2025-10-03 12:00:44 +03:00
64eb427c5d Fixed a build error for single-threaded Linux 2025-09-24 08:13:19 +03:00
bb246f24aa Added .gitignore 2025-09-23 16:09:16 +03:00
5 changed files with 129 additions and 34 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
build

86
build.sh Executable file
View File

@@ -0,0 +1,86 @@
#!/usr/bin/env bash
set -euo pipefail
# Build wpa_supplicant for ARM toolchain with nl80211/libnl from sysroot.
#
# Usage:
# ./build.sh [SYSROOT]
#
# Example:
# ./build.sh /home/stargazer/arm-uclinuxfdpiceabi/sysroot
TOOLCHAIN_PREFIX="${TOOLCHAIN_PREFIX:-arm-uclinuxfdpiceabi}"
CC_BIN="${CC_BIN:-${TOOLCHAIN_PREFIX}-gcc}"
STRIP_BIN="${STRIP_BIN:-${TOOLCHAIN_PREFIX}-strip}"
JOBS="${JOBS:-$(nproc)}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
WPA_DIR="${SCRIPT_DIR}/wpa_supplicant"
SYSROOT_DEFAULT="/home/stargazer/arm-uclinuxfdpiceabi/sysroot"
SYSROOT="${1:-${SYSROOT:-$SYSROOT_DEFAULT}}"
PKGCFG_LIBDIR_CANDIDATES=(
"${SYSROOT}/usr/lib/pkgconfig"
"${SYSROOT}/usr/lib64/pkgconfig"
"${SYSROOT}/usr/share/pkgconfig"
)
die() {
echo "ERROR: $*" >&2
exit 1
}
if ! command -v "${CC_BIN}" >/dev/null 2>&1; then
die "Compiler not found in PATH: ${CC_BIN}"
fi
if ! command -v "${STRIP_BIN}" >/dev/null 2>&1; then
die "Strip tool not found in PATH: ${STRIP_BIN}"
fi
if [ ! -d "${WPA_DIR}" ]; then
die "wpa_supplicant directory not found: ${WPA_DIR}"
fi
if [ ! -d "${SYSROOT}" ]; then
die "SYSROOT not found: ${SYSROOT}"
fi
PKG_CONFIG_LIBDIR=""
for d in "${PKGCFG_LIBDIR_CANDIDATES[@]}"; do
if [ -d "${d}" ]; then
if [ -z "${PKG_CONFIG_LIBDIR}" ]; then
PKG_CONFIG_LIBDIR="${d}"
else
PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR}:${d}"
fi
fi
done
if [ -z "${PKG_CONFIG_LIBDIR}" ]; then
die "No pkg-config directories found in SYSROOT"
fi
export PKG_CONFIG_SYSROOT_DIR="${SYSROOT}"
export PKG_CONFIG_LIBDIR
unset PKG_CONFIG_PATH
if ! pkg-config --exists libnl-3.0; then
die "libnl-3.0.pc not found via pkg-config. Checked: ${PKG_CONFIG_LIBDIR}"
fi
if ! pkg-config --exists libnl-genl-3.0; then
die "libnl-genl-3.0.pc not found via pkg-config. Checked: ${PKG_CONFIG_LIBDIR}"
fi
echo "Compiler: ${CC_BIN}"
echo "SYSROOT: ${SYSROOT}"
echo "PKG_CONFIG_LIBDIR: ${PKG_CONFIG_LIBDIR}"
echo "libnl-3.0 version: $(pkg-config --modversion libnl-3.0)"
echo "libnl-genl-3.0 version: $(pkg-config --modversion libnl-genl-3.0)"
cd "${WPA_DIR}"
make clean
make -j"${JOBS}" CC="${CC_BIN}"
"${STRIP_BIN}" wpa_supplicant wpa_cli wpa_passphrase
echo "Build completed successfully."

View File

@@ -66,6 +66,14 @@ enum nlmsgerr_attrs {
#ifndef SOL_NETLINK
#define SOL_NETLINK 270
#endif
#ifndef NLA_S8
/* libnl < 3.3 does not define signed 8-bit attr helpers */
#define NLA_S8 NLA_U8
static inline s8 nla_get_s8(struct nlattr *nla)
{
return (s8) nla_get_u8(nla);
}
#endif /* NLA_S8 */
#ifdef ANDROID

View File

@@ -823,9 +823,9 @@ int os_exec(const char *program, const char *arg, int wait_completion)
pid_t pid;
int pid_status;
pid = fork();
pid = vfork();
if (pid < 0) {
perror("fork");
perror("vfork");
return -1;
}

View File

@@ -29,7 +29,7 @@
#CONFIG_DRIVER_WEXT=y
# Driver interface for Linux drivers using the nl80211 kernel interface
#CONFIG_DRIVER_NL80211=y
CONFIG_DRIVER_NL80211=y
# QCA vendor extensions to nl80211
#CONFIG_DRIVER_NL80211_QCA=y
@@ -94,10 +94,10 @@ CC=arm-uclinuxfdpiceabi-gcc
CONFIG_IEEE8021X_EAPOL=y
# EAP-MD5
CONFIG_EAP_MD5=y
#CONFIG_EAP_MD5=y
# EAP-MSCHAPv2
CONFIG_EAP_MSCHAPV2=y
#CONFIG_EAP_MSCHAPV2=y
# EAP-TLS
CONFIG_EAP_TLS=y
@@ -112,7 +112,7 @@ CONFIG_EAP_PEAP=y
CONFIG_EAP_TTLS=y
# EAP-FAST
CONFIG_EAP_FAST=y
#CONFIG_EAP_FAST=y
# EAP-TEAP
# Note: The current EAP-TEAP implementation is experimental and should not be
@@ -125,10 +125,10 @@ CONFIG_EAP_FAST=y
#CONFIG_EAP_TEAP=y
# EAP-GTC
CONFIG_EAP_GTC=y
#CONFIG_EAP_GTC=y
# EAP-OTP
CONFIG_EAP_OTP=y
#CONFIG_EAP_OTP=y
# EAP-SIM (enable CONFIG_PCSC, if EAP-SIM is used)
#CONFIG_EAP_SIM=y
@@ -143,10 +143,10 @@ CONFIG_EAP_OTP=y
CONFIG_EAP_PWD=y
# EAP-PAX
CONFIG_EAP_PAX=y
#CONFIG_EAP_PAX=y
# LEAP
CONFIG_EAP_LEAP=y
#CONFIG_EAP_LEAP=y
# EAP-AKA (enable CONFIG_PCSC, if EAP-AKA is used)
#CONFIG_EAP_AKA=y
@@ -159,18 +159,18 @@ CONFIG_EAP_LEAP=y
#CONFIG_USIM_SIMULATOR=y
# EAP-SAKE
CONFIG_EAP_SAKE=y
#CONFIG_EAP_SAKE=y
# EAP-GPSK
CONFIG_EAP_GPSK=y
#CONFIG_EAP_GPSK=y
# Include support for optional SHA256 cipher suite in EAP-GPSK
CONFIG_EAP_GPSK_SHA256=y
#CONFIG_EAP_GPSK_SHA256=y
# EAP-TNC and related Trusted Network Connect support (experimental)
CONFIG_EAP_TNC=y
#CONFIG_EAP_TNC=y
# Wi-Fi Protected Setup (WPS)
CONFIG_WPS=y
#CONFIG_WPS=y
# Enable WPS external registrar functionality
#CONFIG_WPS_ER=y
# Disable credentials for an open network by default when acting as a WPS
@@ -180,21 +180,21 @@ CONFIG_WPS=y
#CONFIG_WPS_NFC=y
# EAP-IKEv2
CONFIG_EAP_IKEV2=y
#CONFIG_EAP_IKEV2=y
# EAP-EKE
#CONFIG_EAP_EKE=y
# MACsec
CONFIG_MACSEC=y
#CONFIG_MACSEC=y
# PKCS#12 (PFX) support (used to read private key and certificate file from
# a file that usually has extension .p12 or .pfx)
CONFIG_PKCS12=y
#CONFIG_PKCS12=y
# Smartcard support (i.e., private key on a smartcard), e.g., with openssl
# engine.
CONFIG_SMARTCARD=y
#CONFIG_SMARTCARD=y
# PC/SC interface for smartcards (USIM, GSM SIM)
# Enable this if EAP-SIM or EAP-AKA is included
@@ -213,7 +213,7 @@ CONFIG_SMARTCARD=y
#CONFIG_EAPOL_TEST=y
# Support IPv6
CONFIG_IPV6=y
#CONFIG_IPV6=y
# Select control interface backend for external programs, e.g, wpa_cli:
# unix = UNIX domain sockets (default for Linux/*BSD)
@@ -241,7 +241,7 @@ CONFIG_CTRL_IFACE=y
# This can be used to reduce the size of the wpa_supplicant considerably
# if debugging code is not needed. The size reduction can be around 35%
# (e.g., 90 kB).
#CONFIG_NO_STDOUT_DEBUG=y
CONFIG_NO_STDOUT_DEBUG=y
# Remove WPA support, e.g., for wired-only IEEE 802.1X supplicant, to save
# 35-50 kB in code size.
@@ -418,13 +418,13 @@ CONFIG_BACKEND=file
#CONFIG_NO_LOAD_DYNAMIC_EAP=y
# IEEE Std 802.11r-2008 (Fast BSS Transition) for station mode
CONFIG_IEEE80211R=y
#CONFIG_IEEE80211R=y
# Add support for writing debug log to a file (/tmp/wpa_supplicant-log-#.txt)
CONFIG_DEBUG_FILE=y
#CONFIG_DEBUG_FILE=y
# Send debug messages to syslog instead of stdout
CONFIG_DEBUG_SYSLOG=y
#CONFIG_DEBUG_SYSLOG=y
# Set syslog facility for debug messages
#CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON
@@ -500,10 +500,10 @@ CONFIG_DEBUG_SYSLOG=y
#CONFIG_GETRANDOM=y
# IEEE 802.11ac (Very High Throughput) support (mainly for AP mode)
CONFIG_IEEE80211AC=y
#CONFIG_IEEE80211AC=y
# IEEE 802.11ax HE support (mainly for AP mode)
CONFIG_IEEE80211AX=y
#CONFIG_IEEE80211AX=y
# IEEE 802.11be EHT support (mainly for AP mode)
# CONFIG_IEEE80211AX is mandatory for setting CONFIG_IEEE80211BE.
@@ -520,10 +520,10 @@ CONFIG_IEEE80211AX=y
# This can be used to enable functionality to improve interworking with
# external networks (GAS/ANQP to learn more about the networks and network
# selection based on available credentials).
CONFIG_INTERWORKING=y
#CONFIG_INTERWORKING=y
# Hotspot 2.0
CONFIG_HS20=y
#CONFIG_HS20=y
# Enable interface matching in wpa_supplicant
#CONFIG_MATCH_IFACE=y
@@ -544,12 +544,12 @@ CONFIG_HS20=y
#CONFIG_P2P=y
# Enable TDLS support
CONFIG_TDLS=y
#CONFIG_TDLS=y
# Wi-Fi Display
# This can be used to enable Wi-Fi Display extensions for P2P using an external
# program to control the additional information exchanges in the messages.
CONFIG_WIFI_DISPLAY=y
#CONFIG_WIFI_DISPLAY=y
# Autoscan
# This can be used to enable automatic scan support in wpa_supplicant.
@@ -617,7 +617,7 @@ CONFIG_WIFI_DISPLAY=y
# Support RSN on IBSS networks
# This is needed to be able to use mode=1 network profile with proto=RSN and
# key_mgmt=WPA-PSK (i.e., full key management instead of WPA-None).
CONFIG_IBSS_RSN=y
#CONFIG_IBSS_RSN=y
# External PMKSA cache control
# This can be used to enable control interface commands that allow the current
@@ -639,12 +639,12 @@ CONFIG_BGSCAN_SIMPLE=y
# Opportunistic Wireless Encryption (OWE)
# Experimental implementation of draft-harkins-owe-07.txt
#CONFIG_OWE=y
CONFIG_OWE=y
# Device Provisioning Protocol (DPP) (also known as Wi-Fi Easy Connect)
CONFIG_DPP=y
#CONFIG_DPP=y
# DPP version 2 support
CONFIG_DPP2=y
#CONFIG_DPP2=y
# DPP version 3 support (experimental and still changing; do not enable for
# production use)
#CONFIG_DPP3=y